61 IntArray
Tet21Stokes :: momentum_ordering = {1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19,
62 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34};
65 { 1, 2, 3, 9, 10, 11, 5, 6, 7, 23, 24, 25, 20, 21, 22, 17, 18, 19},
66 { 1, 2, 3, 5, 6, 7, 13, 14, 15, 17, 18, 19, 29, 30, 31, 26, 27, 28},
67 { 5, 6, 7, 9, 10, 11, 13, 14, 15, 20, 21, 22, 32, 33, 34, 29, 30, 31},
68 { 1, 2, 3, 13, 14, 15, 9, 10, 11, 26, 27, 28, 32, 33, 34, 23, 24, 25}
97 answer = {V_u, V_v, V_w, P_f};
99 answer = {V_u, V_v, V_w};
107 if ( mtrx == ExternalForcesVector ) {
109 }
else if ( mtrx == InternalForcesVector ) {
112 OOFEM_ERROR(
"Unknown Type of characteristic mtrx.");
120 if ( mtrx == TangentStiffnessMatrix ) {
123 OOFEM_ERROR(
"Unknown Type of characteristic mtrx.");
130 FloatArray a_pressure, a_velocity, devStress, epsp, Nh, dN_V(30);
132 double r_vol, pressure;
139 const FloatArray &lcoords = gp->giveNaturalCoordinates();
143 double dV = detJ * gp->giveWeight();
146 dN_V(k + 0) = B(0, k + 0) = B(3, k + 1) = B(4, k + 2) = dN(j, 0);
147 dN_V(k + 1) = B(1, k + 1) = B(3, k + 0) = B(5, k + 2) = dN(j, 1);
148 dN_V(k + 2) = B(2, k + 2) = B(4, k + 0) = B(5, k + 1) = dN(j, 2);
156 momentum.
add(-pressure * dV, dN_V);
157 conservation.
add(r_vol * dV, Nh);
168 int load_number, load_id;
177 for (
int i = 1; i <= nLoads; i++ ) {
190 for (
int i = 1; i <= nLoads; i++ ) {
192 if ((bLoad=dynamic_cast<BodyLoad*>(load))) {
204 if ( type != ExternalForcesVector ) {
215 const FloatArray &lcoords = gp->giveNaturalCoordinates();
219 double dA = detJ * gp->giveWeight();
222 for (
int j = 0; j < N.
giveSize(); j++ ) {
223 temparray(3 * j + 0) +=
N(j) * rho * gVector(0) * dA;
224 temparray(3 * j + 1) +=
N(j) * rho * gVector(1) * dA;
225 temparray(3 * j + 2) +=
N(j) * rho * gVector(2) * dA;
237 if ( type != ExternalForcesVector ) {
247 int numberOfSurfaceIPs = ( int ) ceil( ( load->
giveApproxOrder() + 1. ) / 2. ) * 2;
256 const FloatArray &lcoords = gp->giveNaturalCoordinates();
270 for (
int j = 0; j < N.
giveSize(); j++ ) {
271 f(3 * j + 0) +=
N(j) * t(0) * dA;
272 f(3 * j + 1) +=
N(j) * t(1) * dA;
273 f(3 * j + 2) +=
N(j) * t(2) * dA;
286 FloatMatrix B(6, 30), EdB, K, G, Dp, DvT, C, Ed, dN;
287 FloatArray dN_V(30), Nlin, Ep, Cd, tmpA, tmpB;
294 const FloatArray &lcoords = gp->giveNaturalCoordinates();
297 double dV = detJ * gp->giveWeight();
301 dN_V(k + 0) = B(0, k + 0) = B(3, k + 1) = B(4, k + 2) = dN(j, 0);
302 dN_V(k + 1) = B(1, k + 1) = B(3, k + 0) = B(5, k + 2) = dN(j, 1);
303 dN_V(k + 2) = B(2, k + 2) = B(4, k + 0) = B(5, k + 1) = dN(j, 2);
388 for (
int i = 1; i <= n.
giveSize(); i++ ) {
394 for (
int i = 1; i <= n_lin.
giveSize(); i++ ) {
401 if ( type == IST_Pressure ) {
408 answer.
at(1) = 0.5 * (
409 this->
giveNode( eNodes.
at(1) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) +
410 this->
giveNode( eNodes.
at(2) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) );
CrossSection * giveCrossSection()
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
Computes characteristic vector of receiver of requested type in given time step.
static FEI3dTetQuad interpolation_quad
Interpolation for geometry and velocity.
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
Abstract base class for all fluid materials.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
bcGeomType
Type representing the geometric character of loading.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Class implementing element body load, acting over whole element volume (e.g., the dead weight)...
void clear()
Clears receiver (zero size).
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 double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
The key method of class Dof.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
Adds to the receiver the product .
virtual void giveStiffnessMatrices(FloatMatrix &dsdd, FloatArray &dsdp, FloatArray &dedd, double &dedp, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the 4 tangents of the compressible material response in 3D.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Gives the dof ID mask for the element.
virtual FEInterpolation * giveInterpolation() const
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
Class representing a general abstraction for finite element interpolation class.
Tet21Stokes(int n, Domain *d)
virtual void computeVectorOfPressures(ValueModeType mode, TimeStep *tStep, FloatArray &pressures)
virtual void computeBoundarySurfaceLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true)
Computes the contribution of the given load at the given boundary surface in global coordinate system...
static IntArray surf_ordering[4]
Ordering of dofs on surfaces. Used to assemble edge loads (only momentum balance) ...
void computeExternalForcesVector(FloatArray &answer, TimeStep *tStep)
virtual void surfaceEvalN(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of edge interpolation functions (shape functions) at given point.
virtual void computeDeviatoricStressVector(FloatArray &stress_dev, double &epsp_vol, GaussPoint *gp, const FloatArray &eps, double pressure, TimeStep *tStep)
Computes the deviatoric stress vector and volumetric strain rate from given deviatoric strain and pre...
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
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.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
DofIDItem
Type representing particular dof type.
virtual FormulationType giveFormulationType()
Specifies is load should take local or global coordinates.
Neumann type (prescribed flux).
virtual void EIPrimaryUnknownMI_computePrimaryUnknownVectorAtLocal(ValueModeType u, TimeStep *tStep, const FloatArray &coords, FloatArray &answer)
Computes the element vector of primary unknowns at given point in the local coordinate system...
Wrapper around element definition to provide FEICellGeometry interface.
static FEI3dTetLin interpolation_lin
Interpolation for pressure.
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
IntArray bodyLoadArray
Array containing indexes of loads (body loads and boundary loads are kept separately), that apply on receiver.
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
virtual double surfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
virtual int giveApproxOrder()=0
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
virtual bcType giveType() const
Returns receiver load type.
Distributed surface load.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
int numberOfGaussPoints
Number of integration points as specified by nip.
Class representing vector of real numbers.
void plusDyadSymmUpper(const FloatArray &a, double dV)
Adds to the receiver the dyadic product .
This abstract class represent a general base element class for fluid dynamic problems.
Implementation of matrix containing floating point numbers.
static IntArray conservation_ordering
Ordering of conservation dofs in element. Used to assemble the element stiffness. ...
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
virtual void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep)
Computes the contribution of the given body load (volumetric).
void zero()
Zeroes all coefficients of receiver.
virtual bcGeomType giveBCGeoType() const
Returns geometry character of boundary condition.
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
The spatial localizer element interface associated to spatial localizer.
void computeInternalForcesVector(FloatArray &answer, TimeStep *tStep)
virtual void surfaceLocal2global(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
The element interface class related to Element Interpolation Mappers.
void zero()
Zeroes all coefficient of receiver.
InterfaceType
Enumerative type, used to identify interface type.
Load is base abstract class for all loads.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
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.
void assemble(const FloatMatrix &src, const IntArray &loc)
Assembles the contribution using localization array into receiver.
virtual bcValType giveBCValType() const
Returns receiver load type.
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)...
int giveNumberOfRows() const
Returns number of rows of receiver.
Load * giveLoad(int n)
Service for accessing particular domain load.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
Class representing integration point in finite element program.
IntArray boundaryLoadArray
Class representing solution step.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
static IntArray momentum_ordering
Ordering of momentum balance dofs in element. Used to assemble the element stiffness.
int numberOfDofMans
Number of dofmanagers.
void add(const FloatArray &src)
Adds array src to receiver.
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
virtual int SetUpPointsOnTriangle(int nPoints, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .