OGS
MeshLib::ElementCoordinatesMappingLocal Class Referencefinal

Detailed Description

This class maps node coordinates on intrinsic coordinates of the given element.

Definition at line 23 of file ElementCoordinatesMappingLocal.h.

#include <ElementCoordinatesMappingLocal.h>

Public Member Functions

 ElementCoordinatesMappingLocal (const Element &e, const unsigned global_dim)
unsigned getGlobalDimension () const
 return the global dimension
MathLib::Point3d const & getMappedCoordinates (std::size_t node_id) const
 return mapped coordinates of the node
const RotationMatrixgetRotationMatrixToGlobal () const
 return a rotation matrix converting to global coordinates

Private Attributes

const unsigned _global_dim
std::vector< MathLib::Point3d_points
RotationMatrix _matR2global

Constructor & Destructor Documentation

◆ ElementCoordinatesMappingLocal()

MeshLib::ElementCoordinatesMappingLocal::ElementCoordinatesMappingLocal ( const Element & e,
const unsigned global_dim )

Constructor

Parameters
eMesh element whose node coordinates are mapped
global_dimGlobal dimension

Definition at line 66 of file ElementCoordinatesMappingLocal.cpp.

68 : _global_dim(global_dim), _matR2global(Eigen::Matrix3d::Identity())
69{
70 unsigned const space_dim = std::max(e.space_dimension_, _global_dim);
71 assert(e.getDimension() <= space_dim);
72 _points.reserve(e.getNumberOfNodes());
73 for (unsigned i = 0; i < e.getNumberOfNodes(); i++)
74 {
75 _points.emplace_back(*(e.getNode(i)));
76 }
77
78 auto const element_dim = e.getDimension();
79
80 if (element_dim != space_dim)
81 {
83 detail::getRotationMatrixToGlobal(element_dim, space_dim, _points);
85 }
86}
void rotateToLocal(const MeshLib::RotationMatrix &matR2local, std::vector< MathLib::Point3d > &points)
rotate points to local coordinates
MeshLib::RotationMatrix getRotationMatrixToGlobal(const unsigned element_dimension, const unsigned global_dim, const std::vector< MathLib::Point3d > &points)

References _global_dim, _matR2global, _points, MeshLib::Element::getDimension(), MeshLib::Element::getNode(), MeshLib::Element::getNumberOfNodes(), detail::getRotationMatrixToGlobal(), detail::rotateToLocal(), and MeshLib::Element::space_dimension_.

Member Function Documentation

◆ getGlobalDimension()

unsigned MeshLib::ElementCoordinatesMappingLocal::getGlobalDimension ( ) const
inline

return the global dimension

Definition at line 34 of file ElementCoordinatesMappingLocal.h.

34{ return _global_dim; }

References _global_dim.

Referenced by NumLib::detail::computeMappingMatrices().

◆ getMappedCoordinates()

MathLib::Point3d const & MeshLib::ElementCoordinatesMappingLocal::getMappedCoordinates ( std::size_t node_id) const
inline

return mapped coordinates of the node

Definition at line 37 of file ElementCoordinatesMappingLocal.h.

38 {
39 return _points[node_id];
40 }

References _points.

Referenced by checkJacobianDeterminant(), and NumLib::detail::computeMappingMatrices().

◆ getRotationMatrixToGlobal()

const RotationMatrix & MeshLib::ElementCoordinatesMappingLocal::getRotationMatrixToGlobal ( ) const
inline

return a rotation matrix converting to global coordinates

Definition at line 43 of file ElementCoordinatesMappingLocal.h.

43{return _matR2global;}

References _matR2global.

Referenced by NumLib::detail::computeMappingMatrices(), MeshLib::getElementRotationMatrices(), and ProcessLib::LIE::setFractureProperty().

Member Data Documentation

◆ _global_dim

const unsigned MeshLib::ElementCoordinatesMappingLocal::_global_dim
private

◆ _matR2global

RotationMatrix MeshLib::ElementCoordinatesMappingLocal::_matR2global
private

◆ _points

std::vector<MathLib::Point3d> MeshLib::ElementCoordinatesMappingLocal::_points
private

The documentation for this class was generated from the following files: