46 return sqrt(x2_x1 * x2_x1 + y2_y1 * y2_y1);
51 double ksi = lcoords.
at(1);
57 answer.
at(1) = 0.25 * ( 1.0 - ksi ) * ( 1.0 - ksi ) * ( 2.0 + ksi );
58 answer.
at(2) = 0.125 * l * ( 1.0 - ksi ) * ( 1.0 - ksi ) * ( 1.0 + ksi );
59 answer.
at(3) = 0.25 * ( 1.0 + ksi ) * ( 1.0 + ksi ) * ( 2.0 - ksi );
60 answer.
at(4) = -0.125 * l * ( 1.0 + ksi ) * ( 1.0 + ksi ) * ( 1.0 - ksi );
81 this->
evalN(n, lcoords, cellgeo);
99 xi = ( x2_x1 * gcoords(0) + y2_y1 * gcoords(1) ) / ( sqrt(x2_x1 * x2_x1 + y2_y1 * y2_y1) );
104 answer(0) =
clamp(xi, -1., 1.);
111 double ksi = lcoords.
at(1);
116 answer.
at(1) = 1.5 * ( ksi * ksi - 1.0 ) * l_inv;
117 answer.
at(2) = 0.25 * ( ksi - 1.0 ) * ( 3.0 * ksi + 1.0 );
118 answer.
at(3) = -1.5 * ( ksi * ksi - 1.0 ) * l_inv;
119 answer.
at(4) = 0.25 * ( ksi + 1.0 ) * ( 3.0 * ksi - 1.0 );
125 double ksi = lcoords.
at(1);
130 answer.
at(1) = l_inv * 6.0 * ksi * l_inv;
131 answer.
at(2) = l_inv * ( 3.0 * ksi - 1.0 );
132 answer.
at(3) = -l_inv * 6.0 * ksi * l_inv;
133 answer.
at(4) = l_inv * ( 3.0 * ksi + 1.0 );
150 return sqrt(x2_x1 * x2_x1 + y2_y1 * y2_y1) * 0.5;
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 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...
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
virtual const FloatArray * giveVertexCoordinates(int i) const =0
Class representing a general abstraction for cell geometry.
virtual void edgeEvald2Nds2(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
virtual int global2local(FloatArray &answer, const FloatArray &gcoords, const FEICellGeometry &cellgeo)
Default implementation using Newton's method to find the local coordinates.
Abstract base class representing integration rule.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
Class representing vector of real numbers.
virtual double giveLength(const FEICellGeometry &cellgeo) const
virtual double edgeEvalNormal(FloatArray &normal, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal on the given edge.
Implementation of matrix containing floating point numbers.
double clamp(int a, int lower, int upper)
Returns the clamped value of a between upper and lower.
void zero()
Zeroes all coefficients of receiver.
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
Assigns to the receiver the dyadic product .
the oofem namespace is to define a context or scope in which all oofem names are defined.
double normalize()
Normalizes receiver.
virtual IntegrationRule * giveIntegrationRule(int order)
Sets up a suitable integration rule for numerical integrating over volume.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
void resize(int s)
Resizes receiver towards requested size.