63FEI2dQuadLin Quad10_2D_SUPG :: velocityInterpolation(1, 2);
67Quad10_2D_SUPG :: Quad10_2D_SUPG(
int n,
Domain *aDomain) :
74Quad10_2D_SUPG :: giveInterpolation()
const
80Quad10_2D_SUPG :: giveInterpolation(
DofIDItem id)
const
90Quad10_2D_SUPG :: giveInternalDofManager(
int i)
const
97Quad10_2D_SUPG :: computeNumberOfDofs()
104Quad10_2D_SUPG :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
111Quad10_2D_SUPG :: giveInternalDofManDofIDMask(
int i,
IntArray &answer)
const
122 SUPGElement2 :: initializeFrom(ir, priority);
129 SUPGElement2 :: giveInputRecord(input);
135Quad10_2D_SUPG :: computeGaussPoints()
191 for (
int i = 1; i <= 4; i++ ) {
192 answer.
at(1, 2 * i - 1) = dn.
at(i, 1) * u.
at(1) + dn.
at(i, 2) * u.
at(2);
193 answer.
at(2, 2 * i) = dn.
at(i, 1) * u.
at(1) + dn.
at(i, 2) * u.
at(2);
206 for (
int i = 1; i <= 4; i++ ) {
207 answer.
at(1, 2 * i - 1) = dn.
at(i, 1);
208 answer.
at(2, 2 * i) = dn.
at(i, 2);
209 answer.
at(3, 2 * i - 1) = dn.
at(i, 2);
210 answer.
at(3, 2 * i) = dn.
at(i, 1);
223 for (
int i = 1; i <= 4; i++ ) {
224 answer.
at(1, 2 * i - 1) = dn.
at(i, 1);
225 answer.
at(1, 2 * i) = dn.
at(i, 2);
238 answer.
at(1, 1) = n.
at(1);
254 for (
int i = 1; i <= 4; i++ ) {
255 dnx.at(i) = dn.
at(i, 1);
256 dny.at(i) = dn.
at(i, 2);
258 u1.at(i) = u.
at(2 * i - 1);
259 u2.
at(i) = u.
at(2 * i);
263 answer.
at(1, 1) = u1.dotProduct(dnx);
264 answer.
at(1, 2) = u1.dotProduct(dny);
288Quad10_2D_SUPG :: updateStabilizationCoeffs(
TimeStep *tStep)
290 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;
319 norm_N =
N.computeFrobeniusNorm();
327 if ( ( norm_N == 0 ) || ( norm_N_d == 0 ) || ( norm_M_d == 0 ) ) {
330 Re = ( norm_un / nu ) * ( norm_N / norm_N_d );
332 t_s1 = norm_N / norm_N_d;
338 t_supg = 1. / sqrt( 1. / ( t_s1 * t_s1 ) + 1. / ( t_s2 * t_s2 ) + 1. / ( t_s3 * t_s3 ) );
342 if ( norm_LSIC == 0 ) {
345 t_lsic = norm_N / norm_LSIC;
350 if ( ( norm_G_c == 0 ) || ( norm_N_c == 0 ) || ( norm_M_c == 0 ) ) {
353 Re = ( norm_un / nu ) * ( norm_N / norm_N_d );
355 t_p1 = norm_G_c / norm_N_c;
361 t_pspg = 1. / sqrt( 1. / ( t_p1 * t_p1 ) + 1. / ( t_p2 * t_p2 ) + 1. / ( t_p3 * t_p3 ) );
478Quad10_2D_SUPG :: giveNumberOfSpatialDimensions()
491 for (
int i = 1; i <= 3; i++ ) {
495 double fix = b [ 0 ] * fi.at(1) + b [ 1 ] * fi.at(2) + b [ 2 ] * fi.at(3);
496 double fiy = c [ 0 ] * fi.at(1) + c [ 1 ] * fi.at(2) + c [ 2 ] * fi.at(3);
497 double norm = sqrt(fix * fix + fiy * fiy);
499 return ( 1. / 3. ) * ( fix * ( un.
at(1) + un.
at(3) + un.
at(5) ) + fiy * ( un.
at(2) + un.
at(4) + un.
at(6) ) ) /
norm;
524Quad10_2D_SUPG :: computeCriticalTimeStep(
TimeStep *tStep)
531Quad10_2D_SUPG :: NodalAveragingRecoveryMI_computeNodalValue(
FloatArray &answer,
int node,
540Quad10_2D_SUPG :: checkConsistency()
542 return SUPGElement :: checkConsistency();
549 SUPGElement :: updateYourself(tStep);
555 if ( type == IST_VOFFraction ) {
567 return SUPGElement :: giveIPValue(answer, gp, type, tStep);
575 SUPGElement :: saveContext(stream, mode);
583 SUPGElement :: restoreContext(stream, mode);
591 double determinant, weight, volume;
597 volume = determinant * weight;
607 double determinant, weight, volume;
612 volume = determinant * weight;
634Quad10_2D_SUPG :: giveLocalVelocityDofMap(
IntArray &map)
641Quad10_2D_SUPG :: giveLocalPressureDofMap(
IntArray &map)
652 return SUPGElement :: giveInternalStateAtNode(answer, type, mode, node, tStep);
661 if ( !
gc.testElementGraphicActivity(
this) ) {
666 EASValsSetColor(
gc.getElementColor() );
667 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
668 EASValsSetEdgeFlag(
true);
670 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
671 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
673 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
674 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
676 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveCoordinate(1);
677 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveCoordinate(2);
680 go = CreateTriangle3D(p);
681 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
682 EGAttachObject(go, ( EObjectP )
this);
683 EMAddGraphicsToModel(ESIModel(), go);
689 int i, indx, result = 0;
695 if ( !
gc.testElementGraphicActivity(
this) ) {
702 if ( (
gc.giveIntVarType() == IST_VOFFraction ) && (
gc.giveIntVarMode() ==
ISM_local ) ) {
705 EASValsSetColor(
gc.getStandardSparseProfileColor() );
727 indx =
gc.giveIntVarIndx();
729 s [ 0 ] = v1.
at(indx);
730 s [ 1 ] = v2.
at(indx);
731 s [ 2 ] = v3.
at(indx);
736 for ( i = 0; i < 3; i++ ) {
737 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
738 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
743 gc.updateFringeTableMinMax(s, 3);
744 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
745 EGWithMaskChangeAttributes(LAYER_MASK, tr);
746 EMAddGraphicsToModel(ESIModel(), tr);
748 double landScale =
gc.getLandScale();
750 for ( i = 0; i < 3; i++ ) {
751 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
752 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
753 p [ i ].z = s [ i ] * landScale;
757 EASValsSetColor(
gc.getDeformedElementColor() );
759 EASValsSetFillStyle(FILL_SOLID);
760 tr = CreateTriangle3D(p);
761 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
763 gc.updateFringeTableMinMax(s, 3);
764 EASValsSetFillStyle(FILL_SOLID);
765 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
766 EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
769 EMAddGraphicsToModel(ESIModel(), tr);
#define REGISTER_Element(class)
Node * giveNode(int i) const
IntArray dofManArray
Array containing dofmanager numbers.
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
CrossSection * giveCrossSection()
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
void computeVectorOfVelocities(ValueModeType mode, TimeStep *tStep, FloatArray &velocities)
double computeNorm() const
double dotProduct(const FloatArray &x) const
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
void beNMatrixOf(const FloatArray &n, int nsd)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
double computeFrobeniusNorm() const
double at(std::size_t i, std::size_t j) const
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Element * giveElement()
Returns corresponding element to receiver.
double giveWeight()
Returns integration weight of receiver.
void enumerate(int maxVal)
LevelSetPCSElementInterface()
double giveLevelSetDofManValue(int i)
Returns level set value in specific node.
virtual void giveElementMaterialMixture(FloatArray &answer, int ielem)=0
NodalAveragingRecoveryModelInterface()
Constructor.
GraphicObj * draw(oofegGraphicContext &, bool filled, int layer=OOFEG_DEBUG_LAYER)
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
void computeMassDeltaTerm(FloatMatrix &answer, TimeStep *tStep)
double computeVolumeAround(GaussPoint *gp) override
void computeAdvectionDeltaTerm(FloatMatrix &answer, TimeStep *tStep)
void computeGradPMatrix(FloatMatrix &answer, GaussPoint *gp) override
void computeAdvectionEpsilonTerm(FloatMatrix &answer, TimeStep *tStep)
void computeAdvectionTerm(FloatMatrix &answer, TimeStep *tStep)
ElementDofManager pressureNode
static FEI2dQuadLin velocityInterpolation
void computeNuMatrix(FloatMatrix &answer, GaussPoint *gp) override
void computeUDotGradUMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) override
void computeLSICTerm(FloatMatrix &answer, TimeStep *tStep)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
static FEI2dQuadConst pressureInterpolation
void computeMassEpsilonTerm(FloatMatrix &answer, TimeStep *tStep)
void computeDivUMatrix(FloatMatrix &answer, GaussPoint *gp) override
SUPGElement2(int n, Domain *aDomain)
void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep) override
double giveTimeIncrement()
Returns solution step associated time increment.
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
double norm(const FloatArray &x)
InternalStateMode
Determines the mode of internal variable.
@ ZZNodalRecoveryModelInterfaceType
@ LevelSetPCSElementInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_VARPLOT_PATTERN_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER