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);
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);
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);
227 answer.
at(1, 1) = n.
at(1);
243 for (
int i = 1; i <= 4; i++ ) {
244 dnx.at(i) = dn.
at(i, 1);
245 dny.at(i) = dn.
at(i, 2);
247 u1.at(i) = u.
at(2 * i - 1);
248 u2.
at(i) = u.
at(2 * i);
252 answer.
at(1, 1) = u1.dotProduct(dnx);
253 answer.
at(1, 2) = u1.dotProduct(dny);
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;
316 if ( ( norm_N == 0 ) || ( norm_N_d == 0 ) || ( norm_M_d == 0 ) ) {
319 Re = ( norm_un / nu ) * ( norm_N / norm_N_d );
321 t_s1 = norm_N / norm_N_d;
327 t_supg = 1. / sqrt( 1. / ( t_s1 * t_s1 ) + 1. / ( t_s2 * t_s2 ) + 1. / ( t_s3 * t_s3 ) );
331 if ( norm_LSIC == 0 ) {
334 t_lsic = norm_N / norm_LSIC;
339 if ( ( norm_G_c == 0 ) || ( norm_N_c == 0 ) || ( norm_M_c == 0 ) ) {
342 Re = ( norm_un / nu ) * ( norm_N / norm_N_d );
344 t_p1 = norm_G_c / norm_N_c;
350 t_pspg = 1. / sqrt( 1. / ( t_p1 * t_p1 ) + 1. / ( t_p2 * t_p2 ) + 1. / ( t_p3 * t_p3 ) );
480 for (
int i = 1; i <= 3; i++ ) {
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);
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;
544 if ( type == IST_VOFFraction ) {
599 double determinant, weight, volume;
605 volume = determinant * weight;
615 double determinant, weight, volume;
620 volume = determinant * weight;
676 EASValsSetEdgeFlag(
true);
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);
697 int i, indx, result = 0;
737 s [ 0 ] = v1.
at(indx);
738 s [ 1 ] = v2.
at(indx);
739 s [ 2 ] = v3.
at(indx);
744 for ( i = 0; i < 3; i++ ) {
752 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
753 EGWithMaskChangeAttributes(LAYER_MASK, tr);
754 EMAddGraphicsToModel(ESIModel(), tr);
758 for ( i = 0; i < 3; i++ ) {
761 p [ i ].z = s [ i ] * landScale;
767 EASValsSetFillStyle(FILL_SOLID);
768 tr = CreateTriangle3D(p);
769 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
772 EASValsSetFillStyle(FILL_SOLID);
773 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
774 EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
777 EMAddGraphicsToModel(ESIModel(), tr);
CrossSection * giveCrossSection()
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.
IntArray dofManArray
Array containing dofmanager numbers.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element'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.
EPixel getStandardSparseProfileColor()
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual ~Quad10_2D_SUPG()
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.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
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.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual void computeAdvectionDeltaTerm(FloatMatrix &answer, TimeStep *tStep)
virtual void computeNuMatrix(FloatMatrix &answer, GaussPoint *gp)
double & at(int i)
Coefficient access function.
double giveLevelSetDofManValue(int i)
Returns level set value in specific node.
virtual void computeGradPMatrix(FloatMatrix &answer, GaussPoint *gp)
#define OOFEG_RAW_GEOMETRY_LAYER
Element interface for LevelSetPCS class representing level-set like material interface.
Class representing a general abstraction for surface finite element interpolation class...
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.
EPixel getElementEdgeColor()
virtual MaterialInterface * giveMaterialInterface(int n)
Returns material interface representation for given domain.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
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 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.
virtual int giveNumberOfSpatialDimensions()
Base class for dof managers.
virtual void computeNpMatrix(FloatMatrix &answer, GaussPoint *gp)
Element * giveElement()
Returns corresponding element to receiver.
virtual int checkConsistency()
Performs consistency check.
int giveNumber()
Returns domain number.
virtual double giveCoordinate(int i)
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual void giveLocalVelocityDofMap(IntArray &map)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
This abstract class represent a general base element class for fluid dynamic problems.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
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.
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...
EPixel getDeformedElementColor()
Class representing a general abstraction for finite element interpolation class.
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
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)
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
DofIDItem
Type representing particular dof type.
static FEI2dQuadConst pressureInterpolation
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
Abstract base class representing (moving) material interfaces.
double t_supg
Stabilization coefficients, updated for each solution step in updateStabilizationCoeffs() ...
Wrapper around element definition to provide FEICellGeometry interface.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual void giveLocalPressureDofMap(IntArray &map)
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
double at(int i, int j) const
Coefficient access function.
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.
InternalStateMode giveIntVarMode()
void beNMatrixOf(const FloatArray &n, int nsd)
Assigns the receiver to be a repeated diagonal matrix.
Class representing vector of real numbers.
Class representing 2D polygon.
Implementation of matrix containing floating point numbers.
double computeFrobeniusNorm() const
Computes the Frobenius norm of the receiver.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Abstract base class representing Level Set representation of material interfaces. ...
double norm(const FloatArray &x)
double computeNorm() const
Computes the norm (or length) of the vector.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
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...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
virtual void computeDivUMatrix(FloatMatrix &answer, GaussPoint *gp)
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
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...
void zero()
Zeroes all coefficient of receiver.
InterfaceType
Enumerative type, used to identify interface type.
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)
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.
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...
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
virtual int checkConsistency()
Performs consistency check.
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.
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 drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
#define OOFEG_VARPLOT_PATTERN_LAYER
Class representing integration point in finite element program.
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 solution step.
int numberOfDofMans
Number of dofmanagers.
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.
virtual DofManager * giveInternalDofManager(int i) const
Returns i-th internal element dof manager of the receiver.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
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.