OGS
MeshLib::ElementCoordinatesMappingLocal Class Referencefinal

Detailed Description

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

Definition at line 28 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 More...
 
MathLib::Point3d const & getMappedCoordinates (std::size_t node_id) const
 return mapped coordinates of the node More...
 
const RotationMatrixgetRotationMatrixToGlobal () const
 return a rotation matrix converting to global coordinates More...
 

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 73 of file ElementCoordinatesMappingLocal.cpp.

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

39 { return _global_dim; }

References _global_dim.

◆ getMappedCoordinates()

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

return mapped coordinates of the node

Definition at line 42 of file ElementCoordinatesMappingLocal.h.

43  {
44  return _points[node_id];
45  }

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 48 of file ElementCoordinatesMappingLocal.h.

48 {return _matR2global;}

References _matR2global.

Referenced by ProcessLib::HeatTransportBHE::compute1Dto3DRotationMatrix(), 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: