FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ > Class Template Reference

Conformal mesh class template. More...

#include <conformal_mesh.hpp>

Classes

struct  IndexSet
 Index set type class template. More...
 

Public Types

typedef Coord_ CoordType
 Coordinate type. More...
 
typedef IndexSetHolder< ShapeTypeIndexSetHolderType
 index set holder type More...
 
typedef MeshPermutation< ShapeTypeMeshPermutationType
 mesh permutation type More...
 
typedef IndexSet< shape_dim, shape_dim-1 >::Type NeighborSetType
 index set type for storing neighbor adjacency information More...
 
typedef Shape_ ShapeType
 Shape type. More...
 
typedef VertexSet< num_coords_, Coord_ > VertexSetType
 Vertex set type. More...
 
typedef VertexSetType::VertexType VertexType
 Vertex type. More...
 

Public Member Functions

 ConformalMesh (ConformalMesh &&other)
 move constructor More...
 
 ConformalMesh (const ConformalMesh &)=delete
 delete copy constructor
 
 ConformalMesh (const Index num_entities[])
 Constructor. More...
 
 ConformalMesh (Factory< ConformalMesh > &factory)
 Factory constructor. More...
 
virtual ~ConformalMesh ()
 virtual destructor More...
 
std::size_t bytes () const
 
ConformalMesh clone () const
 
void clone (const ConformalMesh &other)
 Clones another conformal mesh object into this object. More...
 
void create_permutation (PermutationStrategy strategy)
 Creates a mesh permutation based on one of the standard permutation strategies. More...
 
void deduct_topology_from_top ()
 Deducts the topology from the Vertex-At-Shape index set. More...
 
void fill_neighbors ()
 Fills the neighbor index set. More...
 
template<int cell_dim_, int face_dim_>
IndexSet< cell_dim_, face_dim_ >::Type & get_index_set ()
 Returns the reference to an index set. More...
 
template<int cell_dim_, int face_dim_>
const IndexSet< cell_dim_, face_dim_ >::Type & get_index_set () const
 Returns the reference to an index set. More...
 
const MeshPermutationTypeget_mesh_permutation () const
 Returns a reference to the underlying mesh permutation object. More...
 
IndexSet< shape_dim, shape_dim-1 >::Type & get_neighbors ()
 
const IndexSet< shape_dim, shape_dim-1 >::Type & get_neighbors () const
 
Index get_num_elements () const
 Returns the number of elements. More...
 
Index get_num_entities (int dim) const
 Returns the number of entities. More...
 
Index get_num_vertices () const
 Returns the number of vertices. More...
 
VertexSetTypeget_vertex_set ()
 Returns a reference to the vertex set of the mesh. More...
 
const VertexSetTypeget_vertex_set () const
 Returns a reference to the vertex set of the mesh. More...
 
bool is_permuted () const
 Checks whether the mesh is permuted. More...
 
ConformalMeshoperator= (ConformalMesh &&other)
 move-assignment operator More...
 
ConformalMeshoperator= (const ConformalMesh &)=delete
 delete copy-assign operator
 
void reorient_boundary_facets ()
 Ensures that all boundary facets are positively oriented. More...
 
void set_permutation (MeshPermutationType &&mesh_perm)
 Sets a custom mesh permutation for this mesh. More...
 
void transform (const VertexType &origin, const VertexType &angles, const VertexType &offset)
 Applies a "proper rigid" transformation onto the mesh. More...
 
bool validate_element_coloring () const
 Validates the element coloring. More...
 
bool validate_element_layering () const
 Validates the element layering. More...
 

Static Public Member Functions

static String name ()
 Returns the name of the class. More...
 

Static Public Attributes

static constexpr bool is_structured = false
 this mesh is not structured More...
 
static constexpr int shape_dim = ShapeType::dimension
 shape dimension More...
 
static constexpr int world_dim = VertexSetType::num_coords
 world dimension More...
 

Protected Attributes

IndexSetHolderType _index_set_holder
 the index sets of the mesh More...
 
NeighborSetType _neighbors
 Information about cells sharing a facet. More...
 
Index _num_entities [shape_dim+1]
 number of entities for each shape dimension More...
 
MeshPermutationType _permutation
 mesh permutation (if permuted) More...
 
VertexSetType _vertex_set
 the vertex set of the mesh More...
 

Detailed Description

template<typename Shape_, int num_coords_ = Shape_::dimension, typename Coord_ = Real>
class FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >

Conformal mesh class template.

Todo:
detailed documentation
Template Parameters
Shape_The shape that is to be used for the mesh. Must be either Shape::Simplex<n> or Shape::Hypercube<n> for some n > 0.

