void Triag2DLagrangeP1::mapped_coordinates(const CoordsT& coord, const NodeMatrixT& nodes, MappedCoordsT& mappedCoord) { const Real invDet = 1. / jacobian_determinant(nodes); mappedCoord[KSI] = invDet * ((nodes(2, YY) - nodes(0, YY))*coord[XX] + (nodes(0, XX) - nodes(2, XX))*coord[YY] - nodes(0, XX)*nodes(2, YY) + nodes(2, XX)*nodes(0, YY)); mappedCoord[ETA] = invDet * ((nodes(0, YY) - nodes(1, YY))*coord[XX] + (nodes(1, XX) - nodes(0, XX))*coord[YY] + nodes(0, XX)*nodes(1, YY) - nodes(1, XX)*nodes(0, YY)); }
void Triag2DLagrangeP2::mapped_coordinates(const CoordsT& coord, const NodeMatrixT& nodes, MappedCoordsT& map_coord) { throw Common::NotImplemented( FromHere(), "" ); cf_assert(coord.size() == 2); cf_assert(map_coord.size() == 2); cf_assert(nodes.size() == 6); const Real invDet = 1. / jacobian_determinant(nodes); map_coord[KSI] = invDet * ((nodes(2, YY) - nodes(0, YY))*coord[XX] + (nodes(0, XX) - nodes(2, XX))*coord[YY] - nodes(0, XX)*nodes(2, YY) + nodes(2, XX)*nodes(0, YY)); map_coord[ETA] = invDet * ((nodes(0, YY) - nodes(1, YY))*coord[XX] + (nodes(1, XX) - nodes(0, XX))*coord[YY] + nodes(0, XX)*nodes(1, YY) - nodes(1, XX)*nodes(0, YY)); }
Real Triag2DLagrangeP2::jacobian_determinant(const MappedCoordsT& map_coord, const NodeMatrixT& nodes) { return jacobian_determinant(nodes); }
Real Triag2DLagrangeP1::volume(const NodeMatrixT& nodes) { return 0.5 * jacobian_determinant(nodes); }
void Line1D::compute_jacobian(const MappedCoordsT& mapped_coord, const NodesT& nodes, JacobianT& result) { result(KSI,XX) = jacobian_determinant(mapped_coord, nodes); }
Real Tetra3DLagrangeP1::volume(const NodeMatrixT& nodes) { return jacobian_determinant(nodes) / 6.; }
Real Tetra3DLagrangeP1::jacobian_determinant(const MappedCoordsT& mappedCoord, const NodeMatrixT& nodes) { return jacobian_determinant(nodes); }
void Line1DLagrangeP1::jacobian(const MappedCoordsT& mappedCoord, const NodeMatrixT& nodes, JacobianT& result) { result(KSI,XX) = jacobian_determinant(mappedCoord, nodes); }
Real Tetra3D::volume(const NodesT& nodes) { return jacobian_determinant(MappedCoordsT::Zero(),nodes) / 6.; }