45 double l1 = lcoords.
at(1);
46 double l2 = lcoords.
at(2);
47 double l3 = 1. - l1 - l2;
50 ( 2. * l1 - 1. ) * l1,
51 ( 2. * l2 - 1. ) * l2,
52 ( 2. * l3 - 1. ) * l3,
69 jacobianMatrix.at(1, 1) += dn.
at(i, 1) * x;
70 jacobianMatrix.at(1, 2) += dn.
at(i, 1) * y;
71 jacobianMatrix.at(2, 1) += dn.
at(i, 2) * x;
72 jacobianMatrix.at(2, 2) += dn.
at(i, 2) * y;
77 return jacobianMatrix.giveDeterminant();
83 double x1, x2, x3, y1, y2, y3, y23, x32, y31, x13, area;
95 area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
97 y23 = ( y2 - y3 ) / ( 2. * area );
98 x32 = ( x3 - x2 ) / ( 2. * area );
100 y31 = ( y3 - y1 ) / ( 2. * area );
101 x13 = ( x1 - x3 ) / ( 2. * area );
103 answer.
at(1, 1) = 4 * y23 * y23;
104 answer.
at(1, 2) = 4 * x32 * x32;
105 answer.
at(1, 3) = 4 * y23 * x32;
107 answer.
at(2, 1) = 4 * y31 * y31;
108 answer.
at(2, 2) = 4 * x13 * x13;
109 answer.
at(2, 3) = 4 * y31 * x13;
111 answer.
at(3, 1) = 4 * y23 * y23 + 8 * y31 * y23 + 4 * y31 * y31;
112 answer.
at(3, 2) = 4 * x32 * x32 + 8 * x13 * x32 + 4 * x13 * x13;
113 answer.
at(3, 3) = 4 * y23 * x32 + 4 * y31 * x32 + 4 * y23 * x13 + 4 * y31 * x13;
115 answer.
at(4, 1) = 8 * y31 * y23;
116 answer.
at(4, 2) = 8 * x13 * x32;
117 answer.
at(4, 3) = 4 * y31 * x32 + 4 * y23 * x13;
119 answer.
at(5, 1) = ( -8 ) * y31 * y23 + ( -8 ) * y31 * y31;
120 answer.
at(5, 2) = ( -8 ) * x13 * x32 + ( -8 ) * x13 * x13;
121 answer.
at(5, 3) = ( -4 ) * y31 * x32 + ( -4 ) * y23 * x13 + ( -8 ) * y31 * x13;
123 answer.
at(6, 1) = ( -8 ) * y23 * y23 + ( -8 ) * y31 * y23;
124 answer.
at(6, 2) = ( -8 ) * x32 * x32 + ( -8 ) * x13 * x32;
125 answer.
at(6, 3) = ( -8 ) * y23 * x32 + ( -4 ) * y31 * x32 + ( -4 ) * y23 * x13;
134 this->
evalN(n, lcoords, cellgeo);
138 for (
int i = 1; i <= 6; i++ ) {
148 double n3, ksi = lcoords.
at(1);
151 answer = { ( 1. - ksi - n3 ) * 0.5, ( 1. + ksi - n3 ) * 0.5, n3 };
164 double xi = lcoords.
at(1);
166 dNdxi.
at(1) = xi - 0.5;
167 dNdxi.
at(2) = xi + 0.5;
168 dNdxi.
at(3) = -2 * xi;
183 double xi = lcoords.
at(1);
196 double xi = lcoords(0);
197 double dN1dxi = -0.5 + xi;
198 double dN2dxi = 0.5 + xi;
199 double dN3dxi = -2.0 * xi;
221 this->
edgeEvalN(n, iedge, lcoords, cellgeo);
236 int aNode = 0, bNode = 0, cNode = 0;
243 }
else if ( iedge == 2 ) {
247 }
else if ( iedge == 3 ) {
255 edgeNodes.
at(1) = aNode;
256 edgeNodes.
at(2) = bNode;
257 edgeNodes.
at(3) = cNode;
271 answer.
at(1, 1) = 4.0 * l1 - 1.0;
272 answer.
at(2, 1) = 0.0;
273 answer.
at(3, 1) = -1.0 * ( 4.0 * l3 - 1.0 );
274 answer.
at(4, 1) = 4.0 * l2;
275 answer.
at(5, 1) = -4.0 * l2;
276 answer.
at(6, 1) = 4.0 * l3 - 4.0 * l1;
278 answer.
at(1, 2) = 0.0;
279 answer.
at(2, 2) = 4.0 * l2 - 1.0;
280 answer.
at(3, 2) = -1.0 * ( 4.0 * l3 - 1.0 );
281 answer.
at(4, 2) = 4.0 * l1;
282 answer.
at(5, 2) = 4.0 * l3 - 4.0 * l2;
283 answer.
at(6, 2) = -4.0 * l1;
291 double x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
312 return fabs( ( 4 * ( -( x4 * y1 ) + x6 * y1 + x4 * y2 - x5 * y2 + x5 * y3 - x6 * y3 ) + x2 * ( y1 - y3 - 4 * y4 + 4 * y5 ) +
313 x1 * ( -y2 + y3 + 4 * y4 - 4 * y6 ) + x3 * ( -y1 + y2 - 4 * y5 + 4 * y6 ) ) / 6 );
318 const double point_tol = 1.0e-3;
320 for (
int i = 1; i <= 2; i++ ) {
321 if ( lcoords.
at(i) < - point_tol ) {
323 }
else if ( lcoords.
at(i) > ( 1. + point_tol ) ) {
328 if ( 1. - lcoords.
at(1) - lcoords.
at(2) < - point_tol ) {
330 }
else if ( 1. - lcoords.
at(1) - lcoords.
at(2) > ( 1. + point_tol ) ) {
342 double x1, x2, x3, y1, y2, y3;
358 return -( x1 * y2 - x2 * y1 + 4 * ( x3 * ( y1 - y2 ) + y3 * ( x2 - x1 ) ) ) / 3.0;
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
double & at(int i)
Coefficient access function.
virtual const FloatArray * giveVertexCoordinates(int i) const =0
Class representing a general abstraction for cell geometry.
virtual double giveArea(const FEICellGeometry &cellgeo) const
Computes the exact area.
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge Jacobian of transformation between local and global coordinates.
virtual void evald2Ndx2(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of second derivatives of interpolation functions (shape functions) at given poin...
virtual void edgeEvaldNds(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual double evalNXIntegral(int iEdge, const FEICellGeometry &cellgeo)
Computes the integral .
Abstract base class representing integration rule.
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual IntegrationRule * giveIntegrationRule(int order)
Sets up a suitable integration rule for numerical integrating over volume.
virtual bool inside(const FloatArray &lcoords) const
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
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.
Implementation of matrix containing floating point numbers.
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
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 int getRequiredNumberOfIntegrationPoints(integrationDomain dType, int approxOrder)
Abstract service.
void zero()
Zeroes all coefficients of receiver.
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 beProductTOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual double edgeEvalNormal(FloatArray &normal, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal on the given edge.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
double normalize()
Normalizes receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
virtual void evaldNdxi(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
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.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.