44 double ksi = lcoords.
at(1);
48 answer.
at(1) = ksi * ( ksi - 1. ) * 0.5;
49 answer.
at(2) = ksi * ( 1. + ksi ) * 0.5;
50 answer.
at(3) = ( 1. - ksi * ksi );
57 double ksi = lcoords.
at(1);
61 answer.
at(1, 1) = ( -1. / 2. + ksi ) / J;
62 answer.
at(1, 2) = ( 1. / 2. + ksi ) / J;
63 answer.
at(1, 3) = -2. * ksi / J;
73 this->
evalN(n, lcoords, cellgeo);
88 a = 0.5 * ( x1 + x2 ) - x3;
89 b = 0.5 * ( x2 - x1 );
90 c = x3 - coords.
at(1);
93 if ( fabs(a) < 1.e-6 ) {
94 double ksi = ( 2.0 * coords.
at(1) - ( x1 + x2 ) ) / ( x2 - x1 );
95 answer.
at(1) =
clamp(ksi, -1., 1.);
96 return fabs(ksi) <= 1.0;
98 double ksi1 = ( -b + sqrt(b * b - 4. * a * c) ) / ( 2. * a );
99 double ksi2 = ( -b - sqrt(b * b - 4. * a * c) ) / ( 2. * a );
101 if ( ( fabs(ksi1) <= 1. ) && ( fabs(ksi2) <= 1. ) ) {
104 }
else if ( fabs(ksi1) <= 1. ) {
107 }
else if ( fabs(ksi2) <= 1. ) {
120 double x1, x2, x3, J, ksi;
127 J = 1. / 2. * ( 2 * ksi - 1 ) * x1 + 1. / 2. * ( 2 * ksi + 1 ) * x2 - 2. * ksi * x3;
145 this->
evalN(answer, lcoords, cellgeo);
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
double & at(int i)
Coefficient access function.
virtual const FloatArray * giveVertexCoordinates(int i) const =0
Class representing a general abstraction for cell geometry.
Class implementing an array of integers.
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 boundaryEdgeEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the basis functions on the requested boundary.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
double at(int i, int j) const
Coefficient access function.
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates local coordinates from given global ones.
virtual double boundaryEdgeGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
Class representing vector of real numbers.
virtual double giveLength(const FEICellGeometry &cellgeo) const
Computes the exact length.
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.
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
virtual void boundaryEdgeLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Maps the local boundary coordinates to global.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
void zero()
Zeroes all coefficient of receiver.
virtual void boundaryEdgeGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void resize(int s)
Resizes receiver towards requested size.