47 this->
edgeEvalN(answer, boundary, lcoords, cellgeo);
66 #define POINT_TOL 1.e-3 72 double convergence_limit, error = 0.0;
82 for (
int nite = 0; nite < 10; nite++ ) {
85 res = {gcoords(0) - guess(0), gcoords(1) - guess(1)};
89 if ( error < convergence_limit ) {
98 lcoords_guess.
add(delta);
100 if ( error > convergence_limit ) {
102 answer = {1. / 3., 1. / 3.};
106 answer = { lcoords_guess(0), lcoords_guess(1) };
118 jacobianMatrix.
resize(2, 2);
119 jacobianMatrix.
zero();
127 jacobianMatrix.
at(1, 1) += dn.
at(i, 1) * x;
128 jacobianMatrix.
at(2, 1) += dn.
at(i, 1) * y;
129 jacobianMatrix.
at(1, 2) += dn.
at(i, 2) * x;
130 jacobianMatrix.
at(2, 2) += dn.
at(i, 2) * y;
146 this->
edgeEvalN(answer, boundary, lcoords, cellgeo);
170 for (
int i = 1; i <= size; i++ ) {
171 edgeNodes.
at(i) = elemNodes.
at( ln.
at(i) );
183 this->
evalN(answer, lcoords, cellgeo);
189 this->
evaldNdx(answer, lcoords, cellgeo);
215 for (
int i =1; i<=nnode; i++) {
virtual double boundarySurfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal out of the surface at given point.
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
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 void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
bool solveForRhs(const FloatArray &b, FloatArray &answer, bool transpose=false)
Solves the system of linear equations .
virtual void boundarySurfaceEvalN(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of edge interpolation functions (shape functions) at given point.
virtual void boundaryGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
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 giveCharacteristicLength(const FEICellGeometry &cellgeo) const
Returns a characteristic length of the geometry, typically a diagonal or edge length.
virtual void boundaryEdgeLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Maps the local boundary coordinates to global.
virtual void boundarySurfaceGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge Jacobian of transformation between local and global coordinates.
virtual double boundarySurfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int giveNumberOfNodes() const
Returns the number of geometric nodes of the receiver.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)=0
virtual double boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal on the requested boundary.
virtual void giveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Gives the jacobian matrix at the local coordinates.
void computeEdgeMapping(IntArray &edgeNodes, IntArray &elemNodes, int iedge)
virtual double giveArea(const FEICellGeometry &cellgeo) const
Computes the exact area.
virtual double edgeEvalNormal(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the normal on the given edge.
virtual void boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the basis functions on the requested boundary.
virtual void boundaryEdgeEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the basis functions on the requested boundary.
virtual double boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of edge interpolation functions (shape functions) at given point.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
double computeNorm() const
Computes the norm (or length) of the vector.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void zero()
Zeroes all coefficients of receiver.
virtual void boundarySurfaceLocal2global(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
virtual bool inside(const FloatArray &lcoords) const
void zero()
Zeroes all coefficient of receiver.
virtual double boundaryEdgeGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
virtual void boundaryEdgeGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
virtual void boundarySurfaceEvaldNdx(FloatMatrix &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void boundaryLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Maps the local boundary coordinates to global.
int giveNumberOfRows() const
Returns number of rows of receiver.
#define OOFEM_WARNING(...)
virtual int global2local(FloatArray &answer, const FloatArray &gcoords, const FEICellGeometry &cellgeo)
Default implementation using Newton's method to find the local coordinates.
void add(const FloatArray &src)
Adds array src to receiver.
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates global coordinates from given local ones.
void resize(int s)
Resizes receiver towards requested size.