52 answer.
at(1) = 0.5 * ( ( 1. - x - y ) * ( 2. * ( 1. - x - y ) - 1. ) * ( 1. - z ) - ( 1. - x - y ) * ( 1. - z * z ) );
53 answer.
at(2) = 0.5 * ( x * ( 2. * x - 1. ) * ( 1. - z ) - x * ( 1. - z * z ) );
54 answer.
at(3) = 0.5 * ( y * ( 2. * y - 1. ) * ( 1. - z ) - y * ( 1. - z * z ) );
55 answer.
at(4) = 0.5 * ( ( 1. - x - y ) * ( 2. * ( 1. - x - y ) - 1. ) * ( 1. + z ) - ( 1. - x - y ) * ( 1. - z * z ) );
56 answer.
at(5) = 0.5 * ( x * ( 2. * x - 1. ) * ( 1. + z ) - x * ( 1. - z * z ) );
57 answer.
at(6) = 0.5 * ( y * ( 2. * y - 1. ) * ( 1. + z ) - y * ( 1. - z * z ) );
58 answer.
at(7) = 2. * ( 1. - x - y ) * x * ( 1. - z );
59 answer.
at(8) = 2. * x * y * ( 1. - z );
60 answer.
at(9) = 2. * y * ( 1. - x - y ) * ( 1. - z );
61 answer.
at(10) = 2. * x * ( 1. - x - y ) * ( 1. + z );
62 answer.
at(11) = 2. * x * y * ( 1. + z );
63 answer.
at(12) = 2. * y * ( 1. - x - y ) * ( 1. + z );
64 answer.
at(13) = ( 1. - x - y ) * ( 1. - z * z );
65 answer.
at(14) = x * ( 1. - z * z );
66 answer.
at(15) = y * ( 1. - z * z );
75 for (
int i = 1; i <= 15; i++ ) {
91 answer.
at(1,1) = 1.0; answer.
at(2,1) = 0.0; answer.
at(3,1) = -1.0;
92 answer.
at(1,2) = 0.0; answer.
at(2,2) = 1.0; answer.
at(3,2) = -1.0;
93 answer.
at(1,3) = 0.0; answer.
at(2,3) = 0.0; answer.
at(3,3) = -1.0;
94 answer.
at(1,4) = 1.0; answer.
at(2,4) = 0.0; answer.
at(3,4) = 1.0;
95 answer.
at(1,5) = 0.0; answer.
at(2,5) = 1.0; answer.
at(3,5) = 1.0;
96 answer.
at(1,6) = 0.0; answer.
at(2,6) = 0.0; answer.
at(3,6) = 1.0;
97 answer.
at(1,7) = 0.5; answer.
at(2,7) = 0.5; answer.
at(3,7) = -1.0;
98 answer.
at(1,8) = 0.0; answer.
at(2,8) = 0.5; answer.
at(3,8) = -1.0;
99 answer.
at(1,9) = 0.5; answer.
at(2,9) = 0.0; answer.
at(3,9) = -1.0;
100 answer.
at(1,10) = 0.5; answer.
at(2,10) = 0.5; answer.
at(3,10) = 1.0;
101 answer.
at(1,11) = 0.0; answer.
at(2,11) = 0.5; answer.
at(3,11) = 1.0;
102 answer.
at(1,12) = 0.5; answer.
at(2,12) = 0.0; answer.
at(3,12) = 1.0;
103 answer.
at(1,13) = 1.0; answer.
at(2,13) = 0.0; answer.
at(3,13) = 0.0;
104 answer.
at(1,14) = 0.0; answer.
at(2,14) = 1.0; answer.
at(3,14) = 0.0;
105 answer.
at(1,15) = 0.0; answer.
at(2,15) = 0.0; answer.
at(3,15) = 0.0;
114 this->
evalN(n, lcoords, cellgeo);
118 for (
int i = 1; i <= 15; i++ ) {
151 for (
int i = 1; i <= 15; i++ ) {
168 dN.
at(1, 1) = 1. / 2. - ( z - 1. ) * ( x + y - 1. ) - z * z / 2. - ( ( z - 1. ) * ( 2. * x + 2. * y - 1. ) ) / 2.;
169 dN.
at(2, 1) = z * z / 2. - x * ( z - 1. ) - ( ( 2. * x - 1. ) * ( z - 1. ) ) / 2. - 1 / 2.;
171 dN.
at(4, 1) = ( ( z + 1. ) * ( 2. * x + 2. * y - 1. ) ) / 2. + ( z + 1. ) * ( x + y - 1. ) - z * z / 2. + 1. / 2.;
172 dN.
at(5, 1) = ( ( 2. * x - 1. ) * ( z + 1. ) ) / 2. + x * ( z + 1. ) + z * z / 2. - 1. / 2.;
174 dN.
at(7, 1) = ( z - 1. ) * ( 2. * x + 2. * y - 2. ) + 2. * x * ( z - 1. );
175 dN.
at(8, 1) = -2. * y * ( z - 1. );
176 dN.
at(9, 1) = 2. * y * ( z - 1. );
177 dN.
at(10, 1) = -2. * ( z + 1. ) * ( x + y - 1. ) - 2. * x * ( z + 1. );
178 dN.
at(11, 1) = 2. * y * ( z + 1. );
179 dN.
at(12, 1) = -2. * y * ( z + 1. );
180 dN.
at(13, 1) = z * z - 1.;
181 dN.
at(14, 1) = 1. - z * z;
185 dN.
at(1, 2) = 1. / 2. - ( z - 1. ) * ( x + y - 1. ) - z * z / 2. - ( ( z - 1. ) * ( 2. * x + 2. * y - 1. ) ) / 2.;
187 dN.
at(3, 2) = z * z / 2. - y * ( z - 1. ) - ( ( 2. * y - 1. ) * ( z - 1. ) ) / 2. - 1. / 2.;
188 dN.
at(4, 2) = ( ( z + 1. ) * ( 2. * x + 2. * y - 1. ) ) / 2. + ( z + 1. ) * ( x + y - 1. ) - z * z / 2. + 1. / 2.;
190 dN.
at(6, 2) = ( ( 2. * y - 1. ) * ( z + 1. ) ) / 2. + y * ( z + 1. ) + z * z / 2. - 1. / 2.;
191 dN.
at(7, 2) = 2. * x * ( z - 1. );
192 dN.
at(8, 2) = -2. * x * ( z - 1. );
193 dN.
at(9, 2) = 2. * ( z - 1. ) * ( x + y - 1. ) + 2. * y * ( z - 1. );
194 dN.
at(10, 2) = -2. * x * ( z + 1. );
195 dN.
at(11, 2) = 2. * x * ( z + 1. );
196 dN.
at(12, 2) = -2. * ( z + 1. ) * ( x + y - 1. ) - 2. * y * ( z + 1. );
197 dN.
at(13, 2) = z * z - 1.;
199 dN.
at(15, 2) = 1. - z * z;
202 dN.
at(1, 3) = -z * ( x + y - 1. ) - ( ( 2. * x + 2. * y - 1. ) * ( x + y - 1. ) ) / 2.;
203 dN.
at(2, 3) = x * z - ( x * ( 2. * x - 1. ) ) / 2.;
204 dN.
at(3, 3) = y * z - ( y * ( 2 * y - 1. ) ) / 2.;
205 dN.
at(4, 3) = ( ( 2. * x + 2. * y - 1. ) * ( x + y - 1. ) ) / 2. - z * ( x + y - 1. );
206 dN.
at(5, 3) = ( x * ( 2. * x - 1. ) ) / 2. + x * z;
207 dN.
at(6, 3) = ( y * ( 2. * y - 1. ) ) / 2. + y * z;
208 dN.
at(7, 3) = x * ( 2. * x + 2. * y - 2. );
209 dN.
at(8, 3) = -2. * x * y;
210 dN.
at(9, 3) = 2. * y * ( x + y - 1. );
211 dN.
at(10, 3) = -2. * x * ( x + y - 1. );
212 dN.
at(11, 3) = 2. * x * y;
213 dN.
at(12, 3) = -2. * y * ( x + y - 1. );
214 dN.
at(13, 3) = 2. * z * ( x + y - 1. );
215 dN.
at(14, 3) = -2. * x * z;
216 dN.
at(15, 3) = -2. * y * z;
222 double ksi = lcoords.
at(1);
224 answer.
at(1) = ksi * ( ksi - 1. ) * 0.5;
225 answer.
at(2) = ksi * ( 1. + ksi ) * 0.5;
226 answer.
at(3) = ( 1. - ksi * ksi );
242 this->
edgeEvalN(n, iedge, lcoords, cellgeo);
245 for (
int i = 1; i <= n.
giveSize(); ++i ) {
255 edgeNodes = {1, 2, 7};
256 }
else if ( iedge == 2 ) {
257 edgeNodes = {2, 3, 8};
258 }
else if ( iedge == 3 ) {
259 edgeNodes = {3, 1, 9};
260 }
else if ( iedge == 4 ) {
261 edgeNodes = {4, 5, 10};
262 }
else if ( iedge == 5 ) {
263 edgeNodes = {5, 6, 11};
264 }
else if ( iedge == 6 ) {
265 edgeNodes = {6, 4, 12};
266 }
else if ( iedge == 7 ) {
267 edgeNodes = {1, 4, 13};
268 }
else if ( iedge == 8 ) {
269 edgeNodes = {2, 5, 14};
270 }
else if ( iedge == 9 ) {
271 edgeNodes = {3, 6, 15};
295 answer.
at(1) = ( 2. * l1 - 1. ) * l1;
296 answer.
at(2) = ( 2. * l2 - 1. ) * l2;
297 answer.
at(3) = ( 2. * l3 - 1. ) * l3;
298 answer.
at(4) = 4. * l1 * l2;
299 answer.
at(5) = 4. * l2 * l3;
300 answer.
at(6) = 4. * l3 * l1;
302 double ksi = lcoords.
at(1);
303 double eta = lcoords.
at(2);
306 answer.
at(1) = ( 1. + ksi ) * ( 1. + eta ) * 0.25 * ( ksi + eta - 1. );
307 answer.
at(2) = ( 1. - ksi ) * ( 1. + eta ) * 0.25 * ( -ksi + eta - 1. );
308 answer.
at(3) = ( 1. - ksi ) * ( 1. - eta ) * 0.25 * ( -ksi - eta - 1. );
309 answer.
at(4) = ( 1. + ksi ) * ( 1. - eta ) * 0.25 * ( ksi - eta - 1. );
310 answer.
at(5) = 0.5 * ( 1. - ksi * ksi ) * ( 1. + eta );
311 answer.
at(6) = 0.5 * ( 1. - ksi ) * ( 1. - eta * eta );
312 answer.
at(7) = 0.5 * ( 1. - ksi * ksi ) * ( 1. - eta );
313 answer.
at(8) = 0.5 * ( 1. + ksi ) * ( 1. - eta * eta );
329 for (
int i = 1; i <= n.
giveSize(); ++i ) {
339 nodes = {1, 2, 3, 7, 8, 9};
340 }
else if ( isurf == 2 ) {
341 nodes = {4, 5, 6, 10, 11, 12};
342 }
else if ( isurf == 3 ) {
343 nodes = {1, 2, 5, 4, 7, 14, 10, 13};
344 }
else if ( isurf == 4 ) {
345 nodes = {2, 3, 6, 5, 8, 15, 11, 14};
346 }
else if ( isurf == 5 ) {
347 nodes = {3, 1, 4, 6, 9, 13, 12, 15};
369 dNdksi(0) = 4.0 * l1 - 1.0;
371 dNdksi(2) = -1.0 * ( 4.0 * l3 - 1.0 );
372 dNdksi(3) = 4.0 * l2;
373 dNdksi(4) = -4.0 * l2;
374 dNdksi(5) = 4.0 * l3 - 4.0 * l1;
378 dNdeta(1) = 4.0 * l2 - 1.0;
379 dNdeta(2) = -1.0 * ( 4.0 * l3 - 1.0 );
380 dNdeta(3) = 4.0 * l1;
381 dNdeta(4) = 4.0 * l3 - 4.0 * l2;
382 dNdeta(5) = -4.0 * l1;
389 dNdksi.
at(1) = 0.25 * ( 1. + eta ) * ( 2.0 * ksi + eta );
390 dNdksi.
at(2) = -0.25 * ( 1. + eta ) * ( -2.0 * ksi + eta );
391 dNdksi.
at(3) = -0.25 * ( 1. - eta ) * ( -2.0 * ksi - eta );
392 dNdksi.
at(4) = 0.25 * ( 1. - eta ) * ( 2.0 * ksi - eta );
393 dNdksi.
at(5) = -ksi * ( 1. + eta );
394 dNdksi.
at(6) = -0.5 * ( 1. - eta * eta );
395 dNdksi.
at(7) = -ksi * ( 1. - eta );
396 dNdksi.
at(8) = 0.5 * ( 1. - eta * eta );
399 dNdeta.
at(1) = 0.25 * ( 1. + ksi ) * ( 2.0 * eta + ksi );
400 dNdeta.
at(2) = 0.25 * ( 1. - ksi ) * ( 2.0 * eta - ksi );
401 dNdeta.
at(3) = -0.25 * ( 1. - ksi ) * ( -2.0 * eta - ksi );
402 dNdeta.
at(4) = -0.25 * ( 1. + ksi ) * ( -2.0 * eta + ksi );
403 dNdeta.
at(5) = 0.5 * ( 1. - ksi * ksi );
404 dNdeta.
at(6) = -eta * ( 1. - ksi );
405 dNdeta.
at(7) = -0.5 * ( 1. - ksi * ksi );
406 dNdeta.
at(8) = -eta * ( 1. + ksi );
409 for (
int i = 1; i <= snodes.
giveSize(); ++i ) {
435 int pointsTriangle = 1;
444 if ( boundary <= 2 ) {
double giveDeterminant() const
Returns the trace (sum of diagonal components) of the receiver.
virtual void giveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Gives the jacobian matrix at the local coordinates.
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
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 surfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal out of the surface at given point.
double & at(int i)
Coefficient access function.
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 const FloatArray * giveVertexCoordinates(int i) const =0
virtual int SetUpPointsOnWedge(int nPointsTri, int nPointsDepth, MaterialMode mode)
Sets up receiver's integration points on a wedge integration domain.
Class representing a general abstraction for cell geometry.
void clear()
Clears receiver (zero size).
virtual void giveLocalNodeCoords(FloatMatrix &answer)
Returns a matrix containing the local coordinates for each node corresponding to the interpolation...
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
virtual int SetUpPointsOnSquare(int, MaterialMode mode)
Sets up receiver's integration points on unit square integration domain.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual IntegrationRule * giveBoundaryIntegrationRule(int order, int boundary)
Sets up a suitable integration rule for integrating over the requested boundary.
Abstract base class representing integration rule.
virtual IntegrationRule * giveIntegrationRule(int order)
Sets up a suitable integration rule for numerical integrating over volume.
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 computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
virtual double surfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
double at(int i, int j) const
Coefficient access function.
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 void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
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.
virtual void surfaceLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
void setColumn(const FloatArray &src, int c)
Sets the values of the matrix in specified column.
virtual void computeLocalSurfaceMapping(IntArray &nodes, int iSurf)
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
virtual int SetUpPointsOnTriangle(int, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
void giveLocalDerivative(FloatMatrix &dN, const FloatArray &lcoords)
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 beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates local coordinates from given global ones.
double normalize()
Normalizes receiver.
#define OOFEM_WARNING(...)
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
void add(const FloatArray &src)
Adds array src to receiver.
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.