12 #include "../mesh/mesh_headers.hpp"
67 MFEM_ABORT(
"unknown Geometry::Type!");
73 for (
int j = 0; j < dof; j++)
79 const DenseMatrix &IsoparametricTransformation::EvalJacobian()
85 if (dshape.
Width() > 0)
97 switch (FElem->
Space())
104 mfem_error(
"IsoparametricTransformation::OrderJ()");
111 switch (FElem->
Space())
118 mfem_error(
"IsoparametricTransformation::OrderW()");
133 return ((k-1)*(d-1)+(l-1));
135 return (k*(d-1)+(l-1));
138 mfem_error(
"IsoparametricTransformation::OrderGrad(...)");
148 FElem -> CalcShape(ip, shape);
149 PointMat.
Mult(shape, trans);
155 int dof, n,
dim, i, j, k;
164 for (j = 0; j < n; j++)
166 FElem -> CalcShape (ir.
IntPoint(j), shape);
167 for (i = 0; i <
dim; i++)
170 for (k = 0; k < dof; k++)
172 tr(i, j) += PointMat(i, k) * shape(k);
186 for (
int j = 0; j < matrix.
Width(); j++)
206 const int max_iter = 16;
207 const double ref_tol = 1e-15;
208 const double phys_tol = 1e-15*pt.
Normlinf();
211 const int sdim = PointMat.
Height();
214 double xd[3], yd[3], dxd[3], Jid[9];
215 Vector x(xd, dim), y(yd, sdim), dx(dxd, dim);
217 bool hit_bdr =
false, prev_hit_bdr;
223 for (
int it = 0; it < max_iter; it++)
229 if (y.Normlinf() < phys_tol) { ip = xip;
return 0; }
235 prev_hit_bdr = hit_bdr;
240 if (dx.
Normlinf() < ref_tol) { ip = xip;
return 0; }
246 prev_xip.
Get(dxd, dim);
248 if (dx.
Normlinf() < ref_tol) {
return 1; }
263 ip2.
Set(vec, v.Size());
272 for (i = 0; i < n; i++)
int GetNPoints() const
Returns the number of the points in the integration rule.
Abstract class for Finite Elements.
void Set(const double *p, const int dim)
void Get(double *p, const int dim) const
int GetDim() const
Returns the reference space dimension for the finite element.
Class for an integration rule - an Array of IntegrationPoint.
void SetSize(int s)
Resize the vector to size s.
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
void CalcAdjugate(const DenseMatrix &a, DenseMatrix &adja)
int GetOrder() const
Returns the order of the finite element.
Data type dense matrix using column-major storage.
int Space() const
Returns the type of space on each element.
double Normlinf() const
Returns the l_infinity norm of the vector.
const IntegrationPoint & GetCenter(int GeomType)
PointFiniteElement PointFE
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
TriLinear3DFiniteElement HexahedronFE
const IntegrationRule & GetNodes() const
void CalcInverse(const DenseMatrix &a, DenseMatrix &inva)
int GetGeomType() const
Returns the Geometry::Type of the reference element.
static bool ProjectPoint(int GeomType, const IntegrationPoint &beg, IntegrationPoint &end)
int GetDof() const
Returns the number of degrees of freedom in the finite element.
void subtract(const Vector &x, const Vector &y, Vector &z)
void mfem_error(const char *msg)
void GetColumnReference(int c, Vector &col)
Linear3DFiniteElement TetrahedronFE
Linear2DFiniteElement TriangleFE
Class for integration point with weight.
void Mult(const double *x, double *y) const
Matrix vector multiplication.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const =0
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
BiLinear2DFiniteElement QuadrilateralFE
Linear1DFiniteElement SegmentFE
Tensor products of polynomials of order k.