FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Geometry::MeshAtlas< Mesh_ > Class Template Reference

Mesh Atlas class template. More...

#include <mesh_atlas.hpp>

Public Types

typedef Atlas::ChartBase< MeshTypeMeshChartType
 our chart base-class type More...
 
typedef Mesh_ MeshType
 our mesh type More...
 
typedef MeshType::VertexType VertexType
 our vertex type (aka world point type) More...
 

Public Member Functions

 MeshAtlas ()
 default CTOR More...
 
 MeshAtlas (const MeshAtlas &)=delete
 deleted copy CTOR
 
 MeshAtlas (MeshAtlas &&other)=default
 move CTOR
 
virtual ~MeshAtlas ()
 virtual DTOR More...
 
bool add_mesh_chart (const String &name, std::unique_ptr< MeshChartType > chart, bool replace=false)
 Inserts a new chart into the map. More...
 
std::size_t bytes () const
 
MeshChartTypefind_mesh_chart (const String &name)
 Searches for a mesh chart. More...
 
const MeshChartTypefind_mesh_chart (const String &name) const
 Searches for a mesh chart. More...
 
std::deque< Stringget_chart_names () const
 Returns the names of all charts of this atlas. More...
 
const MeshChartMapget_mesh_chart_map () const
 Returns a const reference to the chart map. More...
 
MeshAtlasoperator= (const MeshAtlas &)=delete
 deleted copy-assignment operator
 
MeshAtlasoperator= (MeshAtlas &&other)=default
 move-assignment operator
 
void transform (const VertexType &origin, const VertexType &angles, const VertexType &offset)
 Applies a "proper rigid" transformation onto the atlas. More...
 

Static Public Member Functions

static std::unique_ptr< MeshAtlasmake_unique ()
 Creates a new MeshAtlas on the heap and returns a unique pointer to it. More...
 

Protected Types

typedef std::map< String, std::unique_ptr< MeshChartType > > MeshChartMap
 our chart map type More...
 

Protected Attributes

MeshChartMap _chart_map
 our chart map More...
 

Detailed Description

template<typename Mesh_>
class FEAT::Geometry::MeshAtlas< Mesh_ >

Mesh Atlas class template.

Template Parameters
Mesh_The type of the mesh that is to be parameterized by this atlas, i.e. ConformalMesh
Author
Peter Zajac

Definition at line 31 of file mesh_atlas.hpp.

Member Typedef Documentation

◆ MeshChartMap

template<typename Mesh_ >
typedef std::map<String, std::unique_ptr<MeshChartType> > FEAT::Geometry::MeshAtlas< Mesh_ >::MeshChartMap
protected

our chart map type

Definition at line 43 of file mesh_atlas.hpp.

◆ MeshChartType

template<typename Mesh_ >
typedef Atlas::ChartBase<MeshType> FEAT::Geometry::MeshAtlas< Mesh_ >::MeshChartType

our chart base-class type

Definition at line 37 of file mesh_atlas.hpp.

◆ MeshType

template<typename Mesh_ >
typedef Mesh_ FEAT::Geometry::MeshAtlas< Mesh_ >::MeshType

our mesh type

Definition at line 35 of file mesh_atlas.hpp.

◆ VertexType

template<typename Mesh_ >
typedef MeshType::VertexType FEAT::Geometry::MeshAtlas< Mesh_ >::VertexType

our vertex type (aka world point type)

Definition at line 39 of file mesh_atlas.hpp.

Constructor & Destructor Documentation

◆ MeshAtlas()

template<typename Mesh_ >
FEAT::Geometry::MeshAtlas< Mesh_ >::MeshAtlas ( )
inline

default CTOR

Definition at line 50 of file mesh_atlas.hpp.

Referenced by FEAT::Geometry::MeshAtlas< Mesh_ >::make_unique().

◆ ~MeshAtlas()

template<typename Mesh_ >
virtual FEAT::Geometry::MeshAtlas< Mesh_ >::~MeshAtlas ( )
inlinevirtual

virtual DTOR

Definition at line 67 of file mesh_atlas.hpp.

Member Function Documentation

◆ add_mesh_chart()

