OGS
MeshLib::ElementCoordinatesMappingLocal Class Referencefinal

Detailed Description

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

Definition at line 29 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 72 of file ElementCoordinatesMappingLocal.cpp.

74 : _global_dim(global_dim), _matR2global(Eigen::Matrix3d::Identity())
75{
76 unsigned const space_dim = std::max(e.space_dimension_, _global_dim);
77 assert(e.getDimension() <= space_dim);
78 _points.reserve(e.getNumberOfNodes());
79 for (unsigned i = 0; i < e.getNumberOfNodes(); i++)
80 {
81 _points.emplace_back(*(e.getNode(i)));
82 }
83
84 auto const element_dim = e.getDimension();
85
86 if (element_dim != space_dim)
87 {
89 detail::getRotationMatrixToGlobal(element_dim, space_dim, _points);
91 }
92}
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 40 of file ElementCoordinatesMappingLocal.h.

40{ 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 43 of file ElementCoordinatesMappingLocal.h.

44 {
45 return _points[node_id];
46 }

References _points.

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

◆ getRotationMatrixToGlobal()

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

return a rotation matrix converting to global coordinates

Definition at line 49 of file ElementCoordinatesMappingLocal.h.

49{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: