45 double x1, x2, x3, x4, y1, y2, y3, y4;
46 double x85, x56, x67, x78, y85, y56, y67, y78;
77 double p1 = ( x2 - x4 ) * ( y1 - y3 ) - ( x1 - x3 ) * ( y2 - y4 );
78 double p2 = y1 * x85 + y2 * x56 + y3 * x67 + y4 * x78 - x1 * y85 - x2 * y56 - x3 * y67 - x4 * y78;
80 return fabs(p1 + p2 * 4.0) / 6.;
92 ( 1. + ksi ) * ( 1. + eta ) * 0.25 * ( ksi + eta - 1. ),
93 ( 1. - ksi ) * ( 1. + eta ) * 0.25 * ( -ksi + eta - 1. ),
94 ( 1. - ksi ) * ( 1. - eta ) * 0.25 * ( -ksi - eta - 1. ),
95 ( 1. + ksi ) * ( 1. - eta ) * 0.25 * ( ksi - eta - 1. ),
96 0.5 * ( 1. - ksi * ksi ) * ( 1. + eta ),
97 0.5 * ( 1. - ksi ) * ( 1. - eta * eta ),
98 0.5 * ( 1. - ksi * ksi ) * ( 1. - eta ),
99 0.5 * ( 1. + ksi ) * ( 1. - eta * eta )
113 jacobianMatrix.at(1, 1) += dn.
at(i, 1) * x;
114 jacobianMatrix.at(1, 2) += dn.
at(i, 1) * y;
115 jacobianMatrix.at(2, 1) += dn.
at(i, 2) * x;
116 jacobianMatrix.at(2, 2) += dn.
at(i, 2) * y;
121 return jacobianMatrix.giveDeterminant();
129 this->
evalN(n, lcoords, cellgeo);
133 for (
int i = 1; i <= n.
giveSize(); i++ ) {
148 const double point_tol = 1.0e-3;
150 for (
int i = 1; i <= 2; i++ ) {
151 if ( lcoords.
at(i) < ( -1. - point_tol ) ) {
153 }
else if ( lcoords.
at(i) > ( 1. + point_tol ) ) {
167 double n3, ksi = lcoords.
at(1);
170 answer = { ( 1. - ksi - n3 ) * 0.5, ( 1. + ksi - n3 ) * 0.5, n3 };
177 double ksi = lcoords.
at(1);
178 answer = { ksi - 0.5, ksi + 0.5, ksi * 2.0 };
188 this->
edgeEvalN(n, iedge, lcoords, cellgeo);
203 int aNode = 0, bNode = 0, cNode = 0;
210 }
else if ( iedge == 2 ) {
214 }
else if ( iedge == 3 ) {
218 }
else if ( iedge == 4 ) {
226 edgeNodes.
at(1) = aNode;
227 edgeNodes.
at(2) = bNode;
228 edgeNodes.
at(3) = cNode;
235 double xi = lcoords(0);
236 double dN1dxi = -0.5 + xi;
237 double dN2dxi = 0.5 + xi;
238 double dN3dxi = -2.0 * xi;
262 answer.
at(1, 1) = 0.25 * ( 1. + eta ) * ( 2.0 * ksi + eta );
263 answer.
at(2, 1) = -0.25 * ( 1. + eta ) * ( -2.0 * ksi + eta );
264 answer.
at(3, 1) = -0.25 * ( 1. - eta ) * ( -2.0 * ksi - eta );
265 answer.
at(4, 1) = 0.25 * ( 1. - eta ) * ( 2.0 * ksi - eta );
266 answer.
at(5, 1) = -ksi * ( 1. + eta );
267 answer.
at(6, 1) = -0.5 * ( 1. - eta * eta );
268 answer.
at(7, 1) = -ksi * ( 1. - eta );
269 answer.
at(8, 1) = 0.5 * ( 1. - eta * eta );
271 answer.
at(1, 2) = 0.25 * ( 1. + ksi ) * ( 2.0 * eta + ksi );
272 answer.
at(2, 2) = 0.25 * ( 1. - ksi ) * ( 2.0 * eta - ksi );
273 answer.
at(3, 2) = -0.25 * ( 1. - ksi ) * ( -2.0 * eta - ksi );
274 answer.
at(4, 2) = -0.25 * ( 1. + ksi ) * ( -2.0 * eta + ksi );
275 answer.
at(5, 2) = 0.5 * ( 1. - ksi * ksi );
276 answer.
at(6, 2) = -eta * ( 1. - ksi );
277 answer.
at(7, 2) = -0.5 * ( 1. - ksi * ksi );
278 answer.
at(8, 2) = -eta * ( 1. + ksi );
287 double x1, x2, x3, y1, y2, y3;
303 return -( x1 * y2 - x2 * y1 + 4 * ( x3 * ( y1 - y2 ) + y3 * ( x2 - x1 ) ) ) / 3.0;
325 this->
evalN( N, lcoords, cellgeo);
328 for (
int i = 1; i <= 8; i++ ) {
343 this->
edgeEvalN(n, iedge, lcoords, cellgeo);
virtual double boundaryEdgeGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
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.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
virtual double giveCharacteristicLength(const FEICellGeometry &cellgeo) const
Returns a characteristic length of the geometry, typically a diagonal or edge length.
double & at(int i)
Coefficient access function.
virtual const FloatArray * giveVertexCoordinates(int i) const =0
Class representing a general abstraction for cell geometry.
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
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 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.
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.
Abstract base class representing integration rule.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
virtual double edgeEvalNormal(FloatArray &normal, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal on the given edge.
virtual double boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual IntegrationRule * giveIntegrationRule(int order)
Sets up a suitable integration rule for numerical integrating over volume.
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.
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 evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
void zero()
Zeroes all coefficients of receiver.
virtual double giveArea(const FEICellGeometry &cellgeo) const
Computes the exact area.
void beProductTOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual bool inside(const FloatArray &lcoords) const
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.
double normalize()
Normalizes receiver.
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
int giveNumberOfRows() const
Returns number of rows of receiver.
virtual double evalNXIntegral(int iEdge, const FEICellGeometry &cellgeo)
Computes the integral .
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge Jacobian of transformation between local and global coordinates.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.