template<typename Mesh_ >
bool FEAT::Geometry::MeshAtlas< Mesh_ >::add_mesh_chart ( const String name,
std::unique_ptr< MeshChartType chart,
bool  replace = false 
)
inline

Inserts a new chart into the map.

Parameters
[in]nameThe name of the chart to be inserted.
[in]chartA unique pointer to the mesh chart to be inserted. The atlas takes ownership of the chart object and deletes it upon destruction.
[in]replaceSpecifies whether to replace an old chart with the same name if it already exists.
Returns
True if the MeshChart was successfully inserted, meaning a chart of that name was either not present yet, or it was present and replace was set to true.

Definition at line 109 of file mesh_atlas.hpp.

References FEAT::Geometry::MeshAtlas< Mesh_ >::_chart_map.

Referenced by FEAT::Geometry::MeshExtruder< ConformalMesh< Shape::Hypercube< 2 >, 2, Coord_ > >::extrude_atlas().

◆ bytes()

template<typename Mesh_ >
std::size_t FEAT::Geometry::MeshAtlas< Mesh_ >::bytes ( ) const
inline
Returns
The size of dynamically allocated memory in bytes.

Definition at line 84 of file mesh_atlas.hpp.

References FEAT::Geometry::MeshAtlas< Mesh_ >::_chart_map.

◆ find_mesh_chart() [1/2]

◆ find_mesh_chart() [2/2]

template<typename Mesh_ >
const MeshChartType * FEAT::Geometry::MeshAtlas< Mesh_ >::find_mesh_chart ( const String name) const
inline

Searches for a mesh chart.

Parameters
[in]nameThe name of the mesh chart to the found.
Returns
A pointer to the mesh chart associated with name, or nullptr if no chart with that name was found. This returned pointer does not transfer ownership and must therefore not be deleted by the caller.

Definition at line 171 of file mesh_atlas.hpp.

References FEAT::Geometry::MeshAtlas< Mesh_ >::_chart_map.

◆ get_chart_names()

template<typename Mesh_ >
std::deque< String > FEAT::Geometry::MeshAtlas< Mesh_ >::get_chart_names ( ) const
inline

◆ get_mesh_chart_map()

template<typename Mesh_ >
const MeshChartMap & FEAT::Geometry::MeshAtlas< Mesh_ >::get_mesh_chart_map ( ) const
inline

Returns a const reference to the chart map.

Returns
A const reference to the chart map

Definition at line 146 of file mesh_atlas.hpp.

References FEAT::Geometry::MeshAtlas< Mesh_ >::_chart_map.

◆ make_unique()

template<typename Mesh_ >
static std::unique_ptr< MeshAtlas > FEAT::Geometry::MeshAtlas< Mesh_ >::make_unique ( )
inlinestatic

Creates a new MeshAtlas on the heap and returns a unique pointer to it.

Returns
A unique pointer to the new MeshAtlas object.

Definition at line 78 of file mesh_atlas.hpp.

References FEAT::Geometry::MeshAtlas< Mesh_ >::MeshAtlas().

◆ transform()

template<typename Mesh_ >
void FEAT::Geometry::MeshAtlas< Mesh_ >::transform ( const VertexType origin,
const VertexType angles,
const VertexType offset 
)
inline

Applies a "proper rigid" transformation onto the atlas.

Let v denote the origin world point, w the offset world point and R the rotation matrix corresponding to the angles, then this function applies the following transformation for any chart point x of the atlas:

\[ x \mapsto w + R\cdot (x - v) \]

Parameters
[in]originThe origin of the transformation. This is subtracted from any vertex before applying the rotation.
[in]anglesThe angles of the rotation matrix.
  • 2D: the rotation angle in radians is stored as:
    • angles(0): rotation angle
    • angles(1): ignored
  • 3D: the rotation angles in radians stored as:
    • angles(0): yaw angle
    • angles(1): pitch angle
    • angles(2): roll angle
[in]offsetThe offset of the transformation. This is added to any vertex after applying the rotation.

Definition at line 205 of file mesh_atlas.hpp.

References FEAT::Geometry::MeshAtlas< Mesh_ >::_chart_map.

Member Data Documentation

◆ _chart_map


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