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

ConformalMesh interface for adaptive meshes. More...

#include <adaptive_mesh_layer.hpp>

Classes

struct  IndexSet
 Used for return type of get_index_set. More...
 

Public Types

using AdaptiveMeshType = AdaptiveMeshType_
 Type of underlying mesh. More...
 
using AdaptiveNeighborsType = AdaptiveNeighbors< AdaptiveMeshType >
 Type of neighbors wrapper. More...
 
using CoordType = typename AdaptiveMeshType::CoordType
 Coord type. More...
 
using IndexSetHolderType = AdaptiveIndexSetHolder< AdaptiveMeshType, ShapeType >
 IndexSetHolder type. More...
 
using MeshPermutationType = MeshPermutation< ShapeType >
 Mesh permutation type. More...
 
using ShapeType = typename AdaptiveMeshType::ShapeType
 Shape type. More...
 
using VertexSetType = AdaptiveVertexSet< AdaptiveMeshType >
 Vertex set type. More...
 
using VertexType = typename AdaptiveMeshType::VertexType
 Vertex type. More...
 

Public Member Functions

 AdaptiveMeshLayer (AdaptiveMeshLayer &&other)=default
 
 AdaptiveMeshLayer (const AdaptiveMeshLayer &other)=default
 
 AdaptiveMeshLayer (std::shared_ptr< AdaptiveMeshType > mesh, Layer layer)
 Constructor. More...
 
AdaptiveMeshTypeadaptive_mesh ()
 accessor for adaptive mesh More...
 
const AdaptiveMeshTypeadaptive_mesh () const
 accessor for adaptive mesh More...
 
std::shared_ptr< AdaptiveMeshTypeadaptive_mesh_ptr () const
 accessor for adaptive mesh More...
 
std::size_t bytes () const
 
AdaptiveMeshLayer clone () const
 
void clone (const AdaptiveMeshLayer &other)
 
void create_permutation (PermutationStrategy strategy)
 Creates a mesh permutation based on one of the standard permutation strategies. More...
 
void fill_neighbours ()
 
AdaptiveMeshType::FoundationMeshType & foundation_mesh ()
 accessor for foundation mesh More...
 
const AdaptiveMeshType::FoundationMeshType & foundation_mesh () const
 accessor for foundation mesh More...
 
std::optional< Indexget_child (Index elem, Index child) const
 Retrieve index of a child element. More...
 
template<int cell_dim_, int face_dim_>
auto & get_index_set ()
 Returns a reference to an index set of this mesh. More...
 
template<int cell_dim_, int face_dim_>
const auto & get_index_set () const
 Returns a reference to an index set of this mesh. More...
 
IndexSetHolderTypeget_index_set_holder ()
 Returns a reference to the index set holder of this mesh. More...
 
const IndexSetHolderTypeget_index_set_holder () const
 Returns a reference to the index set holder of this mesh. More...
 
const MeshPermutation< ShapeType > & get_mesh_permutation () const
 Returns the permutation applied to the mesh. More...
 
AdaptiveNeighborsType get_neighbors ()
 
AdaptiveNeighborsType get_neighbors () const
 
Index get_num_children (Index elem) const
 Returns the number of children of mesh a mesh element. More...
 
Index get_num_elements () const
 Returns the number of elements (highest dimension entities) in the mesh. More...
 
Index get_num_entities (int dim) const
 Returns the number of entities of dimension dim in the mesh. More...
 
Index get_num_vertices () const
 Returns the number of vertices in the mesh. More...
 
IndexSetHolderTypeget_topology ()
 
const IndexSetHolderTypeget_topology () const
 
VertexSetTypeget_vertex_set ()
 Returns the vertex set of this mesh. More...
 
const VertexSetTypeget_vertex_set () const
 Returns the vertex set of this mesh. More...
 
bool has_vertex_changed (Index vertex_idx) const
 Indicates whether any mesh element adjacent to the given vertex has changed on the given layer. More...
 
bool is_permuted () const
 Checks whether the mesh is permuted. More...
 
AdaptiveMeshLayeroperator= (AdaptiveMeshLayer &&other)=default
 
AdaptiveMeshLayeroperator= (const AdaptiveMeshLayer &other)=default
 
void set_permutation (MeshPermutationType &&mesh_perm)
 Sets a custom mesh permutation for this 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 ()
 

