48 this->
edgeEvalN(answer, boundary, lcoords, cellgeo);
51double FEInterpolation2d :: boundaryEdgeGiveTransformationJacobian(
int boundary,
const FloatArray &lcoords,
const FEICellGeometry &cellgeo)
const
72#define POINT_TOL 1.e-3
78 double convergence_limit, error = 0.0;
88 for (
int nite = 0; nite < 10; nite++ ) {
91 res =
Vec2(gcoords(0) - guess(0), gcoords(1) - guess(1));
95 if ( error < convergence_limit ) {
104 lcoords_guess.
add(delta);
106 if ( error > convergence_limit ) {
108 answer =
Vec2(1. / 3., 1. / 3.);
112 answer =
Vec2( lcoords_guess(0), lcoords_guess(1) );
123 jacobianMatrix.
resize(2, 2);
124 jacobianMatrix.zero();
129 double x = cellgeo.giveVertexCoordinates(i).at(
xind);
130 double y = cellgeo.giveVertexCoordinates(i).at(
yind);
132 jacobianMatrix.at(1, 1) += dn.
at(i, 1) * x;
133 jacobianMatrix.at(2, 1) += dn.
at(i, 1) * y;
134 jacobianMatrix.at(1, 2) += dn.
at(i, 2) * x;
135 jacobianMatrix.at(2, 2) += dn.
at(i, 2) * y;
139bool FEInterpolation2d ::inside(
const FloatArray &lcoords)
const
151 this->
edgeEvalN(answer, boundary, lcoords, cellgeo);
159double FEInterpolation2d :: boundaryGiveTransformationJacobian(
int boundary,
const FloatArray &lcoords,
const FEICellGeometry &cellgeo)
const
169IntArray FEInterpolation2d :: computeEdgeMapping(
const IntArray &elemNodes,
int iedge)
const
172 int size = ln.giveSize();
174 for (
int i = 1; i <= size; i++ ) {
175 edgeNodes.
at(i) = elemNodes.
at( ln.at(i) );
188 this->
evalN(answer, lcoords, cellgeo);
194 this->
evaldNdx(answer, lcoords, cellgeo);
200 answer =
Vec3(0, 0, 1);
215 for (
int i = 0; i < nodeIndices.giveSize(); ++i) {
virtual const FloatArray giveVertexCoordinates(int i) const =0
double boundarySurfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
void giveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
void boundarySurfaceLocal2global(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
double boundarySurfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
IntArray boundarySurfaceGiveNodes(int boundary, const Element_Geometry_Type, bool includeHierarchical=false) const override
virtual bool inside(const FloatArray &lcoords) const
virtual IntArray computeLocalEdgeMapping(int iedge) const =0
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual void surfaceEvaldNdxi(FloatMatrix &answer, const FloatArray &lcoords) const override
virtual double edgeEvalNormal(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual FloatArrayF< 2 > surfaceEvalBaseVectorsAt(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual void surfaceEvald2Ndxi2(FloatMatrix &answer, const FloatArray &lcoords) const override
virtual double giveCharacteristicLength(const FEICellGeometry &cellgeo) const
void boundarySurfaceEvaldNdx(FloatMatrix &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
void boundarySurfaceEvalN(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
virtual int giveNumberOfNodes(const Element_Geometry_Type) const
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual void evaldNdxi(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
double computeNorm() const
void zero()
Zeroes all coefficients of receiver.
void add(const FloatArray &src)
void resize(Index rows, Index cols)
int giveNumberOfRows() const
Returns number of rows of receiver.
double at(std::size_t i, std::size_t j) const
bool solveForRhs(const FloatArray &b, FloatArray &answer, bool transpose=false)
void enumerate(int maxVal)
#define OOFEM_WARNING(...)
static FloatArray Vec2(const double &a, const double &b)
static FloatArray Vec3(const double &a, const double &b, const double &c)