OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
quad10_2d_supg.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #include "quad10_2d_supg.h"
36 #include "fei2dquadlin.h"
37 #include "fei2dquadconst.h"
38 #include "dofmanager.h"
39 #include "material.h"
40 #include "gausspoint.h"
41 #include "gaussintegrationrule.h"
42 #include "fluiddynamicmaterial.h"
43 #include "fluidcrosssection.h"
44 #include "floatmatrix.h"
45 #include "floatarray.h"
46 #include "intarray.h"
47 #include "domain.h"
48 #include "mathfem.h"
49 #include "engngm.h"
50 #include "timestep.h"
51 #include "materialinterface.h"
52 #include "contextioerr.h"
53 #include "crosssection.h"
54 #include "classfactory.h"
55 
56 #ifdef __OOFEG
57  #include "oofeggraphiccontext.h"
58 #endif
59 
60 namespace oofem {
61 REGISTER_Element(Quad10_2D_SUPG);
62 
64 FEI2dQuadConst Quad10_2D_SUPG :: pressureInterpolation(1, 2);
65 
66 
68  SUPGElement2(n, aDomain), ZZNodalRecoveryModelInterface(this), pressureNode(1, aDomain, this)
69 {
70  numberOfDofMans = 4;
71 }
72 
74 { }
75 
78 {
79  return & this->velocityInterpolation;
80 }
81 
84 {
85  if ( id == P_f ) {
86  return & this->pressureInterpolation;
87  } else {
88  return & this->velocityInterpolation;
89  }
90 }
91 
92 DofManager *
94 {
95  return const_cast< ElementDofManager * >(& pressureNode);
96 }
97 
98 
99 int
101 {
102  return 9;
103 }
104 
105 
106 void
108 {
109  answer = {V_u, V_v};
110 }
111 
112 
113 void
115 {
116  answer = {P_f};
117 }
118 
119 
122 {
123  this->pressureNode.initializeFrom(ir);
124 
126 }
127 
128 
129 void
131 {
133  this->pressureNode.giveInputRecord(input);
134 }
135 
136 
137 void
139 // Sets up the array containing the four Gauss points of the receiver.
140 {
141  if ( integrationRulesArray.size() == 0 ) {
142  integrationRulesArray.resize(3);
143 
144 
145  integrationRulesArray [ 0 ].reset( new GaussIntegrationRule(1, this, 1, 3) );
147 
148  //seven point Gauss integration
149  integrationRulesArray [ 1 ].reset( new GaussIntegrationRule(2, this, 1, 3) );
151 
152  integrationRulesArray [ 2 ].reset( new GaussIntegrationRule(3, this, 1, 3) );
154  }
155 }
156 
157 
158 void
160 {
161  FloatArray n;
163  answer.beNMatrixOf(n, 2);
164  }
165 
166 
167 void
169 {
170  FloatMatrix n, dn;
171  FloatArray u, un;
173  this->computeNuMatrix(n, gp);
174  this->computeVectorOfVelocities(VM_Total, tStep, un);
175 
176  u.beProductOf(n, un);
177 
178  answer.resize(2, 8);
179  answer.zero();
180  for ( int i = 1; i <= 4; i++ ) {
181  answer.at(1, 2 * i - 1) = dn.at(i, 1) * u.at(1) + dn.at(i, 2) * u.at(2);
182  answer.at(2, 2 * i) = dn.at(i, 1) * u.at(1) + dn.at(i, 2) * u.at(2);
183  }
184 }
185 
186 void
188 {
189  FloatMatrix dn;
191 
192  answer.resize(3, 8);
193  answer.zero();
194 
195  for ( int i = 1; i <= 4; i++ ) {
196  answer.at(1, 2 * i - 1) = dn.at(i, 1);
197  answer.at(2, 2 * i) = dn.at(i, 2);
198  answer.at(3, 2 * i - 1) = dn.at(i, 2);
199  answer.at(3, 2 * i) = dn.at(i, 1);
200  }
201 }
202 
203 void
205 {
206  FloatMatrix dn;
208 
209  answer.resize(1, 8);
210  answer.zero();
211 
212  for ( int i = 1; i <= 4; i++ ) {
213  answer.at(1, 2 * i - 1) = dn.at(i, 1);
214  answer.at(1, 2 * i) = dn.at(i, 2);
215  }
216 }
217 
218 void
220 {
221  FloatArray n;
223 
224  answer.resize(1, 1);
225  answer.zero();
226 
227  answer.at(1, 1) = n.at(1);
228 }
229 
230 
231 void
233 {
234  FloatArray dnx(4), dny(4), u, u1(4), u2(4);
235  FloatMatrix dn;
236 
237  answer.resize(2, 2);
238  answer.zero();
239 
240  this->computeVectorOfVelocities(VM_Total, tStep, u);
241 
243  for ( int i = 1; i <= 4; i++ ) {
244  dnx.at(i) = dn.at(i, 1);
245  dny.at(i) = dn.at(i, 2);
246 
247  u1.at(i) = u.at(2 * i - 1);
248  u2.at(i) = u.at(2 * i);
249  }
250 
251 
252  answer.at(1, 1) = u1.dotProduct(dnx);
253  answer.at(1, 2) = u1.dotProduct(dny);
254  answer.at(2, 1) = u2.dotProduct(dnx);
255  answer.at(2, 2) = u2.dotProduct(dny);
256 }
257 
258 void
260 {
261  FloatMatrix dn;
263 
264  answer.beTranspositionOf(dn);
265 }
266 
267 
268 void
270 {
271  answer.resize(2, 8);
272  answer.zero();
273 }
274 
275 
276 void
278 {
279  double Re, norm_un, mu, mu_min, nu, norm_N, norm_N_d, norm_M_d, norm_LSIC, norm_G_c, norm_M_c, norm_N_c, t_p1, t_p2, t_p3, t_s1, t_s2, t_s3, rho;
280  FloatMatrix N, N_d, M_d, LSIC, G_c, M_c, N_c;
281  FloatArray u;
282 
283  mu_min = 1;
284  rho = static_cast< FluidCrossSection * >( this->giveCrossSection() )->giveDensity( integrationRulesArray [ 0 ]->getIntegrationPoint(0) );
285  for ( GaussPoint *gp: *integrationRulesArray [ 1 ] ) {
286  mu = static_cast< FluidCrossSection * >( this->giveCrossSection() )->giveFluidMaterial()->giveEffectiveViscosity(gp, tStep);
287  if ( mu_min > mu ) {
288  mu_min = mu;
289  }
290  }
291 
292  nu = mu_min / rho;
293 
294  //this->computeVectorOfVelocities(VM_Total, tStep->givePreviousStep(), un);
295  this->computeVectorOfVelocities(VM_Total, tStep, u);
296 
297  norm_un = u.computeNorm();
298 
299  this->computeAdvectionTerm(N, tStep);
300  this->computeAdvectionDeltaTerm(N_d, tStep);
301  this->computeMassDeltaTerm(M_d, tStep);
302  this->computeLSICTerm(LSIC, tStep);
303  this->computeLinearAdvectionTerm_MC(G_c, tStep);
304  this->computeMassEpsilonTerm(M_c, tStep);
305  this->computeAdvectionEpsilonTerm(N_c, tStep);
306 
307 
308  norm_N = N.computeFrobeniusNorm();
309  norm_N_d = N_d.computeFrobeniusNorm();
310  norm_M_d = M_d.computeFrobeniusNorm();
311  norm_LSIC = LSIC.computeFrobeniusNorm();
312  norm_G_c = G_c.computeFrobeniusNorm();
313  norm_M_c = M_c.computeFrobeniusNorm();
314  norm_N_c = N_c.computeFrobeniusNorm();
315 
316  if ( ( norm_N == 0 ) || ( norm_N_d == 0 ) || ( norm_M_d == 0 ) ) {
317  t_supg = 0;
318  } else {
319  Re = ( norm_un / nu ) * ( norm_N / norm_N_d );
320 
321  t_s1 = norm_N / norm_N_d;
322 
323  t_s2 = tStep->giveTimeIncrement() * ( norm_N / norm_M_d ) * 0.5;
324 
325  t_s3 = t_s1 * Re;
326 
327  t_supg = 1. / sqrt( 1. / ( t_s1 * t_s1 ) + 1. / ( t_s2 * t_s2 ) + 1. / ( t_s3 * t_s3 ) );
328  // t_supg = 0;
329  }
330 
331  if ( norm_LSIC == 0 ) {
332  t_lsic = 0;
333  } else {
334  t_lsic = norm_N / norm_LSIC;
335 
336  // t_lsic = 0;
337  }
338 
339  if ( ( norm_G_c == 0 ) || ( norm_N_c == 0 ) || ( norm_M_c == 0 ) ) {
340  t_pspg = 0;
341  } else {
342  Re = ( norm_un / nu ) * ( norm_N / norm_N_d );
343 
344  t_p1 = norm_G_c / norm_N_c;
345 
346  t_p2 = tStep->giveTimeIncrement() * ( norm_G_c / norm_M_c ) * 0.5;
347 
348  t_p3 = t_p1 * Re;
349 
350  t_pspg = 1. / sqrt( 1. / ( t_p1 * t_p1 ) + 1. / ( t_p2 * t_p2 ) + 1. / ( t_p3 * t_p3 ) );
351  // t_pspg = 0;
352  }
353 
354  //t_pspg = 0;
355 }
356 
357 
358 void
360 {
361  FloatMatrix n, b;
362 
363  answer.clear();
364 
365  /* consistent part + supg stabilization term */
366  for ( GaussPoint *gp: *this->integrationRulesArray [ 1 ] ) {
367  this->computeNuMatrix(n, gp);
368  this->computeUDotGradUMatrix(b, gp, tStep);
369  double dV = this->computeVolumeAround(gp);
370  double rho = static_cast< FluidCrossSection * >( this->giveCrossSection() )->giveDensity(gp);
371  answer.plusProductUnsym(n, b, rho * dV);
372  }
373 }
374 
375 
376 void
378 {
379  FloatMatrix n, b;
380 
381  answer.clear();
382 
383  /* consistent part + supg stabilization term */
384  for ( GaussPoint *gp: *this->integrationRulesArray [ 1 ] ) {
385  this->computeNuMatrix(n, gp);
386  this->computeUDotGradUMatrix(b, gp, tStep);
387  double dV = this->computeVolumeAround(gp);
388  double rho = static_cast< FluidCrossSection * >( this->giveCrossSection() )->giveDensity(gp);
389 
390  answer.plusProductUnsym(b, b, rho * dV);
391  }
392 }
393 
394 
395 void
397 {
398  FloatMatrix n, b;
399 
400  answer.clear();
401 
402  /* mtrx for computing t_supg, norm of this mtrx is computed */
403  for ( GaussPoint *gp: *this->integrationRulesArray [ 1 ] ) {
404  this->computeNuMatrix(n, gp);
405  this->computeUDotGradUMatrix(b, gp, tStep);
406  double dV = this->computeVolumeAround(gp);
407  double rho = static_cast< FluidCrossSection * >( this->giveCrossSection() )->giveDensity(gp);
408 
409  answer.plusProductUnsym(b, n, rho * dV);
410  }
411 }
412 
413 void
415 {
416  FloatMatrix b;
417 
418  answer.clear();
419 
420  for ( GaussPoint *gp: *this->integrationRulesArray [ 1 ] ) {
421  double dV = this->computeVolumeAround(gp);
422  double rho = static_cast< FluidCrossSection * >( this->giveCrossSection() )->giveDensity(gp);
423  this->computeDivUMatrix(b, gp);
424 
425  answer.plusProductSymmUpper(b, b, dV * rho);
426  }
427 
428  answer.symmetrized();
429 }
430 
431 
432 void
434 {
435  // to compute t_pspg
436  FloatMatrix g, b;
437 
438  answer.clear();
439 
440  for ( GaussPoint *gp: *this->integrationRulesArray [ 1 ] ) {
441  this->computeGradPMatrix(g, gp);
442  this->computeUDotGradUMatrix(b, gp, tStep);
443  double dV = this->computeVolumeAround(gp);
444 
445  answer.plusProductUnsym(g, b, dV);
446  }
447 }
448 
449 void
451 {
452  // to compute t_pspg
453  FloatMatrix g, n;
454 
455  answer.clear();
456 
457  for ( GaussPoint *gp: *this->integrationRulesArray [ 1 ] ) {
458  this->computeGradPMatrix(g, gp);
459  this->computeNuMatrix(n, gp);
460  double dV = this->computeVolumeAround(gp);
461 
462  answer.plusProductUnsym(g, n, dV);
463  }
464 }
465 
466 int
468 {
469  return 2;
470 }
471 
472 
473 double
475 {
476 #if 0
477  FloatArray fi(3), un;
478 
479  this->computeVectorOfVelocities(VM_Total, tStep, un);
480  for ( int i = 1; i <= 3; i++ ) {
481  fi.at(i) = ls->giveLevelSetDofManValue( dofManArray.at(i) );
482  }
483 
484  double fix = b [ 0 ] * fi.at(1) + b [ 1 ] * fi.at(2) + b [ 2 ] * fi.at(3);
485  double fiy = c [ 0 ] * fi.at(1) + c [ 1 ] * fi.at(2) + c [ 2 ] * fi.at(3);
486  double norm = sqrt(fix * fix + fiy * fiy);
487 
488  return ( 1. / 3. ) * ( fix * ( un.at(1) + un.at(3) + un.at(5) ) + fiy * ( un.at(2) + un.at(4) + un.at(6) ) ) / norm;
489 
490 #endif
491  return 0.0;
492 }
493 
494 
495 double
497 {
498  return 0.0;
499 }
500 
501 
502 void
504 { }
505 
506 
507 void
509 { }
510 
511 
512 double
514 {
515  return 1.e6;
516 }
517 
518 
519 void
521  InternalStateType type, TimeStep *tStep)
522 {
523  GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
524  this->giveIPValue(answer, gp, type, tStep);
525 }
526 
527 
528 int
530 {
532 }
533 
534 
535 void
537 {
539 }
540 
541 int
543 {
544  if ( type == IST_VOFFraction ) {
546  if ( mi ) {
547  FloatArray val;
549  answer = FloatArray{val.at(1)};
550  return 1;
551  } else {
552  answer = FloatArray{1.0};
553  return 1;
554  }
555  } else {
556  return SUPGElement :: giveIPValue(answer, gp, type, tStep);
557  }
558 }
559 
560 
563 //
564 // saves full element context (saves state variables, that completely describe
565 // current state)
566 //
567 {
568  contextIOResultType iores;
569 
570  if ( ( iores = SUPGElement :: saveContext(stream, mode, obj) ) != CIO_OK ) {
571  THROW_CIOERR(iores);
572  }
573 
574  return CIO_OK;
575 }
576 
577 
578 
580 //
581 // restores full element context (saves state variables, that completely describe
582 // current state)
583 //
584 {
585  contextIOResultType iores;
586 
587  if ( ( iores = SUPGElement :: restoreContext(stream, mode, obj) ) != CIO_OK ) {
588  THROW_CIOERR(iores);
589  }
590 
591  return CIO_OK;
592 }
593 
594 
595 double
597 // Returns the portion of the receiver which is attached to gp.
598 {
599  double determinant, weight, volume;
600 
602 
603 
604  weight = gp->giveWeight();
605  volume = determinant * weight;
606 
607  return volume;
608 }
609 
610 #if 0
611 double
612 Quad10_2D_SUPG :: computeVolumeAroundPressure(FEInterpolation2d &interpol, GaussPoint *gp)
613 // Returns the portion of the receiver which is attached to gp.
614 {
615  double determinant, weight, volume;
616 
617  determinant = fabs( interpol.giveTransformationJacobian(domain, pressureDofManArray, gp->giveNaturalCoordinates(), 0.0) );
618 
619  weight = gp->giveWeight();
620  volume = determinant * weight;
621 
622  return volume;
623 }
624 #endif
625 
626 Interface *
628 {
629  if ( interface == LevelSetPCSElementInterfaceType ) {
630  return static_cast< LevelSetPCSElementInterface * >(this);
631  } else if ( interface == ZZNodalRecoveryModelInterfaceType ) {
632  return static_cast< ZZNodalRecoveryModelInterface * >(this);
633  } else if ( interface == NodalAveragingRecoveryModelInterfaceType ) {
634  return static_cast< NodalAveragingRecoveryModelInterface * >(this);
635  }
636 
637  return NULL;
638 }
639 
640 
641 void
643 {
644  map.enumerate(8);
645 }
646 
647 
648 void
650 {
651  map = {9};
652 }
653 
654 
655 #ifdef __OOFEG
656 int
658  int node, TimeStep *tStep)
659 {
660  return SUPGElement :: giveInternalStateAtNode(answer, type, mode, node, tStep);
661 }
662 
663 void
665 {
666  WCRec p [ 3 ];
667  GraphicObj *go;
668 
669  if ( !gc.testElementGraphicActivity(this) ) {
670  return;
671  }
672 
673  EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
674  EASValsSetColor( gc.getElementColor() );
675  EASValsSetEdgeColor( gc.getElementEdgeColor() );
676  EASValsSetEdgeFlag(true);
677  EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
678  p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1);
679  p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2);
680  p [ 0 ].z = 0.;
681  p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1);
682  p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2);
683  p [ 1 ].z = 0.;
684  p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1);
685  p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2);
686  p [ 2 ].z = 0.;
687 
688  go = CreateTriangle3D(p);
689  EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
690  EGAttachObject(go, ( EObjectP ) this);
691  EMAddGraphicsToModel(ESIModel(), go);
692 }
693 
694 void
696 {
697  int i, indx, result = 0;
698  WCRec p [ 3 ];
699  GraphicObj *tr;
700  FloatArray v1, v2, v3;
701  double s [ 3 ];
702 
703  if ( !gc.testElementGraphicActivity(this) ) {
704  return;
705  }
706 
707  EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER);
708 
709  // if ((gc.giveIntVarMode() == ISM_local) && (gc.giveIntVarType() == IST_VOFFraction)) {
710  if ( ( gc.giveIntVarType() == IST_VOFFraction ) && ( gc.giveIntVarMode() == ISM_local ) ) {
711  Polygon matvolpoly;
712  //this->formMaterialVolumePoly(matvolpoly, NULL, temp_normal, temp_p, false);
713  EASValsSetColor( gc.getStandardSparseProfileColor() );
714  //GraphicObj *go = matvolpoly.draw(gc,true,OOFEG_VARPLOT_PATTERN_LAYER);
715  matvolpoly.draw(gc, true, OOFEG_VARPLOT_PATTERN_LAYER);
716  return;
717  }
718 
719  if ( gc.giveIntVarMode() == ISM_recovered ) {
720  result += this->giveInternalStateAtNode(v1, gc.giveIntVarType(), gc.giveIntVarMode(), 1, tStep);
721  result += this->giveInternalStateAtNode(v2, gc.giveIntVarType(), gc.giveIntVarMode(), 2, tStep);
722  result += this->giveInternalStateAtNode(v3, gc.giveIntVarType(), gc.giveIntVarMode(), 3, tStep);
723  } else if ( gc.giveIntVarMode() == ISM_local ) {
724  GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
725  result += giveIPValue(v1, gp, gc.giveIntVarType(), tStep);
726  v2 = v1;
727  v3 = v1;
728  result *= 3;
729  }
730 
731  if ( result != 3 ) {
732  return;
733  }
734 
735  indx = gc.giveIntVarIndx();
736 
737  s [ 0 ] = v1.at(indx);
738  s [ 1 ] = v2.at(indx);
739  s [ 2 ] = v3.at(indx);
740 
741  EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER);
742 
743  if ( gc.getScalarAlgo() == SA_ISO_SURF ) {
744  for ( i = 0; i < 3; i++ ) {
745  p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1);
746  p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2);
747  p [ i ].z = 0.;
748  }
749 
750  //EASValsSetColor(gc.getYieldPlotColor(ratio));
751  gc.updateFringeTableMinMax(s, 3);
752  tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
753  EGWithMaskChangeAttributes(LAYER_MASK, tr);
754  EMAddGraphicsToModel(ESIModel(), tr);
755  } else if ( ( gc.getScalarAlgo() == SA_ZPROFILE ) || ( gc.getScalarAlgo() == SA_COLORZPROFILE ) ) {
756  double landScale = gc.getLandScale();
757 
758  for ( i = 0; i < 3; i++ ) {
759  p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1);
760  p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2);
761  p [ i ].z = s [ i ] * landScale;
762  }
763 
764  if ( gc.getScalarAlgo() == SA_ZPROFILE ) {
765  EASValsSetColor( gc.getDeformedElementColor() );
766  EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH);
767  EASValsSetFillStyle(FILL_SOLID);
768  tr = CreateTriangle3D(p);
769  EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
770  } else {
771  gc.updateFringeTableMinMax(s, 3);
772  EASValsSetFillStyle(FILL_SOLID);
773  tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
774  EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
775  }
776 
777  EMAddGraphicsToModel(ESIModel(), tr);
778  }
779 }
780 
781 #endif
782 } // end namespace oofem
CrossSection * giveCrossSection()
Definition: element.C:495
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
void enumerate(int maxVal)
Resizes receiver and enumerates from 1 to the maximum value given.
Definition: intarray.C:136
IntArray dofManArray
Array containing dofmanager numbers.
Definition: element.h:151
virtual int computeNumberOfDofs()
Computes or simply returns total number of element&#39;s local DOFs.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
Definition: element.C:1257
Class and object Domain.
Definition: domain.h:115
Fluid cross-section.
ScalarAlgorithmType getScalarAlgo()
virtual void computeMassEpsilonTerm(FloatMatrix &answer, TimeStep *tStep)
virtual double computeCriticalTimeStep(TimeStep *tStep)
Computes the critical time increment.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
Definition: feinterpol.C:43
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
virtual void giveInternalDofManDofIDMask(int i, IntArray &answer) const
Returns internal dofmanager dof mask for node.
Class implementing internal element dof manager having some DOFs.
The element interface required by ZZNodalRecoveryModel.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes the linear advection term for mass conservation equation.
Definition: supgelement2.C:442
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual void computeAdvectionDeltaTerm(FloatMatrix &answer, TimeStep *tStep)
virtual void computeNuMatrix(FloatMatrix &answer, GaussPoint *gp)
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
double giveLevelSetDofManValue(int i)
Returns level set value in specific node.
Definition: levelsetpcs.h:168
virtual void computeGradPMatrix(FloatMatrix &answer, GaussPoint *gp)
#define OOFEG_RAW_GEOMETRY_LAYER
Element interface for LevelSetPCS class representing level-set like material interface.
Definition: levelsetpcs.h:68
Class representing a general abstraction for surface finite element interpolation class...
Definition: feinterpol2d.h:45
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: dofmanager.C:458
virtual MaterialInterface * giveMaterialInterface(int n)
Returns material interface representation for given domain.
Definition: engngm.h:351
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
Definition: domain.C:433
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Definition: element.C:779
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: supgelement2.C:66
virtual int giveNumberOfSpatialDimensions()
Base class for dof managers.
Definition: dofmanager.h:113
virtual void computeNpMatrix(FloatMatrix &answer, GaussPoint *gp)
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
virtual int checkConsistency()
Performs consistency check.
int giveNumber()
Returns domain number.
Definition: domain.h:266
virtual double giveCoordinate(int i)
Definition: node.C:82
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual void giveLocalVelocityDofMap(IntArray &map)
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
This abstract class represent a general base element class for fluid dynamic problems.
Definition: supgelement2.h:57
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: element.C:970
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void computeAdvectionEpsilonTerm(FloatMatrix &answer, TimeStep *tStep)
virtual double LS_PCS_computeS(LevelSetPCS *ls, TimeStep *tStep)
Evaluates S in level set equation of the form where .
double giveTimeIncrement()
Returns solution step associated time increment.
Definition: timestep.h:150
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
virtual double LS_PCS_computeF(LevelSetPCS *ls, TimeStep *tStep)
Evaluates F in level set equation of the form where for interface position driven by flow with speed...
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
Definition: floatmatrix.C:780
Quad10_2D_SUPG(int n, Domain *d)
InternalStateType giveIntVarType()
virtual void LS_PCS_computedN(FloatMatrix &answer)
Returns gradient of shape functions.
virtual void computeLSICTerm(FloatMatrix &answer, TimeStep *tStep)
virtual void giveElementMaterialMixture(FloatArray &answer, int ielem)=0
Returns volumetric (or other based measure) of relative material contents in given element...
ElementDofManager pressureNode
virtual FEInterpolation * giveInterpolation() const
virtual void computeAdvectionTerm(FloatMatrix &answer, TimeStep *tStep)
virtual void computeVectorOfVelocities(ValueModeType mode, TimeStep *tStep, FloatArray &velocities)
Definition: fmelement.C:48
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
REGISTER_Element(LSpace)
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
static FEI2dQuadConst pressureInterpolation
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
Definition: gausspoint.h:181
Abstract base class representing (moving) material interfaces.
double t_supg
Stabilization coefficients, updated for each solution step in updateStabilizationCoeffs() ...
Definition: supgelement.h:70
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
virtual void giveLocalPressureDofMap(IntArray &map)
#define N(p, q)
Definition: mdm.C:367
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
Definition: floatmatrix.C:698
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
virtual void updateStabilizationCoeffs(TimeStep *tStep)
Updates the stabilization coefficients used for CBS and SUPG algorithms.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
Definition: crosssection.C:54
InternalStateMode giveIntVarMode()
void beNMatrixOf(const FloatArray &n, int nsd)
Assigns the receiver to be a repeated diagonal matrix.
Definition: floatmatrix.C:505
Class representing vector of real numbers.
Definition: floatarray.h:82
Class representing 2D polygon.
Definition: geotoolbox.h:91
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
double computeFrobeniusNorm() const
Computes the Frobenius norm of the receiver.
Definition: floatmatrix.C:1613
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Abstract base class representing Level Set representation of material interfaces. ...
Definition: levelsetpcs.h:114
double norm(const FloatArray &x)
Definition: floatarray.C:985
double computeNorm() const
Computes the norm (or length) of the vector.
Definition: floatarray.C:840
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void LS_PCS_computeVOFFractions(FloatArray &answer, FloatArray &fi)
Returns VOF fractions for each material on element according to nodal values of level set function (p...
Class Interface.
Definition: interface.h:82
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: element.C:885
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
virtual void computeDivUMatrix(FloatMatrix &answer, GaussPoint *gp)
Class representing the a dynamic Input Record.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
Definition: floatmatrix.C:323
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
Definition: element.h:170
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
virtual void computeMassDeltaTerm(FloatMatrix &answer, TimeStep *tStep)
void updateFringeTableMinMax(double *s, int size)
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
GraphicObj * draw(oofegGraphicContext &, bool filled, int layer=OOFEG_DEBUG_LAYER)
Definition: geotoolbox.C:152
static FEI2dQuadLin velocityInterpolation
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void computeDivTauMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: supgelement2.C:75
virtual void computeBMatrix(FloatMatrix &anwer, GaussPoint *gp)
virtual void computeUDotGradUMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
Definition: floatmatrix.h:516
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
int giveNumber() const
Definition: femcmpnn.h:107
virtual int checkConsistency()
Performs consistency check.
Definition: supgelement.C:339
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
Definition: element.h:610
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
Definition: fei2dquadlin.C:75
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
Definition: floatmatrix.C:1576
#define OOFEG_VARPLOT_PATTERN_LAYER
Class representing integration point in finite element program.
Definition: gausspoint.h:93
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
Definition: supgelement.C:366
Class representing solution step.
Definition: timestep.h:80
int numberOfDofMans
Number of dofmanagers.
Definition: element.h:149
InternalStateMode
Determines the mode of internal variable.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
Definition: fei2dquadlin.C:59
virtual DofManager * giveInternalDofManager(int i) const
Returns i-th internal element dof manager of the receiver.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138
virtual void computeGradUMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Class representing Gaussian-quadrature integration rule.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011