Static Public Attributes

static constexpr bool is_structured = false
 This is an unstructured mesh. More...
 
static constexpr int shape_dim = AdaptiveMeshType::shape_dim
 Shape dimension. More...
 
static constexpr int world_dim = AdaptiveMeshType::world_dim
 World dimension. More...
 

Private Attributes

IndexSetHolderType _index_set_holder
 
Layer _layer
 
std::shared_ptr< AdaptiveMeshType_mesh
 
MeshPermutation< ShapeType_permutation
 
VertexSetType _vertex_set
 

Detailed Description

template<typename AdaptiveMeshType_>
class FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >

ConformalMesh interface for adaptive meshes.

This class template is a compatability layer between the AdaptiveMesh class and the rest of FEAT. It presents a normal ConformalMesh interface for a single layer of an AdaptiveMesh. This allows using the AdaptiveMeshLayer like any other mesh class.

Author
Markus Muegge

Definition at line 1122 of file adaptive_mesh_layer.hpp.

Member Typedef Documentation

◆ AdaptiveMeshType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::AdaptiveMeshType = AdaptiveMeshType_

Type of underlying mesh.

Definition at line 1126 of file adaptive_mesh_layer.hpp.

◆ AdaptiveNeighborsType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::AdaptiveNeighborsType = AdaptiveNeighbors<AdaptiveMeshType>

Type of neighbors wrapper.

Definition at line 1129 of file adaptive_mesh_layer.hpp.

◆ CoordType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::CoordType = typename AdaptiveMeshType::CoordType

Coord type.

Definition at line 1143 of file adaptive_mesh_layer.hpp.

◆ IndexSetHolderType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::IndexSetHolderType = AdaptiveIndexSetHolder<AdaptiveMeshType, ShapeType>

IndexSetHolder type.

Definition at line 1146 of file adaptive_mesh_layer.hpp.

◆ MeshPermutationType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::MeshPermutationType = MeshPermutation<ShapeType>

Mesh permutation type.

Definition at line 1158 of file adaptive_mesh_layer.hpp.

◆ ShapeType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::ShapeType = typename AdaptiveMeshType::ShapeType

Shape type.

Definition at line 1134 of file adaptive_mesh_layer.hpp.

◆ VertexSetType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::VertexSetType = AdaptiveVertexSet<AdaptiveMeshType>

Vertex set type.

Definition at line 1137 of file adaptive_mesh_layer.hpp.

◆ VertexType

template<typename AdaptiveMeshType_ >
using FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::VertexType = typename AdaptiveMeshType::VertexType

Vertex type.

Definition at line 1140 of file adaptive_mesh_layer.hpp.

Constructor & Destructor Documentation

◆ AdaptiveMeshLayer()

template<typename AdaptiveMeshType_ >
FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::AdaptiveMeshLayer ( std::shared_ptr< AdaptiveMeshType mesh,
Layer  layer 
)
inline

Constructor.

Parameters
[in]meshUnderlying adaptive mesh
[in]LayerMesh layer

Definition at line 1183 of file adaptive_mesh_layer.hpp.

Member Function Documentation

◆ adaptive_mesh() [1/2]

template<typename AdaptiveMeshType_ >
AdaptiveMeshType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::adaptive_mesh ( )
inline

accessor for adaptive mesh

Definition at line 1579 of file adaptive_mesh_layer.hpp.

◆ adaptive_mesh() [2/2]

template<typename AdaptiveMeshType_ >
const AdaptiveMeshType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::adaptive_mesh ( ) const
inline

accessor for adaptive mesh

Definition at line 1585 of file adaptive_mesh_layer.hpp.

◆ adaptive_mesh_ptr()

template<typename AdaptiveMeshType_ >
std::shared_ptr< AdaptiveMeshType > FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::adaptive_mesh_ptr ( ) const
inline

accessor for adaptive mesh

Definition at line 1591 of file adaptive_mesh_layer.hpp.

◆ bytes()

template<typename AdaptiveMeshType_ >
std::size_t FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::bytes ( ) const
inline

Definition at line 1216 of file adaptive_mesh_layer.hpp.

◆ clone() [1/2]

template<typename AdaptiveMeshType_ >
AdaptiveMeshLayer FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::clone ( ) const
inline

