99 answer.
at(1, 2 * i - 1) = dnx.
at(i, 1);
100 answer.
at(2, 2 * i - 0) = dnx.
at(i, 2);
101 answer.
at(3, 2 * i - 1) = dnx.
at(i, 2);
102 answer.
at(3, 2 * i - 0) = dnx.
at(i, 1);
114 for (
auto &gp : *iRule ) {
134 for (
auto &gp : *iRule ) {
141 temp.
at(i, j) = dnx.
at(i, 1) * dnx.
at(j, 1) + dnx.
at(i, 2) * dnx.
at(j, 2);
146 answer.
add(dV, temp);
151 answer.
times(1.0 / rho);
166 for (
auto &gp : *iRule ) {
174 for (
int j = 1; j <= N.
giveSize(); j++ ) {
175 temp.
at(2 * i - 1, j) = N.
at(i) * dnx.
at(j, 1);
176 temp.
at(2 * i, j) = N.
at(i) * dnx.
at(j, 2);
181 answer.
add(dV, temp);
196 for (
auto &gp : *iRule ) {
203 for (
int i = 1; i <= N.
giveSize(); i++ ) {
205 temp.
at(i, 2 * j - 1) = dnx.
at(i, 1) * N.
at(j);
206 temp.
at(i, 2 * j) = dnx.
at(i, 2) * N.
at(j);
211 answer.
add(dV, temp);
238 numberOfGaussPoints = 3;
248 for (
int iEdge = 1; iEdge <= 3; iEdge++ ) {
249 reducedAnswer.
zero();
250 for (
auto &gp : iRule ) {
259 u_presq_edge.
at(1) = u_presq.
at(1);
260 u_presq_edge.
at(2) = u_presq.
at(2);
261 u_presq_edge.
at(3) = u_presq.
at(3);
262 u_presq_edge.
at(4) = u_presq.
at(4);
263 }
else if ( iEdge == 2 ) {
264 u_presq_edge.
at(1) = u_presq.
at(3);
265 u_presq_edge.
at(2) = u_presq.
at(4);
266 u_presq_edge.
at(3) = u_presq.
at(5);
267 u_presq_edge.
at(4) = u_presq.
at(6);
269 u_presq_edge.
at(1) = u_presq.
at(5);
270 u_presq_edge.
at(2) = u_presq.
at(6);
271 u_presq_edge.
at(3) = u_presq.
at(1);
272 u_presq_edge.
at(4) = u_presq.
at(2);
277 reducedAnswer.
add(dV * un, N);
281 answer.
assemble(reducedAnswer, mask);
298 }
else if ( iEdge == 2 ) {
301 }
else if ( iEdge == 3 ) {
305 OOFEM_ERROR(
"giveEdgeDofMapping: wrong edge number");
CrossSection * giveCrossSection()
virtual int giveDefaultIntegrationRule() const
Returns id of default integration rule.
virtual FEInterpolation * givePressureInterpolation()=0
Returns the interpolation for the pressure.
virtual FEInterpolation * giveVelocityInterpolation()=0
Returns the interpolation for velocity.
virtual int checkConsistency()
Performs consistency check.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
Calculates the stiffness matrix.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
~PFEMElement2d()
Destructor.
Abstract base class for all fluid materials.
virtual int checkConsistency()
Performs consistency check.
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver acording to object description stored in input record.
virtual double boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the normal on the requested boundary.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
void computePrescribedRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Calculates the prescribed velocity vector for the right hand side of the pressure equation...
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
Abstract base class representing integration rule.
This abstract class represent a general base element class for fluid dynamic problems solved using PF...
void computeVectorOfPrescribed(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of prescribed unknowns.
virtual void computePressureLaplacianMatrix(FloatMatrix &answer, TimeStep *tStep)
Calculates the pressure laplacian matrix.
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
virtual void computeGradientMatrix(FloatMatrix &answer, TimeStep *tStep)
Calculates the pressure gradient matrix.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Calculates the volume around an edge.
virtual double giveWeight()
Returns integration weight of receiver.
void times(double f)
Multiplies receiver by factor f.
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 double boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the determinant of the transformation Jacobian on the requested boundary.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver acording to object description stored in input record.
virtual void computeDivergenceMatrix(FloatMatrix &answerx, TimeStep *tStep)
Calculates the velocity divergence matrix.
int numberOfGaussPoints
Number of integration points as specified by nip.
void beNMatrixOf(const FloatArray &n, int nsd)
Assigns the receiver to be a repeated diagonal matrix.
Class representing vector of real numbers.
void computeEgdeNVectorAt(FloatArray &answer, int iedge, GaussPoint *gp)
Calculates the shape function vector on an edge.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
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.
virtual void computeBMatrix(FloatMatrix &answer, GaussPoint *gp)
Calculates the element shape function derivative matrix.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Gives the mapping for degrees of freedom on an edge.
void zero()
Zeroes all coefficients of receiver.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
int setUpIntegrationPoints(integrationDomain intdomain, int nPoints, MaterialMode matMode)
Initializes the receiver.
void zero()
Zeroes all coefficient of receiver.
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 clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
void computeEdgeNMatrixAt(FloatMatrix &answer, int iedge, GaussPoint *gp)
Calculates the shape function matrix on an edge.
int giveNumberOfRows() const
Returns number of rows of receiver.
virtual void boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the basis functions on the requested boundary.
Class representing integration point in finite element program.
PFEMElement2d(int n, Domain *d)
Constructor.
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
virtual void giveDeviatoricStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Computes the deviatoric stiffness; .