For more details on meshes, see the related doxygen page FEAT Mesh File Format.

Author
Peter Zajac

Definition at line 42 of file conformal_mesh.hpp.

Member Typedef Documentation

◆ CoordType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef Coord_ FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::CoordType

Coordinate type.

Definition at line 51 of file conformal_mesh.hpp.

◆ IndexSetHolderType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef IndexSetHolder<ShapeType> FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::IndexSetHolderType

index set holder type

Definition at line 60 of file conformal_mesh.hpp.

◆ MeshPermutationType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef MeshPermutation<ShapeType> FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::MeshPermutationType

mesh permutation type

Definition at line 71 of file conformal_mesh.hpp.

◆ NeighborSetType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef IndexSet<shape_dim,shape_dim-1>::Type FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::NeighborSetType

index set type for storing neighbor adjacency information

Definition at line 104 of file conformal_mesh.hpp.

◆ ShapeType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef Shape_ FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::ShapeType

Shape type.

Definition at line 48 of file conformal_mesh.hpp.

◆ VertexSetType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef VertexSet<num_coords_, Coord_> FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::VertexSetType

Vertex set type.

Definition at line 54 of file conformal_mesh.hpp.

◆ VertexType

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
typedef VertexSetType::VertexType FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::VertexType

Vertex type.

Definition at line 57 of file conformal_mesh.hpp.

Constructor & Destructor Documentation

◆ ConformalMesh() [1/3]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::ConformalMesh ( const Index  num_entities[])
inlineexplicit

Constructor.

Parameters
[in]num_entitiesAn array of length at least shape_dim + 1 holding the number of entities for each shape dimension. Must not be nullptr.

Definition at line 130 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_num_entities, and FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::shape_dim.

◆ ConformalMesh() [2/3]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::ConformalMesh ( Factory< ConformalMesh< Shape_, num_coords_, Coord_ > > &  factory)
inlineexplicit

◆ ConformalMesh() [3/3]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::ConformalMesh ( ConformalMesh< Shape_, num_coords_, Coord_ > &&  other)
inline

◆ ~ConformalMesh()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
virtual FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::~ConformalMesh ( )
inlinevirtual

virtual destructor

Definition at line 213 of file conformal_mesh.hpp.

Member Function Documentation

◆ bytes()

◆ clone() [1/2]

