66#define TRSUPG_ZERO_VOF 1.e-8
75TR1_2D_CBS :: TR1_2D_CBS(
int n,
Domain *aDomain) :
88TR1_2D_CBS :: giveInterpolation()
const {
return &
interp; }
91TR1_2D_CBS :: computeNumberOfDofs()
97TR1_2D_CBS :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
99 answer = {V_u, V_v, P_f};
106 CBSElement :: initializeFrom(ir, priority);
111 if (flag && (
vof > 0.0)) {
127 CBSElement :: giveInputRecord(input);
137TR1_2D_CBS :: computeGaussPoints()
152 double ar6 = rho *
area / 6.0;
153 double ar12 = rho *
area / 12.0;
157 answer.
at(1, 1) = answer.
at(2, 2) = ar6;
158 answer.
at(4, 4) = answer.
at(5, 5) = ar6;
159 answer.
at(7, 7) = answer.
at(8, 8) = ar6;
161 answer.
at(1, 4) = answer.
at(1, 7) = ar12;
162 answer.
at(4, 1) = answer.
at(4, 7) = ar12;
163 answer.
at(7, 1) = answer.
at(7, 4) = ar12;
165 answer.
at(2, 5) = answer.
at(2, 8) = ar12;
166 answer.
at(5, 2) = answer.
at(5, 8) = ar12;
167 answer.
at(8, 2) = answer.
at(8, 5) = ar12;
175 double mm = rho * this->
area / 3.0;
178 for (
int i = 0; i < 3; i++ ) {
179 answer.
at(i * 3 + 1) = mm;
180 answer.
at(i * 3 + 2) = mm;
189 double ar12, ar3, dudx, dudy, dvdx, dvdy;
191 double adu11, adu21, adu31, adv11, adv21, adv31;
192 double adu12, adu22, adu32, adv12, adv22, adv32;
206 dudx =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
207 dudy =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
208 dvdx =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
209 dvdy =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
211 usum = u.
at(1) + u.
at(3) + u.
at(5);
212 vsum = u.
at(2) + u.
at(4) + u.
at(6);
216 adu11 = ar12 * ( dudx * ( usum + u.
at(1) ) + dudy * ( vsum + u.
at(2) ) );
217 adu21 = ar12 * ( dudx * ( usum + u.
at(3) ) + dudy * ( vsum + u.
at(4) ) );
218 adu31 = ar12 * ( dudx * ( usum + u.
at(5) ) + dudy * ( vsum + u.
at(6) ) );
219 adv11 = ar12 * ( dvdx * ( usum + u.
at(1) ) + dvdy * ( vsum + u.
at(2) ) );
220 adv21 = ar12 * ( dvdx * ( usum + u.
at(3) ) + dvdy * ( vsum + u.
at(4) ) );
221 adv31 = ar12 * ( dvdx * ( usum + u.
at(5) ) + dvdy * ( vsum + u.
at(6) ) );
225 double uu = ( usum * usum + u.
at(1) * u.
at(1) + u.
at(3) * u.
at(3) + u.
at(5) * u.
at(5) );
226 double uv = ( usum * vsum + u.
at(1) * u.
at(2) + u.
at(3) * u.
at(4) + u.
at(5) * u.
at(6) );
227 double vv = ( vsum * vsum + u.
at(2) * u.
at(2) + u.
at(4) * u.
at(4) + u.
at(6) * u.
at(6) );
229 adu12 = dt * 0.5 * ar12 * (
b [ 0 ] * dudx * uu +
b [ 0 ] * dudy * uv +
c [ 0 ] * dudx * uv +
c [ 0 ] * dudy * vv );
230 adu22 = dt * 0.5 * ar12 * (
b [ 1 ] * dudx * uu +
b [ 1 ] * dudy * uv +
c [ 1 ] * dudx * uv +
c [ 1 ] * dudy * vv );
231 adu32 = dt * 0.5 * ar12 * (
b [ 2 ] * dudx * uu +
b [ 2 ] * dudy * uv +
c [ 2 ] * dudx * uv +
c [ 2 ] * dudy * vv );
232 adv12 = dt * 0.5 * ar12 * (
b [ 0 ] * dvdx * uu +
b [ 0 ] * dvdy * uv +
c [ 0 ] * dvdx * uv +
c [ 0 ] * dvdy * vv );
233 adv22 = dt * 0.5 * ar12 * (
b [ 1 ] * dvdx * uu +
b [ 1 ] * dvdy * uv +
c [ 1 ] * dvdx * uv +
c [ 1 ] * dvdy * vv );
234 adv32 = dt * 0.5 * ar12 * (
b [ 2 ] * dvdx * uu +
b [ 2 ] * dvdy * uv +
c [ 2 ] * dvdx * uv +
c [ 2 ] * dvdy * vv );
239 answer.
at(1) = -adu11 - adu12;
240 answer.
at(2) = -adv11 - adv12;
241 answer.
at(4) = -adu21 - adu22;
242 answer.
at(5) = -adv21 - adv22;
243 answer.
at(7) = -adu31 - adu32;
244 answer.
at(8) = -adv31 - adv32;
249 for (
int i = 1; i <= nLoads; i++ ) {
251 auto ltype = load->giveBCGeoType();
253 load->computeComponentArrayAt(gVector, tStep, VM_Total);
255 answer.
at(1) -= dt * 0.5 * ar3 * (
b [ 0 ] * usum +
c [ 0 ] * vsum ) * gVector.
at(1);
256 answer.
at(2) -= dt * 0.5 * ar3 * (
b [ 0 ] * usum +
c [ 0 ] * vsum ) * gVector.
at(2);
257 answer.
at(4) -= dt * 0.5 * ar3 * (
b [ 1 ] * usum +
c [ 1 ] * vsum ) * gVector.
at(1);
258 answer.
at(5) -= dt * 0.5 * ar3 * (
b [ 1 ] * usum +
c [ 1 ] * vsum ) * gVector.
at(2);
259 answer.
at(7) -= dt * 0.5 * ar3 * (
b [ 2 ] * usum +
c [ 2 ] * vsum ) * gVector.
at(1);
260 answer.
at(8) -= dt * 0.5 * ar3 * (
b [ 2 ] * usum +
c [ 2 ] * vsum ) * gVector.
at(2);
277 double ar3 =
area / 3.0;
280 stress.
times(1. / Re);
285 for (
int i = 0; i < 3; i++ ) {
286 answer.
at(i * 3 + 1) = -
area * ( stress.
at(1) *
b [ i ] + stress.
at(6) *
c [ i ] );
287 answer.
at(i * 3 + 2) = -
area * ( stress.
at(6) *
b [ i ] + stress.
at(2) *
c [ i ] );
291 double coeff = ar3 * rho;
294 for (
int i = 1; i <= nLoads; i++ ) {
298 load->computeComponentArrayAt(gVector, tStep, VM_Total);
300 answer.
at(1) += coeff * gVector.
at(1);
301 answer.
at(2) += coeff * gVector.
at(2);
302 answer.
at(4) += coeff * gVector.
at(1);
303 answer.
at(5) += coeff * gVector.
at(2);
304 answer.
at(7) += coeff * gVector.
at(1);
305 answer.
at(8) += coeff * gVector.
at(2);
313 for (
int j = 1; j <= nLoads; j++ ) {
323 int n2 = ( n1 == 3 ? 1 : n1 + 1 );
325 double tx =
giveNode(n2)->giveCoordinate(1) -
giveNode(n1)->giveCoordinate(1);
326 double ty =
giveNode(n2)->giveCoordinate(2) -
giveNode(n1)->giveCoordinate(2);
327 double l = sqrt(tx * tx + ty * ty);
333 for (
int i = 1; i <= numLoads; i++ ) {
337 load->computeValueAt(t, tStep, coords, VM_Total);
341 answer.
at( ( n1 - 1 ) * 3 + 1 ) += 0.5 * l * ( t.
at(1) * nx );
342 answer.
at( ( n1 - 1 ) * 3 + 2 ) += 0.5 * l * ( t.
at(2) * ny );
344 answer.
at( ( n2 - 1 ) * 3 + 1 ) += 0.5 * l * ( t.
at(1) * nx );
345 answer.
at( ( n2 - 1 ) * 3 + 2 ) += 0.5 * l * ( t.
at(2) * ny );
376 double velu = 0.0, velv = 0.0;
393 u.
add(theta1, ustar);
405 for (
int i = 0; i < 3; i++ ) {
406 velu += u.
at(i * 2 + 1);
407 velv += u.
at(i * 2 + 2);
410 for (
int i = 0; i < 3; i++ ) {
411 answer.
at( ( i + 1 ) * 3 ) =
area * ( (
b [ i ] * velu +
c [ i ] * velv ) ) / 3.0;
426 int n2 = ( n1 == 3 ? 1 : n1 + 1 );
429 double tx, ty, l, nx, ny, un1, un2;
432 l = sqrt(tx * tx + ty * ty);
435 un1 = nx * u.
at( ( n1 - 1 ) * 2 + 1 ) + ny *u.
at(n1 * 2);
436 un2 = nx * u.
at( ( n2 - 1 ) * 2 + 1 ) + ny *u.
at(n2 * 2);
439 answer.
at(n1 * 3) -= ( un1 * l / 3. + un2 * l / 6. );
440 answer.
at(n2 * 3) -= ( un2 * l / 3. + un1 * l / 6. );
464 stress.
times(1. / Re);
477 int n2 = ( n1 == 3 ? 1 : n1 + 1 );
479 double tx, ty, l, nx, ny, pcoeff;
482 l = sqrt(tx * tx + ty * ty);
489 pcoeff = stress.
at(1) * nx * nx + stress.
at(2) * ny * ny + 2.0 * stress.
at(6) * nx * ny;
490 answer.
at(n1 * 3) += pcoeff;
491 answer.
at(n2 * 3) += pcoeff;
498 for (
int i = 1; i <= nLoads; i++ ) {
509 answer.
at(n1 * 3) -= t.
at(1) * nx + t.
at(2) * ny;
510 answer.
at(n2 * 3) -= t.
at(1) * nx + t.
at(2) * ny;
523TR1_2D_CBS :: computeNumberOfNodalPrescribedTractionPressureContributions(
FloatArray &answer,
TimeStep *tStep)
538 int n2 = ( n1 == 3 ? 1 : n1 + 1 );
559 double dpdx = 0.0, dpdy = 0.0;
560 for (
int i = 0; i < 3; i++ ) {
561 dpdx +=
b [ i ] * pv.
at(i + 1);
562 dpdy +=
c [ i ] * pv.
at(i + 1);
565 for (
int i = 0; i < 3; i++ ) {
578 answer.
at(1, 1) =
area * (
b [ 0 ] *
b [ 0 ] +
c [ 0 ] *
c [ 0 ] );
579 answer.
at(2, 2) =
area * (
b [ 1 ] *
b [ 1 ] +
c [ 1 ] *
c [ 1 ] );
580 answer.
at(3, 3) =
area * (
b [ 2 ] *
b [ 2 ] +
c [ 2 ] *
c [ 2 ] );
582 answer.
at(1, 2) = answer.
at(2, 1) =
area * (
b [ 0 ] *
b [ 1 ] +
c [ 0 ] *
c [ 1 ] );
583 answer.
at(1, 3) = answer.
at(3, 1) =
area * (
b [ 0 ] *
b [ 2 ] +
c [ 0 ] *
c [ 2 ] );
584 answer.
at(2, 3) = answer.
at(3, 2) =
area * (
b [ 1 ] *
b [ 2 ] +
c [ 1 ] *
c [ 2 ] );
594 double usum, vsum, coeff;
599 double dpdx = 0.0, dpdy = 0.0;
600 for (
int i = 0; i < 3; i++ ) {
601 double pn1 = pv.
at(i + 1);
602 dpdx +=
b [ i ] * pn1;
603 dpdy +=
c [ i ] * pn1;
610 answer.
at(1) = answer.
at(4) = answer.
at(7) = -ar3 * dpdx;
611 answer.
at(2) = answer.
at(5) = answer.
at(8) = -ar3 * dpdy;
616 dpdx = 0.0, dpdy = 0.0;
617 for (
int i = 0; i < 3; i++ ) {
618 double pn1 = pv.
at(i + 1);
619 dpdx +=
b [ i ] * pn1;
620 dpdy +=
c [ i ] * pn1;
623 usum = u.
at(1) + u.
at(3) + u.
at(5);
624 vsum = u.
at(2) + u.
at(4) + u.
at(6);
626 answer.
at(1) -= coeff * dpdx * (
b [ 0 ] * usum +
c [ 0 ] * vsum );
627 answer.
at(4) -= coeff * dpdx * (
b [ 1 ] * usum +
c [ 1 ] * vsum );
628 answer.
at(7) -= coeff * dpdx * (
b [ 2 ] * usum +
c [ 2 ] * vsum );
630 answer.
at(2) -= coeff * dpdy * (
b [ 0 ] * usum +
c [ 0 ] * vsum );
631 answer.
at(5) -= coeff * dpdy * (
b [ 1 ] * usum +
c [ 1 ] * vsum );
632 answer.
at(8) -= coeff * dpdy * (
b [ 2 ] * usum +
c [ 2 ] * vsum );
668 b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5),
669 c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6),
670 b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6) +
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5),
676TR1_2D_CBS :: checkConsistency()
678 double x1, x2, x3, y1, y2, y3;
685 x1 = node1->giveCoordinate(1);
686 x2 = node2->giveCoordinate(1);
687 x3 = node3->giveCoordinate(1);
689 y1 = node1->giveCoordinate(2);
690 y2 = node2->giveCoordinate(2);
691 y3 = node3->giveCoordinate(2);
693 this->
area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
695 b [ 0 ] = ( y2 - y3 ) / ( 2. *
area );
696 c [ 0 ] = ( x3 - x2 ) / ( 2. *
area );
697 b [ 1 ] = ( y3 - y1 ) / ( 2. *
area );
698 c [ 1 ] = ( x1 - x3 ) / ( 2. *
area );
699 b [ 2 ] = ( y1 - y2 ) / ( 2. *
area );
700 c [ 2 ] = ( x2 - x1 ) / ( 2. *
area );
702 return CBSElement :: checkConsistency();
706TR1_2D_CBS :: computeCriticalTimeStep(
TimeStep *tStep)
713 double vn1 = sqrt( u.
at(1) * u.
at(1) + u.
at(2) * u.
at(2) );
714 double vn2 = sqrt( u.
at(3) * u.
at(3) + u.
at(4) * u.
at(4) );
715 double vn3 = sqrt( u.
at(5) * u.
at(5) + u.
at(6) * u.
at(6) );
716 double veln =
max( vn1,
max(vn2, vn3) );
718 double l1 = 1.0 / ( sqrt(
b [ 0 ] *
b [ 0 ] +
c [ 0 ] *
c [ 0 ]) );
719 double l2 = 1.0 / ( sqrt(
b [ 1 ] *
b [ 1 ] +
c [ 1 ] *
c [ 1 ]) );
720 double l3 = 1.0 / ( sqrt(
b [ 2 ] *
b [ 2 ] +
c [ 2 ] *
c [ 2 ]) );
722 double ln =
min( l1,
min(l2, l3) );
726 double dt2 = 0.5 * ln * ln * Re;
728 double dt1 = ln / veln;
729 dt = dt1 * dt2 / ( dt1 + dt2 );
739TR1_2D_CBS :: computeLEPLICVolumeFraction(
const FloatArray &n,
const double p,
LEPlic *matInterface,
bool updFlag)
745 if ( answer > 1.000000001 ) {
753TR1_2D_CBS :: formMaterialVolumePoly(
Polygon &matvolpoly,
LEPlic *matInterface,
763 for (
int i = 1; i <= 3; i++ ) {
769 x = this->
giveNode(i)->giveCoordinate(1);
770 y = this->
giveNode(i)->giveCoordinate(2);
785TR1_2D_CBS :: formVolumeInterfacePoly(
Polygon &matvolpoly,
LEPlic *matInterface,
796 for (
int i = 1; i <= 3; i++ ) {
801 x = this->
giveNode(i)->giveCoordinate(1);
802 y = this->
giveNode(i)->giveCoordinate(2);
805 if ( ( nx * x + ny * y +
p ) >= 0. ) {
806 nodeIn [ i - 1 ] =
true;
808 nodeIn [ i - 1 ] =
false;
812 if ( nodeIn [ 0 ] && nodeIn [ 1 ] && nodeIn [ 2 ] ) {
813 for (
int i = 1; i <= 3; i++ ) {
818 x = this->
giveNode(i)->giveCoordinate(1);
819 y = this->
giveNode(i)->giveCoordinate(2);
827 }
else if ( !( nodeIn [ 0 ] || nodeIn [ 1 ] || nodeIn [ 2 ] ) ) {
830 for (
int i = 1; i <= 3; i++ ) {
831 next = i < 3 ? i + 1 : 1;
832 if ( nodeIn [ i - 1 ] ) {
838 this->
giveNode(i)->giveCoordinate(2) );
844 if ( nodeIn [ next - 1 ] ^ nodeIn [ i - 1 ] ) {
852 x = this->
giveNode(i)->giveCoordinate(1);
853 y = this->
giveNode(i)->giveCoordinate(2);
854 tx = this->
giveNode(next)->giveCoordinate(1) - x;
855 ty = this->
giveNode(next)->giveCoordinate(2) - y;
858 double s, sd = nx * tx + ny * ty;
859 if ( fabs(sd) > 1.e-10 ) {
860 s = ( -
p - ( nx * x + ny * y ) ) / sd;
865 if ( nodeIn [ i - 1 ] ) {
894TR1_2D_CBS :: truncateMatVolume(
const Polygon &matvolpoly,
double &volume)
900 g.
clip(clip, me, matvolpoly);
902 EASValsSetColor(
gc [ 0 ].getActiveCrackColor() );
907 return volume /
area;
911TR1_2D_CBS :: formMyVolumePoly(
Polygon &me,
LEPlic *matInterface,
bool updFlag)
917 for (
int i = 1; i <= 3; i++ ) {
923 x = this->
giveNode(i)->giveCoordinate(1);
924 y = this->
giveNode(i)->giveCoordinate(2);
934TR1_2D_CBS :: computeMyVolume(
LEPlic *matInterface,
bool updFlag)
937 double x1, x2, x3, y1, y2, y3;
945 return 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
959 for (
int i = 1; i <= 3; i++ ) {
964 for (
int i = 1; i <= 3; i++ ) {
965 center.
at(1) += this->
giveNode(i)->giveCoordinate(1);
966 center.
at(2) += this->
giveNode(i)->giveCoordinate(2);
970 center.
times(1. / 3.);
987 for (
int i = 1; i <= es; i++ ) {
988 for (
int j = 1; j <= lc.giveSize(); j++ ) {
989 answer.
at(i) += lc.at(j) * elemvector.at( es * ( j - 1 ) + i );
1009 for (
int i = 1; i <= dofId.
giveSize(); i++ ) {
1012 for (
int j = 1; j <= 3; j++ ) {
1013 sum += lc.
at(j) * elemvector.
at(es * ( j - 1 ) + indx);
1025 OOFEM_ERROR(
"target point not in receiver volume");
1034 CBSElement :: updateYourself(tStep);
1036 LEPlicElementInterface :: updateYourself(tStep);
1043 if ( type == IST_VOFFraction ) {
1048 return CBSElement :: giveIPValue(answer, gp, type, tStep);
1053TR1_2D_CBS :: NodalAveragingRecoveryMI_computeNodalValue(
FloatArray &answer,
int node,
1061TR1_2D_CBS :: SPRNodalRecoveryMI_giveSPRAssemblyPoints(
IntArray &pap)
1070TR1_2D_CBS :: SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(
IntArray &answer,
int pap)
1083TR1_2D_CBS :: SPRNodalRecoveryMI_giveNumberOfIP()
1088TR1_2D_CBS :: SPRNodalRecoveryMI_givePatchType()
1096TR1_2D_CBS :: printOutputAt(FILE *file,
TimeStep *tStep)
1099 CBSElement :: printOutputAt(file, tStep);
1110 CBSElement :: saveContext(stream, mode);
1112 LEPlicElementInterface :: saveContext(stream, mode);
1119 CBSElement :: restoreContext(stream, mode);
1121 LEPlicElementInterface :: restoreContext(stream, mode);
1132 if ( type == IST_VOFFraction ) {
1138 if ( type == IST_Density ) {
1143 return CBSElement :: giveInternalStateAtNode(answer, type, mode, node, tStep);
1153 if ( !
gc.testElementGraphicActivity(
this) ) {
1158 EASValsSetColor(
gc.getElementColor() );
1159 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
1160 EASValsSetEdgeFlag(
true);
1162 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
1163 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
1165 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
1166 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
1168 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveCoordinate(1);
1169 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveCoordinate(2);
1172 go = CreateTriangle3D(
p);
1173 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
1174 EGAttachObject(go, ( EObjectP )
this);
1175 EMAddGraphicsToModel(ESIModel(), go);
1180 int i, indx, result = 0;
1186 if ( !
gc.testElementGraphicActivity(
this) ) {
1202 if ( result != 3 ) {
1206 indx =
gc.giveIntVarIndx();
1208 s [ 0 ] = v1.
at(indx);
1209 s [ 1 ] = v2.
at(indx);
1210 s [ 2 ] = v3.
at(indx);
1215 for ( i = 0; i < 3; i++ ) {
1216 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
1217 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
1222 gc.updateFringeTableMinMax(s, 3);
1223 tr = CreateTriangleWD3D(
p, s [ 0 ], s [ 1 ], s [ 2 ]);
1224 EGWithMaskChangeAttributes(LAYER_MASK, tr);
1225 EMAddGraphicsToModel(ESIModel(), tr);
1227 double landScale =
gc.getLandScale();
1229 for ( i = 0; i < 3; i++ ) {
1230 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
1231 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
1232 p [ i ].z = s [ i ] * landScale;
1236 EASValsSetColor(
gc.getDeformedElementColor() );
1238 EASValsSetFillStyle(FILL_SOLID);
1239 tr = CreateTriangle3D(
p);
1240 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
1242 gc.updateFringeTableMinMax(s, 3);
1243 EASValsSetFillStyle(FILL_SOLID);
1244 tr = CreateTriangleWD3D(
p, s [ 0 ], s [ 1 ], s [ 2 ]);
1245 EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
1248 EMAddGraphicsToModel(ESIModel(), tr);
#define REGISTER_Element(class)
void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode) override
IntArray boundaryCodes
Boundary sides codes.
IntArray boundarySides
Array of boundary sides.
CBSElement(int n, Domain *aDomain)
EIPrimaryFieldInterface()
virtual void giveElementDofIDMask(IntArray &answer) const
Node * giveNode(int i) const
IntArray boundaryLoadArray
void computeVectorOfPrescribed(ValueModeType u, TimeStep *tStep, FloatArray &answer)
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
int numberOfDofMans
Number of dofmanagers.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
IntArray * giveBoundaryLoadArray()
Returns array containing load numbers of boundary loads acting on element.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
CrossSection * giveCrossSection()
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int number
Component number.
void computeVectorOfPressures(ValueModeType mode, TimeStep *tStep, FloatArray &pressures)
void computeVectorOfVelocities(ValueModeType mode, TimeStep *tStep, FloatArray &velocities)
Index giveSize() const
Returns the size of receiver.
void zero()
Zeroes all coefficients of receiver.
void add(const FloatArray &src)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
const FloatArrayF< 6 > & giveDeviatoricStressVector() const
virtual double giveReynoldsNumber()=0
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
void clip(Polygon &result, const Polygon &a, const Polygon &b)
int findFirstIndexOf(int value) const
double giveVolumeFraction()
FloatArray normal
Interface segment normal.
void setPermanentVolumeFraction(double v)
double p
Line constant of line segment representing interface.
double giveTempVolumeFraction()
double vof
Volume fraction of reference fluid in element.
double giveUpdatedXCoordinate(int num)
void giveUpdatedCoordinate(FloatArray &answer, int num)
double giveUpdatedYCoordinate(int num)
NodalAveragingRecoveryModelInterface()
Constructor.
GraphicObj * draw(oofegGraphicContext &, bool filled, int layer=OOFEG_DEBUG_LAYER)
double computeVolume() const
SPRNodalRecoveryModelInterface()
Constructor.
SpatialLocalizerInterface(Element *element)
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag) override
Assembles receiver volume.
static ParamKey IPK_TR1_2D_CBS_vof
double computeMyVolume(LEPlic *matInterface, bool updFlag) override
Computes the volume of receiver.
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
void formVolumeInterfacePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag) override
Assembles receiver material polygon based solely on given interface line.
static ParamKey IPK_TR1_2D_CBS_pvof
double giveTimeIncrement()
Returns solution step associated time increment.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
void setCoords(double x, double y)
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
#define FMElement_PrescribedUnBC
#define FMElement_PrescribedTractionBC
#define FMElement_PrescribedPressureBC
#define FMElement_PrescribedUsBC
FloatArrayF< N > min(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
bcGeomType
Type representing the geometric character of loading.
@ BodyLoadBGT
Distributed body load.
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
InternalStateMode
Determines the mode of internal variable.
double sum(const FloatArray &x)
@ SPRNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
@ EIPrimaryFieldInterfaceType
@ LEPlicElementInterfaceType
@ SpatialLocalizerInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_DEBUG_LAYER
#define OOFEG_VARPLOT_PATTERN_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER
#define PM_UPDATE_PARAMETER_AND_REPORT(_val, _pm, _ir, _componentnum, _paramkey, _prio, _flag)