62 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 34, 35,
63 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71,
64 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 98, 99, 101, 102, 103, 105, 106, 107};
67 { 5, 6, 7, 1, 2, 3, 13, 14, 15, 9, 10, 11, 33, 34, 35, 42, 43, 44, 39, 40, 41, 36, 37, 38, 69, 70, 71},
68 {17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 72, 73, 74},
69 { 1, 2, 3, 17, 18, 19, 21, 22, 23, 5, 6, 7, 57, 58, 59, 45, 46, 47, 60, 61, 62, 33, 34, 35, 75, 76, 77},
70 { 5, 6, 7, 9, 10, 11, 25, 26, 27, 21, 22, 23, 36, 37, 38, 63, 64, 65, 48, 49, 50, 60, 61, 62, 78, 79, 80},
71 { 9, 10, 11, 13, 14, 15, 29, 30, 31, 25, 26, 27, 39, 40, 41, 66, 67, 68, 51, 52, 53, 63, 64, 65, 81, 82, 83},
72 {13, 14, 15, 1, 2, 3, 17, 18, 19, 29, 30, 31, 42, 43, 44, 57, 58, 59, 54, 55, 56, 66, 67, 68, 84, 85, 86}
101 answer = {V_u, V_v, V_w, P_f};
103 answer = {V_u, V_v, V_w};
111 if ( mtrx == ExternalForcesVector ) {
113 }
else if ( mtrx == InternalForcesVector ) {
116 OOFEM_ERROR(
"Unknown Type of characteristic mtrx.");
124 if ( mtrx == TangentStiffnessMatrix ) {
127 OOFEM_ERROR(
"Unknown Type of characteristic mtrx.");
134 FloatArray a_pressure, a_velocity, devStress, epsp, Nh, dN_V(81);
136 double r_vol, pressure;
143 const FloatArray &lcoords = gp->giveNaturalCoordinates();
147 double dV = detJ * gp->giveWeight();
150 dN_V(k + 0) = B(0, k + 0) = B(5, k + 1) = B(4, k + 2) = dN(j, 0);
151 dN_V(k + 1) = B(1, k + 1) = B(5, k + 0) = B(3, k + 2) = dN(j, 1);
152 dN_V(k + 2) = B(2, k + 2) = B(4, k + 0) = B(3, k + 1) = dN(j, 2);
160 momentum.
add(-pressure * dV, dN_V);
161 conservation.
add(r_vol * dV, Nh);
177 for (
int i = 1; i <= nLoads; i++ ) {
189 for (
int i = 1; i <= nLoads; i++ ) {
202 if ( type != ExternalForcesVector ) {
213 const FloatArray &lcoords = gp->giveNaturalCoordinates();
217 double dA = detJ * gp->giveWeight();
220 for (
int j = 0; j < N.
giveSize(); j++ ) {
221 temparray(3 * j + 0) +=
N(j) * rho * gVector(0) * dA;
222 temparray(3 * j + 1) +=
N(j) * rho * gVector(1) * dA;
223 temparray(3 * j + 2) +=
N(j) * rho * gVector(2) * dA;
235 if ( type != ExternalForcesVector ) {
242 int numberOfSurfaceIPs = ( int ) ceil( ( load->
giveApproxOrder() + 1. ) / 2. ) * 2;
251 const FloatArray &lcoords = gp->giveNaturalCoordinates();
265 for (
int j = 0; j < N.
giveSize(); j++ ) {
266 f(3 * j + 0) +=
N(j) * t(0) * dA;
267 f(3 * j + 1) +=
N(j) * t(1) * dA;
268 f(3 * j + 2) +=
N(j) * t(2) * dA;
283 FloatMatrix B(6, 81), EdB, K, G, Dp, DvT, C, Ed, dN;
284 FloatArray dN_V(81), Nlin, Ep, Cd, tmpA, tmpB;
291 const FloatArray &lcoords = gp->giveNaturalCoordinates();
294 double dV = detJ * gp->giveWeight();
298 dN_V(k + 0) = B(0, k + 0) = B(5, k + 1) = B(4, k + 2) = dN(j, 0);
299 dN_V(k + 1) = B(1, k + 1) = B(5, k + 0) = B(3, k + 2) = dN(j, 1);
300 dN_V(k + 2) = B(2, k + 2) = B(4, k + 0) = B(3, k + 1) = dN(j, 2);
381 for (
int i = 1; i <= n.
giveSize(); i++ ) {
382 answer(0) += n.
at(i) * velocities.
at(i*3-2);
383 answer(1) += n.
at(i) * velocities.
at(i*3-1);
384 answer(2) += n.
at(i) * velocities.
at(i*3);
387 for (
int i = 1; i <= n_lin.
giveSize(); i++ ) {
388 answer(3) += n_lin.
at(i) * pressures.
at(i);
396 if ( type == IST_Pressure ) {
400 }
else if ( node <= 20 ) {
404 answer.
at(1) = 0.5 * (
405 this->
giveNode( eNodes.
at(1) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) +
406 this->
giveNode( eNodes.
at(2) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) );
407 }
else if ( node <= 26 ) {
411 answer.
at(1) = 0.25 * (
412 this->
giveNode( fNodes.
at(1) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) +
413 this->
giveNode( fNodes.
at(2) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) +
414 this->
giveNode( fNodes.
at(3) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) +
415 this->
giveNode( fNodes.
at(4) )->giveDofWithID(P_f)->giveUnknown(VM_Total, tStep) );
417 answer.
at(1) = 0.125 * (
CrossSection * giveCrossSection()
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
void computeExternalForcesVector(FloatArray &answer, TimeStep *tStep)
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
virtual void computeLocalSurfaceMapping(IntArray &nodes, int iSurf)
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.
static IntArray momentum_ordering
Ordering of momentum balance dofs in element. Used to assemble the element stiffness.
static FEI3dHexaLin interpolation_lin
Interpolation for pressure.
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).
static IntArray surf_ordering[6]
Ordering of dofs on surfaces. Used to assemble edge loads (only momentum balance) ...
Hexa21Stokes(int n, Domain *d)
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 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...
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.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual FEInterpolation * giveInterpolation() const
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
Class representing a general abstraction for finite element interpolation class.
virtual void computeVectorOfPressures(ValueModeType mode, TimeStep *tStep, FloatArray &pressures)
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
Computes characteristic vector of receiver of requested type in given time step.
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.
static FEI3dHexaTriQuad interpolation_quad
Interpolation for geometry and velocity.
virtual void computeField(ValueModeType u, TimeStep *tStep, const FloatArray &coords, FloatArray &answer)
Computes the unknown vector interpolated at the specified local coordinates.
DofIDItem
Type representing particular dof type.
virtual FormulationType giveFormulationType()
Specifies is load should take local or global coordinates.
Neumann type (prescribed flux).
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Wrapper around element definition to provide FEICellGeometry interface.
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 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.
void computeInternalForcesVector(FloatArray &answer, TimeStep *tStep)
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
Distributed surface load.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
virtual void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep)
Computes the contribution of the given body load (volumetric).
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.
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.
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.
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.
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
The spatial localizer element interface associated to spatial localizer.
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 updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual void surfaceLocal2global(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
Load is base abstract class for all loads.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
int giveSize() const
Returns the size of receiver.
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
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.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
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.
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.
virtual double surfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
Class representing integration point in finite element program.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
IntArray boundaryLoadArray
Class representing solution step.
static IntArray conservation_ordering
Ordering of conservation 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 bcGeomType giveBCGeoType() const
Returns receiver's load geometry type.
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 .