51 OOFEM_ERROR(
"FEI3dTrQuad :: evaldNdx - Not supported");
74 n.
at(1) = 4.0 * l1 - 1.0;
76 n.
at(3) = -1.0 * ( 4.0 * l3 - 1.0 );
79 n.
at(6) = 4.0 * l3 - 4.0 * l1;
94 n.
at(2) = 4.0 * l2 - 1.0;
95 n.
at(3) = -1.0 * ( 4.0 * l3 - 1.0 );
97 n.
at(5) = 4.0 * l3 - 4.0 * l2;
108 answer.
at(1,1) = 1.0;
109 answer.
at(1,2) = 0.0;
110 answer.
at(1,3) = 0.0;
111 answer.
at(1,4) = 0.5;
112 answer.
at(1,5) = 0.0;
113 answer.
at(1,6) = 0.5;
115 answer.
at(2,1) = 0.0;
116 answer.
at(2,2) = 1.0;
117 answer.
at(2,3) = 0.0;
118 answer.
at(2,4) = 0.5;
119 answer.
at(2,5) = 0.5;
120 answer.
at(2,6) = 0.0;
129 this->
evalN(n, lcoords, cellgeo);
131 for (
int i = 1; i <= 6; ++i ) {
136 #define POINT_TOL 1.e-3 148 double detJ, x1, x2, x3, y1, y2, y3;
159 detJ = x1*(y2 - y3) + x2*(-y1 + y3) + x3*(y1 - y2);
161 answer.
at(1) = ( ( x2 * y3 - x3 * y2 ) + ( y2 - y3 ) * gcoords.
at(xind) + ( x3 - x2 ) * gcoords.
at(yind) ) / detJ;
162 answer.
at(2) = ( ( x3 * y1 - x1 * y3 ) + ( y3 - y1 ) * gcoords.
at(xind) + ( x1 - x3 ) * gcoords.
at(yind) ) / detJ;
163 answer.
at(3) = 1. - answer.
at(1) - answer.
at(2);
167 for (
int i = 1; i <= 3; i++ ) {
192 double xi = lcoords.
at(1);
194 answer(0) = 0.5 * ( xi - 1.0 ) * xi;
195 answer(1) = 0.5 * ( xi + 1.0 ) * xi;
196 answer(2) = 1.0 - xi * xi;
211 double xi = lcoords.
at(1);
213 answer(0) = xi - 0.5;
214 answer(1) = xi + 0.5;
225 this->
edgeEvalN(N, iedge, lcoords, cellgeo);
228 for (
int i = 0; i < N.
giveSize(); ++i ) {
239 double u = lcoords.
at(1);
251 int aNode = 0, bNode = 0, cNode = 0;
258 }
else if ( iedge == 2 ) {
262 }
else if ( iedge == 3 ) {
270 edgeNodes.
at(1) = aNode;
271 edgeNodes.
at(2) = bNode;
272 edgeNodes.
at(3) = cNode;
286 double l1 = lcoords.
at(1);
287 double l2 = lcoords.
at(2);
288 double l3 = 1. - l1 - l2;
292 answer.
at(1) = ( 2. * l1 - 1. ) * l1;
293 answer.
at(2) = ( 2. * l2 - 1. ) * l2;
294 answer.
at(3) = ( 2. * l3 - 1. ) * l3;
295 answer.
at(4) = 4. * l1 * l2;
296 answer.
at(5) = 4. * l2 * l3;
297 answer.
at(6) = 4. * l3 * l1;
309 for (
int i = 1; i <= 6; ++i ) {
310 answer.
at(i, 1) = dndxi.at(i);
311 answer.
at(i, 2) = dndeta.
at(i);
326 for (
int i = 0; i < N.
giveSize(); ++i ) {
347 for (
int i = 0; i < 6; ++i ) {
373 jacobianMatrix.
resize(3, 3);
374 jacobianMatrix.
at(1, 1) = G1.
at(1);
375 jacobianMatrix.
at(1, 2) = G2.
at(1);
376 jacobianMatrix.
at(1, 3) = G3.
at(1);
377 jacobianMatrix.
at(2, 1) = G1.
at(2);
378 jacobianMatrix.
at(2, 2) = G2.
at(2);
379 jacobianMatrix.
at(2, 3) = G3.
at(2);
380 jacobianMatrix.
at(3, 1) = G1.
at(3);
381 jacobianMatrix.
at(3, 2) = G2.
at(3);
382 jacobianMatrix.
at(3, 3) = G3.
at(3);
415 OOFEM_ERROR(
"FEI3dTrQuad :: giveBoundaryIntegrationRule - Not supported");
425 double x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
446 return (4*(-(x4*y1) + x6*y1 + x4*y2 - x5*y2 + x5*y3 - x6*y3) + x2*(y1 - y3 - 4*y4 + 4*y5) +
447 x1*(-y2 + y3 + 4*y4 - 4*y6) + x3*(-y1 + y2 - 4*y5 + 4*y6))/6;
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
Computes vector product (or cross product) of vectors given as parameters, , and stores the result in...
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 edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
double & at(int i)
Coefficient access function.
virtual const FloatArray * giveVertexCoordinates(int i) const =0
virtual IntegrationRule * giveIntegrationRule(int order)
Sets up a suitable integration rule for numerical integrating over volume.
Class representing a general abstraction for cell geometry.
void clear()
Clears receiver (zero size).
virtual void evaldNdxi(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
void surfaceEvalBaseVectorsAt(FloatArray &G1, FloatArray &G2, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
virtual void giveLocalNodeCoords(FloatMatrix &answer)
Returns a matrix containing the local coordinates for each node corresponding to the interpolation...
void giveDerivativeEta(FloatArray &n, const FloatArray &lcoords)
double edgeComputeLength(IntArray &edgeNodes, const FEICellGeometry &cellgeo)
virtual void giveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Gives the jacobian matrix at the local coordinates.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual void surfaceLocal2global(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
virtual void surfaceGiveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Abstract base class representing integration rule.
virtual double surfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates local coordinates from given global ones.
void edgeEvaldNdxi(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
Class representing vector of real numbers.
virtual IntegrationRule * giveBoundaryIntegrationRule(int order, int boundary)
Sets up a suitable integration rule for integrating over the requested boundary.
Implementation of matrix containing floating point numbers.
double giveArea(const FEICellGeometry &cellgeo) const
virtual void surfaceEvaldNdx(FloatMatrix &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
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 edgeEvaldNdx(FloatMatrix &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
virtual int getRequiredNumberOfIntegrationPoints(integrationDomain dType, int approxOrder)
Abstract service.
virtual double surfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal out of the surface at given point.
void times(double s)
Multiplies receiver with scalar.
virtual int SetUpPointsOnTriangle(int, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
void zero()
Zeroes all coefficient of receiver.
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.
void giveDerivativeXi(FloatArray &n, const FloatArray &lcoords)
void surfaceEvaldNdxi(FloatMatrix &answer, const FloatArray &lcoords)
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of edge interpolation functions (shape functions) at given point.
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.
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
void add(const FloatArray &src)
Adds array src to receiver.
virtual void computeLocalSurfaceMapping(IntArray &edgeNodes, int iedge)
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.