void IsoparametricTransformation::Transform (const IntegrationRule &ir, DenseMatrix &tr) { int dof, n, dim, i, j, k; dim = PointMat.Height(); dof = FElem->GetDof(); n = ir.GetNPoints(); shape.SetSize(dof); tr.SetSize(dim, n); for (j = 0; j < n; j++) { FElem -> CalcShape (ir.IntPoint(j), shape); for (i = 0; i < dim; i++) { tr(i, j) = 0.0; for (k = 0; k < dof; k++) { tr(i, j) += PointMat(i, k) * shape(k); } } } }
void IsoparametricTransformation::SetIdentityTransformation( Geometry::Type GeomType) { switch (GeomType) { case Geometry::POINT : FElem = &PointFE; break; case Geometry::SEGMENT : FElem = &SegmentFE; break; case Geometry::TRIANGLE : FElem = &TriangleFE; break; case Geometry::SQUARE : FElem = &QuadrilateralFE; break; case Geometry::TETRAHEDRON : FElem = &TetrahedronFE; break; case Geometry::CUBE : FElem = &HexahedronFE; break; case Geometry::PRISM : FElem = &WedgeFE; break; default: MFEM_ABORT("unknown Geometry::Type!"); } int dim = FElem->GetDim(); int dof = FElem->GetDof(); const IntegrationRule &nodes = FElem->GetNodes(); PointMat.SetSize(dim, dof); for (int j = 0; j < dof; j++) { nodes.IntPoint(j).Get(&PointMat(0,j), dim); } geom = GeomType; space_dim = dim; }