◆ clone() [2/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::clone ( const ConformalMesh< Shape_, num_coords_, Coord_ > &  other)
inline

Clones another conformal mesh object into this object.

Parameters
[in]otherA transient reference to the source object that is to be cloned into this object.

Definition at line 223 of file conformal_mesh.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::clone(), FEAT::Geometry::other, and FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::shape_dim.

◆ create_permutation()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::create_permutation ( PermutationStrategy  strategy)
inline

Creates a mesh permutation based on one of the standard permutation strategies.

This function creates a new mesh permutation and also applies that permutation to the vertex set and all the index sets stored in this mesh object.

Parameters
[in]strategyThe permutation strategy to use, see #MeshPermutation for more details.
Note
If you want to use a custom permutation other than one of the standard permutation strategies then use set_permutation() instead.
Attention
A mesh can only be permuted once and therefore this function will fire an assertion if the mesh is already permuted.

Definition at line 319 of file conformal_mesh.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::create(), FEAT::Geometry::MeshPermutation< Shape_ >::empty(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::fill_neighbors(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perm(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perms(), FEAT::Geometry::VertexSet< num_coords_, Coord_ >::permute(), and XASSERTM.

◆ deduct_topology_from_top()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::deduct_topology_from_top ( )
inline

◆ fill_neighbors()

◆ get_index_set() [1/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int cell_dim_, int face_dim_>
IndexSet< cell_dim_, face_dim_ >::Type & FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_index_set ( )
inline

Returns the reference to an index set.

Template Parameters
cell_dim_The dimension of the entity whose index set is to be returned.
face_dim_The dimension of the face that the index set refers to.
Returns
A reference to the index set.

Definition at line 533 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_index_set_holder.

Referenced by FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::fill_neighbors().

◆ get_index_set() [2/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int cell_dim_, int face_dim_>
const IndexSet< cell_dim_, face_dim_ >::Type & FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_index_set ( ) const
inline

Returns the reference to an index set.

Template Parameters
cell_dim_The dimension of the entity whose index set is to be returned.
face_dim_The dimension of the face that the index set refers to.
Returns
A reference to the index set.

Definition at line 542 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_index_set_holder.

◆ get_mesh_permutation()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
const MeshPermutationType & FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_mesh_permutation ( ) const
inline

◆ get_neighbors() [1/2]

◆ get_neighbors() [2/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
const IndexSet< shape_dim, shape_dim-1 >::Type & FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_neighbors ( ) const
inline

Returns
A reference to the facet neighbor relations

Definition at line 501 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_neighbors.

◆ get_num_elements()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
Index FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_elements ( ) const
inline

Returns the number of elements.

Returns
The number of elements.

Definition at line 279 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_num_entities, and FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::shape_dim.

◆ get_num_entities()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
Index FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities ( int  dim) const
inline

◆ get_num_vertices()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
Index FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_vertices ( ) const
inline

◆ get_vertex_set() [1/2]

◆ get_vertex_set() [2/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
const VertexSetType & FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_vertex_set ( ) const
inline

Returns a reference to the vertex set of the mesh.

Definition at line 513 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_vertex_set.

◆ is_permuted()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
bool FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::is_permuted ( ) const
inline

Checks whether the mesh is permuted.

Returns
true if the mesh is permuted, otherwise false.

Definition at line 289 of file conformal_mesh.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::empty().

◆ name()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
static String FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::name ( )
inlinestatic

Returns the name of the class.

Returns
The name of the class as a String.

Definition at line 630 of file conformal_mesh.hpp.

References FEAT::stringify().

◆ operator=()

◆ reorient_boundary_facets()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::reorient_boundary_facets ( )
inline

Ensures that all boundary facets are positively oriented.

This function checks the orientation of each boundary facet and flips it if it is negatively oriented to obtain positive orientation on all boundary facets.

Definition at line 589 of file conformal_mesh.hpp.

References FEAT::Geometry::FacetFlipper< Shape_ >::reorient().

Referenced by FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::deduct_topology_from_top().

◆ set_permutation()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::set_permutation ( MeshPermutationType &&  mesh_perm)
inline

Sets a custom mesh permutation for this mesh.

This function can be used to apply a mesh permutation that is created using some other approach than the predefined standard permutation strategies.

This function also applies that permutation to the vertex set and all the index sets stored in this mesh object.

Parameters
[in]mesh_permThe mesh permutation to use.
Attention
A mesh can only be permuted once and therefore this function will fire an assertion if the mesh is already permuted.

Definition at line 353 of file conformal_mesh.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::empty(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::fill_neighbors(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perm(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perms(), FEAT::Geometry::VertexSet< num_coords_, Coord_ >::permute(), and XASSERTM.

◆ transform()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::transform ( const VertexType origin,
const VertexType angles,
const VertexType offset 
)
inline

Applies a "proper rigid" transformation onto the mesh.

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 vertex x of the vertex set:

\[ 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 620 of file conformal_mesh.hpp.

References FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::_vertex_set, and FEAT::Geometry::VertexSet< num_coords_, Coord_ >::transform().

◆ validate_element_coloring()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
bool FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::validate_element_coloring ( ) const
inline

Validates the element coloring.

An element coloring is valid, if any pair of two different elements, which share at least one common vertex, have different colors.

Returns
true, if the element coloring is either valid or empty, otherwise false.

Definition at line 382 of file conformal_mesh.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::get_element_coloring(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_mesh_permutation(), FEAT::Adjacency::Graph::image_begin(), FEAT::Adjacency::Graph::image_end(), and FEAT::Adjacency::transpose.

◆ validate_element_layering()

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
bool FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::validate_element_layering ( ) const
inline

Validates the element layering.

An element layering is valid, if any pair of two different elements, which share at least one common vertex, have different colors.

Returns
true, if the element layering is either valid or empty, otherwise false.

Definition at line 432 of file conformal_mesh.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::get_element_layering(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_mesh_permutation(), FEAT::Adjacency::Graph::image_begin(), FEAT::Adjacency::Graph::image_end(), FEAT::Math::max(), FEAT::Math::min(), and FEAT::Adjacency::transpose.

Member Data Documentation

◆ _index_set_holder

◆ _neighbors

◆ _num_entities

◆ _permutation

◆ _vertex_set

◆ is_structured

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
constexpr bool FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::is_structured = false
staticconstexpr

this mesh is not structured

Definition at line 68 of file conformal_mesh.hpp.

◆ shape_dim

◆ world_dim

template<typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
constexpr int FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::world_dim = VertexSetType::num_coords
staticconstexpr

world dimension

Definition at line 65 of file conformal_mesh.hpp.

Referenced by FEAT::Geometry::Atlas::SurfaceMesh< Mesh_ >::write().


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