Definition at line 1207 of file adaptive_mesh_layer.hpp.

◆ clone() [2/2]

template<typename AdaptiveMeshType_ >
void FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::clone ( const AdaptiveMeshLayer< AdaptiveMeshType_ > &  other)
inline

Definition at line 1198 of file adaptive_mesh_layer.hpp.

◆ create_permutation()

template<typename AdaptiveMeshType_ >
void FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::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 1282 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::create(), FEAT::Geometry::MeshPermutation< Shape_ >::empty(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perm(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perms(), FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::permute(), and XASSERTM.

◆ fill_neighbours()

template<typename AdaptiveMeshType_ >
void FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::fill_neighbours ( )
inline

Definition at line 1443 of file adaptive_mesh_layer.hpp.

◆ foundation_mesh() [1/2]

template<typename AdaptiveMeshType_ >
AdaptiveMeshType::FoundationMeshType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::foundation_mesh ( )
inline

accessor for foundation mesh

Definition at line 1567 of file adaptive_mesh_layer.hpp.

◆ foundation_mesh() [2/2]

template<typename AdaptiveMeshType_ >
const AdaptiveMeshType::FoundationMeshType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::foundation_mesh ( ) const
inline

accessor for foundation mesh

Definition at line 1573 of file adaptive_mesh_layer.hpp.

◆ get_child()

template<typename AdaptiveMeshType_ >
std::optional< Index > FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_child ( Index  elem,
Index  child 
) const
inline

Retrieve index of a child element.

Parameters
[in]elementIndex of parent
[in]childChild to retrieve index of. Should fulfill 0 <= child <= get_num_children(layer, parent_idx).
Returns
The index of the parent on the next layer, if the parent has no children, the requested child's index, if the parent has at least child children, std::nullopt else.

Definition at line 1536 of file adaptive_mesh_layer.hpp.

◆ get_index_set() [1/2]

template<typename AdaptiveMeshType_ >
template<int cell_dim_, int face_dim_>
auto & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_index_set ( )
inline

Returns a reference to an index set of this mesh.

Template Parameters
cell_dim_Cell dimension of the index set
face_dim_Face dimension of the index set

Definition at line 1481 of file adaptive_mesh_layer.hpp.

◆ get_index_set() [2/2]

template<typename AdaptiveMeshType_ >
template<int cell_dim_, int face_dim_>
const auto & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_index_set ( ) const
inline

Returns a reference to an index set of this mesh.

Template Parameters
cell_dim_Cell dimension of the index set
face_dim_Face dimension of the index set

Definition at line 1493 of file adaptive_mesh_layer.hpp.

◆ get_index_set_holder() [1/2]

template<typename AdaptiveMeshType_ >
IndexSetHolderType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_index_set_holder ( )
inline

Returns a reference to the index set holder of this mesh.

Definition at line 1501 of file adaptive_mesh_layer.hpp.

◆ get_index_set_holder() [2/2]

template<typename AdaptiveMeshType_ >
const IndexSetHolderType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_index_set_holder ( ) const
inline

Returns a reference to the index set holder of this mesh.

Definition at line 1509 of file adaptive_mesh_layer.hpp.

◆ get_mesh_permutation()

template<typename AdaptiveMeshType_ >
const MeshPermutation< ShapeType > & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_mesh_permutation ( ) const
inline

◆ get_neighbors() [1/2]

template<typename AdaptiveMeshType_ >
AdaptiveNeighborsType FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_neighbors ( )
inline

Definition at line 1448 of file adaptive_mesh_layer.hpp.

◆ get_neighbors() [2/2]

template<typename AdaptiveMeshType_ >
AdaptiveNeighborsType FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_neighbors ( ) const
inline

Definition at line 1453 of file adaptive_mesh_layer.hpp.

◆ get_num_children()

template<typename AdaptiveMeshType_ >
Index FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_children ( Index  elem) const
inline

Returns the number of children of mesh a mesh element.

Parameters
[in]elemElement to return number of children of

Definition at line 1546 of file adaptive_mesh_layer.hpp.

◆ get_num_elements()

template<typename AdaptiveMeshType_ >
Index FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_elements ( ) const
inline

Returns the number of elements (highest dimension entities) in the mesh.

Definition at line 1242 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_entities().

◆ get_num_entities()

template<typename AdaptiveMeshType_ >
Index FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_entities ( int  dim) const
inline

◆ get_num_vertices()

template<typename AdaptiveMeshType_ >
Index FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_vertices ( ) const
inline

Returns the number of vertices in the mesh.

Definition at line 1234 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_entities().

◆ get_topology() [1/2]

template<typename AdaptiveMeshType_ >
IndexSetHolderType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_topology ( )
inline

Definition at line 1514 of file adaptive_mesh_layer.hpp.

◆ get_topology() [2/2]

template<typename AdaptiveMeshType_ >
const IndexSetHolderType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_topology ( ) const
inline

Definition at line 1519 of file adaptive_mesh_layer.hpp.

◆ get_vertex_set() [1/2]

template<typename AdaptiveMeshType_ >
VertexSetType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_vertex_set ( )
inline

Returns the vertex set of this mesh.

Definition at line 1461 of file adaptive_mesh_layer.hpp.

◆ get_vertex_set() [2/2]

template<typename AdaptiveMeshType_ >
const VertexSetType & FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_vertex_set ( ) const
inline

Returns the vertex set of this mesh.

Definition at line 1469 of file adaptive_mesh_layer.hpp.

◆ has_vertex_changed()

template<typename AdaptiveMeshType_ >
bool FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::has_vertex_changed ( Index  vertex_idx) const
inline

Indicates whether any mesh element adjacent to the given vertex has changed on the given layer.

This is intended to be used with the BPX solver to determine which vertices participate on the given layer.

Definition at line 1561 of file adaptive_mesh_layer.hpp.

◆ is_permuted()

template<typename AdaptiveMeshType_ >
bool FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::is_permuted ( ) const
inline

Checks whether the mesh is permuted.

Returns
true if the mesh is permuted, otherwise false.

Definition at line 1252 of file adaptive_mesh_layer.hpp.

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

◆ name()

template<typename AdaptiveMeshType_ >
static String FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::name ( )
inlinestatic

Definition at line 1551 of file adaptive_mesh_layer.hpp.

◆ set_permutation()

template<typename AdaptiveMeshType_ >
void FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::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 1313 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::empty(), FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::get_num_entities(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perm(), FEAT::Geometry::MeshPermutation< Shape_ >::get_perms(), FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::permute(), and XASSERTM.

◆ validate_element_coloring()

template<typename AdaptiveMeshType_ >
bool FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::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 1345 of file adaptive_mesh_layer.hpp.

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

◆ validate_element_layering()

template<typename AdaptiveMeshType_ >
bool FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::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 1395 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::MeshPermutation< Shape_ >::get_element_layering(), FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::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

template<typename AdaptiveMeshType_ >
IndexSetHolderType FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::_index_set_holder
private

Definition at line 1172 of file adaptive_mesh_layer.hpp.

◆ _layer

template<typename AdaptiveMeshType_ >
Layer FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::_layer
private

Definition at line 1169 of file adaptive_mesh_layer.hpp.

◆ _mesh

template<typename AdaptiveMeshType_ >
std::shared_ptr<AdaptiveMeshType> FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::_mesh
private

Definition at line 1168 of file adaptive_mesh_layer.hpp.

◆ _permutation

template<typename AdaptiveMeshType_ >
MeshPermutation<ShapeType> FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::_permutation
private

Definition at line 1174 of file adaptive_mesh_layer.hpp.

◆ _vertex_set

template<typename AdaptiveMeshType_ >
VertexSetType FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::_vertex_set
private

Definition at line 1171 of file adaptive_mesh_layer.hpp.

◆ is_structured

template<typename AdaptiveMeshType_ >
constexpr bool FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::is_structured = false
staticconstexpr

This is an unstructured mesh.

Definition at line 1155 of file adaptive_mesh_layer.hpp.

◆ shape_dim

template<typename AdaptiveMeshType_ >
constexpr int FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::shape_dim = AdaptiveMeshType::shape_dim
staticconstexpr

Shape dimension.

Definition at line 1149 of file adaptive_mesh_layer.hpp.

◆ world_dim

template<typename AdaptiveMeshType_ >
constexpr int FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::world_dim = AdaptiveMeshType::world_dim
staticconstexpr

World dimension.

Definition at line 1152 of file adaptive_mesh_layer.hpp.


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