65 #define TRSUPG_ZERO_VOF 1.e-8 98 answer = {V_u, V_v, P_f};
155 double ar6 = rho *
area / 6.0;
156 double ar12 = rho *
area / 12.0;
158 answer.
at(1, 1) = answer.
at(2, 2) = ar6;
159 answer.
at(4, 4) = answer.
at(5, 5) = ar6;
160 answer.
at(7, 7) = answer.
at(8, 8) = ar6;
162 answer.
at(1, 4) = answer.
at(1, 7) = ar12;
163 answer.
at(4, 1) = answer.
at(4, 7) = ar12;
164 answer.
at(7, 1) = answer.
at(7, 4) = ar12;
166 answer.
at(2, 5) = answer.
at(2, 8) = ar12;
167 answer.
at(5, 2) = answer.
at(5, 8) = ar12;
168 answer.
at(8, 2) = answer.
at(8, 5) = ar12;
179 double mm = rho * this->
area / 3.0;
180 for (
int i = 0; i < 3; i++ ) {
181 answer.
at(i * 3 + 1) = mm;
182 answer.
at(i * 3 + 2) = mm;
191 double ar12, ar3, dudx, dudy, dvdx, dvdy;
193 double adu11, adu21, adu31, adv11, adv21, adv31;
194 double adu12, adu22, adu32, adv12, adv22, adv32;
210 dudx =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
211 dudy =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
212 dvdx =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
213 dvdy =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
215 usum = u.
at(1) + u.
at(3) + u.
at(5);
216 vsum = u.
at(2) + u.
at(4) + u.
at(6);
220 adu11 = ar12 * ( dudx * ( usum + u.
at(1) ) + dudy * ( vsum + u.
at(2) ) );
221 adu21 = ar12 * ( dudx * ( usum + u.
at(3) ) + dudy * ( vsum + u.
at(4) ) );
222 adu31 = ar12 * ( dudx * ( usum + u.
at(5) ) + dudy * ( vsum + u.
at(6) ) );
223 adv11 = ar12 * ( dvdx * ( usum + u.
at(1) ) + dvdy * ( vsum + u.
at(2) ) );
224 adv21 = ar12 * ( dvdx * ( usum + u.
at(3) ) + dvdy * ( vsum + u.
at(4) ) );
225 adv31 = ar12 * ( dvdx * ( usum + u.
at(5) ) + dvdy * ( vsum + u.
at(6) ) );
229 double uu = ( usum * usum + u.
at(1) * u.
at(1) + u.
at(3) * u.
at(3) + u.
at(5) * u.
at(5) );
230 double uv = ( usum * vsum + u.
at(1) * u.
at(2) + u.
at(3) * u.
at(4) + u.
at(5) * u.
at(6) );
231 double vv = ( vsum * vsum + u.
at(2) * u.
at(2) + u.
at(4) * u.
at(4) + u.
at(6) * u.
at(6) );
233 adu12 = dt * 0.5 * ar12 * (
b [ 0 ] * dudx * uu +
b [ 0 ] * dudy * uv +
c [ 0 ] * dudx * uv +
c [ 0 ] * dudy * vv );
234 adu22 = dt * 0.5 * ar12 * (
b [ 1 ] * dudx * uu +
b [ 1 ] * dudy * uv +
c [ 1 ] * dudx * uv +
c [ 1 ] * dudy * vv );
235 adu32 = dt * 0.5 * ar12 * (
b [ 2 ] * dudx * uu +
b [ 2 ] * dudy * uv +
c [ 2 ] * dudx * uv +
c [ 2 ] * dudy * vv );
236 adv12 = dt * 0.5 * ar12 * (
b [ 0 ] * dvdx * uu +
b [ 0 ] * dvdy * uv +
c [ 0 ] * dvdx * uv +
c [ 0 ] * dvdy * vv );
237 adv22 = dt * 0.5 * ar12 * (
b [ 1 ] * dvdx * uu +
b [ 1 ] * dvdy * uv +
c [ 1 ] * dvdx * uv +
c [ 1 ] * dvdy * vv );
238 adv32 = dt * 0.5 * ar12 * (
b [ 2 ] * dvdx * uu +
b [ 2 ] * dvdy * uv +
c [ 2 ] * dvdx * uv +
c [ 2 ] * dvdy * vv );
243 answer.
at(1) = -adu11 - adu12;
244 answer.
at(2) = -adv11 - adv12;
245 answer.
at(4) = -adu21 - adu22;
246 answer.
at(5) = -adv21 - adv22;
247 answer.
at(7) = -adu31 - adu32;
248 answer.
at(8) = -adv31 - adv32;
253 for (
int i = 1; i <= nLoads; i++ ) {
259 answer.
at(1) -= dt * 0.5 * ar3 * (
b [ 0 ] * usum +
c [ 0 ] * vsum ) * gVector.
at(1);
260 answer.
at(2) -= dt * 0.5 * ar3 * (
b [ 0 ] * usum +
c [ 0 ] * vsum ) * gVector.
at(2);
261 answer.
at(4) -= dt * 0.5 * ar3 * (
b [ 1 ] * usum +
c [ 1 ] * vsum ) * gVector.
at(1);
262 answer.
at(5) -= dt * 0.5 * ar3 * (
b [ 1 ] * usum +
c [ 1 ] * vsum ) * gVector.
at(2);
263 answer.
at(7) -= dt * 0.5 * ar3 * (
b [ 2 ] * usum +
c [ 2 ] * vsum ) * gVector.
at(1);
264 answer.
at(8) -= dt * 0.5 * ar3 * (
b [ 2 ] * usum +
c [ 2 ] * vsum ) * gVector.
at(2);
281 double ar3 =
area / 3.0;
284 stress.
times(1. / Re);
289 for (
int i = 0; i < 3; i++ ) {
290 answer.
at(i * 3 + 1) = -
area * ( stress.
at(1) *
b [ i ] + stress.
at(3) *
c [ i ] );
291 answer.
at(i * 3 + 2) = -
area * ( stress.
at(3) *
b [ i ] + stress.
at(2) *
c [ i ] );
298 for (
int i = 1; i <= nLoads; i++ ) {
302 load->computeComponentArrayAt(gVector, tStep, VM_Total);
304 answer.
at(1) += coeff * gVector.
at(1);
305 answer.
at(2) += coeff * gVector.
at(2);
306 answer.
at(4) += coeff * gVector.
at(1);
307 answer.
at(5) += coeff * gVector.
at(2);
308 answer.
at(7) += coeff * gVector.
at(1);
309 answer.
at(8) += coeff * gVector.
at(2);
317 double tx, ty, l, nx, ny;
319 for (
int j = 1; j <= nLoads; j++ ) {
330 n2 = ( n1 == 3 ? 1 : n1 + 1 );
334 l = sqrt(tx * tx + ty * ty);
340 for (
int i = 1; i <= numLoads; i++ ) {
348 answer.
at( ( n1 - 1 ) * 3 + 1 ) += 0.5 * l * ( t.
at(1) * nx );
349 answer.
at( ( n1 - 1 ) * 3 + 2 ) += 0.5 * l * ( t.
at(2) * ny );
351 answer.
at( ( n2 - 1 ) * 3 + 1 ) += 0.5 * l * ( t.
at(1) * nx );
352 answer.
at( ( n2 - 1 ) * 3 + 2 ) += 0.5 * l * ( t.
at(2) * ny );
383 double velu = 0.0, velv = 0.0;
400 u.
add(theta1, ustar);
412 for (
int i = 0; i < 3; i++ ) {
413 velu += u.
at(i * 2 + 1);
414 velv += u.
at(i * 2 + 2);
417 for (
int i = 0; i < 3; i++ ) {
418 answer.
at( ( i + 1 ) * 3 ) =
area * ( (
b [ i ] * velu +
c [ i ] * velv ) ) / 3.0;
424 double tx, ty, l, nx, ny, un1, un2;
437 n2 = ( n1 == 3 ? 1 : n1 + 1 );
443 l = sqrt(tx * tx + ty * ty);
446 un1 = nx * u.
at( ( n1 - 1 ) * 2 + 1 ) + ny *u.
at(n1 * 2);
447 un2 = nx * u.
at( ( n2 - 1 ) * 2 + 1 ) + ny *u.
at(n2 * 2);
450 answer.
at(n1 * 3) -= ( un1 * l / 3. + un2 * l / 6. );
451 answer.
at(n2 * 3) -= ( un2 * l / 3. + un1 * l / 6. );
475 stress.
times(1. / Re);
481 int n1, n2, code, sid;
482 double tx, ty, l, nx, ny, pcoeff;
493 n2 = ( n1 == 3 ? 1 : n1 + 1 );
497 l = sqrt(tx * tx + ty * ty);
504 pcoeff = stress.
at(1) * nx * nx + stress.
at(2) * ny * ny + 2.0 * stress.
at(3) * nx * ny;
505 answer.
at(n1 * 3) += pcoeff;
506 answer.
at(n2 * 3) += pcoeff;
513 for (
int i = 1; i <= nLoads; i++ ) {
524 answer.
at(n1 * 3) -= t.
at(1) * nx + t.
at(2) * ny;
525 answer.
at(n2 * 3) -= t.
at(1) * nx + t.
at(2) * ny;
555 n2 = ( n1 == 3 ? 1 : n1 + 1 );
576 double dpdx = 0.0, dpdy = 0.0;
577 for (
int i = 0; i < 3; i++ ) {
578 dpdx +=
b [ i ] * p.
at(i + 1);
579 dpdy +=
c [ i ] * p.
at(i + 1);
582 for (
int i = 0; i < 3; i++ ) {
595 answer.
at(1, 1) =
area * (
b [ 0 ] *
b [ 0 ] +
c [ 0 ] *
c [ 0 ] );
596 answer.
at(2, 2) =
area * (
b [ 1 ] *
b [ 1 ] +
c [ 1 ] *
c [ 1 ] );
597 answer.
at(3, 3) =
area * (
b [ 2 ] *
b [ 2 ] +
c [ 2 ] *
c [ 2 ] );
599 answer.
at(1, 2) = answer.
at(2, 1) =
area * (
b [ 0 ] *
b [ 1 ] +
c [ 0 ] *
c [ 1 ] );
600 answer.
at(1, 3) = answer.
at(3, 1) =
area * (
b [ 0 ] *
b [ 2 ] +
c [ 0 ] *
c [ 2 ] );
601 answer.
at(2, 3) = answer.
at(3, 2) =
area * (
b [ 1 ] *
b [ 2 ] +
c [ 1 ] *
c [ 2 ] );
611 double usum, vsum, coeff;
616 double dpdx = 0.0, dpdy = 0.0;
617 for (
int i = 0; i < 3; i++ ) {
619 dpdx +=
b [ i ] * pn1;
620 dpdy +=
c [ i ] * pn1;
627 answer.
at(1) = answer.
at(4) = answer.
at(7) = -ar3 * dpdx;
628 answer.
at(2) = answer.
at(5) = answer.
at(8) = -ar3 * dpdy;
633 dpdx = 0.0, dpdy = 0.0;
634 for (
int i = 0; i < 3; i++ ) {
636 dpdx +=
b [ i ] * pn1;
637 dpdy +=
c [ i ] * pn1;
640 usum = u.
at(1) + u.
at(3) + u.
at(5);
641 vsum = u.
at(2) + u.
at(4) + u.
at(6);
643 answer.
at(1) -= coeff * dpdx * (
b [ 0 ] * usum +
c [ 0 ] * vsum );
644 answer.
at(4) -= coeff * dpdx * (
b [ 1 ] * usum +
c [ 1 ] * vsum );
645 answer.
at(7) -= coeff * dpdx * (
b [ 2 ] * usum +
c [ 2 ] * vsum );
647 answer.
at(2) -= coeff * dpdy * (
b [ 0 ] * usum +
c [ 0 ] * vsum );
648 answer.
at(5) -= coeff * dpdy * (
b [ 1 ] * usum +
c [ 1 ] * vsum );
649 answer.
at(8) -= coeff * dpdy * (
b [ 2 ] * usum +
c [ 2 ] * vsum );
685 eps.
at(1) = (
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5) );
686 eps.
at(2) = (
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6) );
687 eps.
at(3) = (
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) );
694 Node *node1, *node2, *node3;
695 double x1, x2, x3, y1, y2, y3;
710 this->
area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
712 b [ 0 ] = ( y2 - y3 ) / ( 2. *
area );
713 c [ 0 ] = ( x3 - x2 ) / ( 2. *
area );
714 b [ 1 ] = ( y3 - y1 ) / ( 2. *
area );
715 c [ 1 ] = ( x1 - x3 ) / ( 2. *
area );
716 b [ 2 ] = ( y1 - y2 ) / ( 2. *
area );
717 c [ 2 ] = ( x2 - x1 ) / ( 2. *
area );
731 double vn1 = sqrt( u.
at(1) * u.
at(1) + u.
at(2) * u.
at(2) );
732 double vn2 = sqrt( u.
at(3) * u.
at(3) + u.
at(4) * u.
at(4) );
733 double vn3 = sqrt( u.
at(5) * u.
at(5) + u.
at(6) * u.
at(6) );
734 double veln =
max( vn1,
max(vn2, vn3) );
736 double l1 = 1.0 / ( sqrt(
b [ 0 ] *
b [ 0 ] +
c [ 0 ] *
c [ 0 ]) );
737 double l2 = 1.0 / ( sqrt(
b [ 1 ] *
b [ 1 ] + c [ 1 ] * c [ 1 ]) );
738 double l3 = 1.0 / ( sqrt(
b [ 2 ] *
b [ 2 ] + c [ 2 ] * c [ 2 ]) );
740 double ln =
min( l1,
min(l2, l3) );
743 dt2 = 0.5 * ln * ln * Re;
746 dt = dt1 * dt2 / ( dt1 + dt2 );
762 if ( answer > 1.000000001 ) {
781 for (
int i = 1; i <= 3; i++ ) {
807 double nx = normal.
at(1), ny = normal.
at(2), x, y;
813 for (
int i = 1; i <= 3; i++ ) {
822 if ( ( nx * x + ny * y + p ) >= 0. ) {
823 nodeIn [ i - 1 ] =
true;
825 nodeIn [ i - 1 ] =
false;
829 if ( nodeIn [ 0 ] && nodeIn [ 1 ] && nodeIn [ 2 ] ) {
830 for (
int i = 1; i <= 3; i++ ) {
844 }
else if ( !( nodeIn [ 0 ] || nodeIn [ 1 ] || nodeIn [ 2 ] ) ) {
847 for (
int i = 1; i <= 3; i++ ) {
848 next = i < 3 ? i + 1 : 1;
849 if ( nodeIn [ i - 1 ] ) {
855 this->
giveNode(i)->giveCoordinate(2) );
861 if ( nodeIn [ next - 1 ] ^ nodeIn [ i - 1 ] ) {
875 double s, sd = nx * tx + ny * ty;
876 if ( fabs(sd) > 1.e-10 ) {
877 s = ( -p - ( nx * x + ny * y ) ) / sd;
882 if ( nodeIn [ i - 1 ] ) {
917 g.
clip(clip, me, matvolpoly);
919 EASValsSetColor(
gc [ 0 ].getActiveCrackColor() );
924 return volume /
area;
935 for (
int i = 1; i <= 3; i++ ) {
953 double x1, x2, x3, y1, y2, y3;
962 return 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
976 for (
int i = 1; i <= 3; i++ ) {
981 for (
int i = 1; i <= 3; i++ ) {
987 center.
times(1. / 3.);
1004 for (
int i = 1; i <= es; i++ ) {
1005 for (
int j = 1; j <= lc.giveSize(); j++ ) {
1006 answer.
at(i) += lc.at(j) * elemvector.at( es * ( j - 1 ) + i );
1026 for (
int i = 1; i <= dofId.
giveSize(); i++ ) {
1029 for (
int j = 1; j <= 3; j++ ) {
1030 sum += lc.
at(j) * elemvector.
at(es * ( j - 1 ) + indx);
1042 OOFEM_ERROR(
"target point not in receiver volume");
1060 if ( type == IST_VOFFraction ) {
1179 if ( type == IST_VOFFraction ) {
1185 if ( type == IST_Density ) {
1207 EASValsSetEdgeFlag(
true);
1219 go = CreateTriangle3D(p);
1220 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
1221 EGAttachObject(go, ( EObjectP )
this);
1222 EMAddGraphicsToModel(ESIModel(), go);
1227 int i, indx, result = 0;
1249 if ( result != 3 ) {
1255 s [ 0 ] = v1.
at(indx);
1256 s [ 1 ] = v2.
at(indx);
1257 s [ 2 ] = v3.
at(indx);
1262 for ( i = 0; i < 3; i++ ) {
1270 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
1271 EGWithMaskChangeAttributes(LAYER_MASK, tr);
1272 EMAddGraphicsToModel(ESIModel(), tr);
1276 for ( i = 0; i < 3; i++ ) {
1279 p [ i ].z = s [ i ] * landScale;
1285 EASValsSetFillStyle(FILL_SOLID);
1286 tr = CreateTriangle3D(p);
1287 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
1290 EASValsSetFillStyle(FILL_SOLID);
1291 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
1292 EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
1295 EMAddGraphicsToModel(ESIModel(), tr);
CrossSection * giveCrossSection()
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...
virtual void computeDiffusionTermsI(FloatArray &answer, TimeStep *)
Calculates contribution from diffusion terms for (*) velocities.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
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.
virtual int checkConsistency()
Used to check consistency and initialize some element geometry data (area,b,c)
The element interface required by ZZNodalRecoveryModel.
contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores context of receiver into given stream.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
void giveUpdatedCoordinate(FloatArray &answer, int num)
Returns updated nodal positions.
IntArray * giveBoundaryLoadArray()
Returns array containing load numbers of boundary loads acting on element.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag)
Assembles receiver volume.
Element interface for LEPlic class representing Lagrangian-Eulerian (moving) material interface...
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
ScalarAlgorithmType getScalarAlgo()
#define FMElement_PrescribedTractionBC
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual int SPRNodalRecoveryMI_giveNumberOfIP()
double computeVolume() const
The element interface required by ZZNodalRecoveryModel.
IntArray boundarySides
Array of boundary sides.
Abstract class representing field of primary variables (those, which are unknown and are typically as...
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual double truncateMatVolume(const Polygon &matvolpoly, double &volume)
Truncates given material polygon to receiver.
bcGeomType
Type representing the geometric character of loading.
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
IntArray boundaryCodes
Boundary sides codes.
#define OOFEG_RAW_GEOMETRY_LAYER
virtual void computePressureLhs(FloatMatrix &answer, TimeStep *tStep)
Calculates the pressure LHS.
void setPermanentVolumeFraction(double v)
Base class for fluid problems.
EPixel getElementEdgeColor()
virtual void giveElementCenter(LEPlic *mat_interface, FloatArray ¢er, bool upd)
Computes the receiver center (in updated Lagrangian configuration).
virtual SPRPatchType SPRNodalRecoveryMI_givePatchType()
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
double giveUpdatedYCoordinate(int num)
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Computes deviatoric stress vector in given integration point and solution step from given total strai...
virtual double giveCoordinate(int i)
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual void computeNumberOfNodalPrescribedTractionPressureContributions(FloatArray &answer, TimeStep *tStep)
Computes number of edges/sides with prescribed traction contributing to node with prescribed pressure...
#define FMElement_PrescribedPressureBC
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual int EIPrimaryFieldI_evaluateFieldVectorAt(FloatArray &answer, PrimaryField &pf, const FloatArray &coords, IntArray &dofId, ValueModeType mode, TimeStep *tStep)
Evaluates the value of field at given point of interest (should be located inside receiver's volume) ...
virtual FEInterpolation * giveInterpolation() const
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
void computeVectorOfPrescribed(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of prescribed unknowns.
double giveTimeIncrement()
Returns solution step associated time increment.
virtual void computeDensityRhsVelocityTerms(FloatArray &answer, TimeStep *tStep)
Computes velocity terms on RHS for density equation.
EPixel getDeformedElementColor()
void updateYourself(TimeStep *tStep)
Class representing a general abstraction for finite element interpolation class.
#define FMElement_PrescribedUnBC
virtual void computeVectorOfPressures(ValueModeType mode, TimeStep *tStep, FloatArray &pressures)
InternalStateType giveIntVarType()
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
This class implements a transport material status information.
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
TR1_2D_CBS(int n, Domain *aDomain)
virtual void computeVectorOfVelocities(ValueModeType mode, TimeStep *tStep, FloatArray &velocities)
virtual void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
void clip(Polygon &result, const Polygon &a, const Polygon &b)
virtual void computeConsistentMassMtrx(FloatMatrix &answer, TimeStep *)
Calculates consistent mass matrix.
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
virtual double computeMyVolume(LEPlic *matInterface, bool updFlag)
Computes the volume of receiver.
IntArray bodyLoadArray
Array containing indexes of loads (body loads and boundary loads are kept separately), that apply on receiver.
Class representing the special graph constructed from two polygons that is used to perform boolean op...
virtual void giveElementDofIDMask(IntArray &answer) const
Returns element dof mask for node.
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void formMaterialVolumePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag)
Assembles the true element material polygon (takes receiver vof into accout).
This class represents CBS algorithm for solving incompressible Navier-Stokes equations.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
InternalStateMode giveIntVarMode()
virtual double computeLEPLICVolumeFraction(const FloatArray &n, const double p, LEPlic *matInterface, bool updFlag)
Computes corresponding volume fraction to given interface position.
Abstract base class representing Lagrangian-Eulerian (moving) material interfaces.
virtual void computePrescribedTractionPressure(FloatArray &answer, TimeStep *tStep)
Computes prescribed pressure due to applied tractions.
Class representing vector of real numbers.
Class representing 2D polygon.
Implementation of matrix containing floating point numbers.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
double giveTempVolumeFraction()
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
virtual void computeDensityRhsPressureTerms(FloatArray &answer, TimeStep *tStep)
Computes pressure terms on RHS for density equation.
IRResultType
Type defining the return values of InputRecord reading operations.
void setCoords(double x, double y)
double giveVolumeFraction()
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void computeDiagonalMassMtrx(FloatArray &answer, TimeStep *)
Calculates diagonal mass matrix.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
double giveUpdatedXCoordinate(int num)
virtual double computeCriticalTimeStep(TimeStep *tStep)
Calculates critical time step.
#define FMElement_PrescribedUsBC
void zero()
Zeroes all coefficients of receiver.
virtual bcGeomType giveBCGeoType() const
Returns geometry character of boundary condition.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
This abstract class represent a general base element class for fluid dynamic problems solved using CB...
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
void times(double s)
Multiplies receiver with scalar.
The spatial localizer element interface associated to spatial localizer.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores context of receiver from given stream.
Class representing vertex.
double vof
Volume fraction of reference fluid in element.
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
void zero()
Zeroes all coefficient of receiver.
InterfaceType
Enumerative type, used to identify interface type.
int min(int i, int j)
Returns smaller value from two given decimals.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
virtual int checkConsistency()
Performs consistency check.
void updateFringeTableMinMax(double *s, int size)
virtual void computeConvectionTermsI(FloatArray &answer, TimeStep *)
Calculates convection component for (*) velocities.
#define OOFEG_DEBUG_LAYER
Load is base abstract class for all loads.
double p
Line constant of line segment representing interface.
GraphicObj * draw(oofegGraphicContext &, bool filled, int layer=OOFEG_DEBUG_LAYER)
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual bcValType giveBCValType() const
Returns receiver load type.
Class implementing node in finite element mesh.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)
Computes components values of load at given point - global coordinates (coordinates given)...
Load * giveLoad(int n)
Service for accessing particular domain load.
#define OOFEG_VARPLOT_PATTERN_LAYER
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...
Class representing integration point in finite element program.
IntArray boundaryLoadArray
FloatArray normal
Interface segment normal.
virtual void formVolumeInterfacePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag)
Assembles receiver material polygon based solely on given interface line.
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
InternalStateMode
Determines the mode of internal variable.
void add(const FloatArray &src)
Adds array src to receiver.
int findFirstIndexOf(int value) const
Finds index of first occurrence of given value in array.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
virtual void computeCorrectionRhs(FloatArray &answer, TimeStep *tStep)
Calculates the RHS of velocity correction step.