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

Dynamic mesh data structure. More...

#include <adaptive_mesh.hpp>

Public Types

using CoordType = Coord_
 Coordinate type. More...
 
using FoundationMeshType = ConformalMesh< Shape_, num_coords_, Coord_ >
 Type of underlying mesh. More...
 
enum class  ImportBehaviour : std::uint8_t { RequiredOnly , All }
 ImportBehaviour for this mesh. More...
 
using ShapeType = Shape_
 Shape of this mesh. More...
 
using TemplateSet = TemplateSet_
 Template set used by this mesh. More...
 
using VertexType = typename FoundationMeshType::VertexType
 Vertex type. More...
 

Public Member Functions

 AdaptiveMesh (AdaptiveMesh &&other)=delete
 
 AdaptiveMesh (AdaptiveMesh &other)=delete
 
 AdaptiveMesh (const FoundationMeshType &mesh)
 Constructor. More...
 
AdaptionStats adapt (SubdivisionLevels &foundation_levels, ImportBehaviour import_behaviour=ImportBehaviour::RequiredOnly)
 Adapt the mesh to new SubdivisionLevels. More...
 
std::vector< std::pair< Index, Index > > bridge_pairs ()
 Computes mapping from elements of the foundation mesh to elements of the AdaptiveMesh. More...
 
MeshPart< FoundationMeshTypeexclusive_meshpart () const
 Exclusive MeshPart factory. More...
 
void fill_neighbors ()
 Computes neighboring elements for all mesh elements. More...
 
FoundationMeshTypefoundation_mesh ()
 Accessor for foundation mesh. More...
 
template<int dim_>
std::optional< Indexget_child (Layer layer, Index parent_idx, Index child)
 Retrieve index of a child element. More...
 
template<int dim_, int codim_>
Index get_face_index (Layer layer, Index entity_idx, Index face_idx) const
 Returns an index of a sub-entity, i.e. the index of a face of a cell. More...
 
Index get_neighbor (Layer layer, Index element_idx, Index neighbor_idx) const
 Returns the index of the n-th neighbor of the given element. More...
 
template<int dim>
Index get_num_children (Layer layer, Index elem)
 Returns the number of children of an element in the mesh. More...
 
Index get_num_entities (Layer layer, int dim) const
 Returns number of elements of dimension dim in layer layer. More...
 
std::optional< Indexget_overlap_cell (Index foundation_index)
 Mapping of elements of the foundation mesh to elements of the AdaptiveMesh. More...
 
bool has_vertex_changed (Layer layer, Index vertex_idx) const
 Indicates whether any mesh element adjacent to the given vertex has changed on the given layer. More...
 
Index num_layers () const
 Returns number of layers of the AdaptiveMesh. More...
 
template<int dim_>
Index num_total_entities () const
 Returns the total number of entities of dimension dim_ across all mesh layers. More...
 
AdaptiveMeshoperator= (AdaptiveMesh &&other)=delete
 
AdaptiveMeshoperator= (AdaptiveMesh &other)=delete
 
std::vector< Indexoverlap_mapping ()
 Computes mapping from AdaptiveMesh elements to foundation mesh elements. More...
 
MeshPart< FoundationMeshTypeoverlap_meshpart () const
 Overlap MeshPart factory. More...
 
template<typename TargetMeshType_ >
MeshPart< TargetMeshType_ > project_meshpart (Layer layer, const MeshPart< FoundationMeshType > &part) const
 
FoundationMeshType to_conformal_mesh (Layer layer) const
 Create a ConformalMesh from a layer. More...
 
SubdivisionLevels transfer_sdls (SubdivisionLevels &lvls_in) const
 Transfer subdivision levels from the adaptive mesh to the foundation mesh. More...
 
void transform (const VertexType &origin, const VertexType &angles, const VertexType &offset)
 Applies a "proper rigid" transformation onto the mesh vertices. More...
 
VertexTypevertex (Layer layer, Index vertex_index)
 Retrieve vertex at index v from layer layer. More...
 
const VertexTypevertex (Layer layer, Index vertex_index) const
 Retrieve vertex at index v from layer layer. More...
 

Static Public Member Functions

template<typename VertexMarker_ >
static FoundationMeshType create_refined_mesh (const FoundationMeshType &foundation_mesh, const VertexMarker_ &marker)
 Use the AdaptiveMesh as a generator for other meshes. More...
 

Static Public Attributes

static constexpr int shape_dim = ShapeType::dimension
 Shape dimension. More...
 
static constexpr int world_dim = ShapeType::dimension
 World dimension. More...
 

Protected Member Functions

template<int parent_dim_, int child_dim_>
void _adapt_sub_entities (Index depth, AdaptiveElement< parent_dim_ > &self, const RefinementTemplate< typename Shape::FaceTraits< ShapeType, parent_dim_ >::ShapeType > &tmplt, const LevelTuple< parent_dim_ > &levels)
 Adapts children of dimension dim_. More...
 
template<int parent_dim_, int topo_dim_, int dim_ = topo_dim_ - 1>
void _build_topology (const TopologyTemplate< typename Shape::FaceTraits< ShapeType, topo_dim_ >::ShapeType > &tmplt, ElementTopology< topo_dim_ > &topo, const ElementTopology< parent_dim_ > &parent_topo, const ElementChildren< parent_dim_ > &siblings)
 Construct a topology for a new child element. More...
 
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool _dbg_check_topology_orientations (const ElementTopology< topo_dim_ > &topology)
 
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool _dbg_check_topology_unique (const ElementTopology< topo_dim_ > &topology)
 
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool _dbg_is_topology_consistent (const ElementTopology< topo_dim_ > &topology)
 
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool _dbg_is_topology_layering_consistent (Intern::Layer layer, const ElementTopology< topo_dim_ > &topology)
 
template<int dim_>
void _delete_unused (std::unordered_map< Index, ElementRef< dim_ > > &roots, const std::set< Index > &elements)
 Helper for garbage_collect. Deletes all entities of dimension dim that are not in the given set. More...
 
template<int dim_>
void _erase (Intern::ElementKey< dim_ > key)
 Erases an element and all its children from the mesh. More...
 
template<int dim_ = shape_dim>
void _garbage_collect (Intern::MeshRoots< shape_dim > &roots, const Intern::MeshIndexSet &set)
 Delete all elements from the storage and mesh roots that are not in the index set. More...
 
template<int parent_dim_, int entity_dim_>
LevelTuple< entity_dim_ > _levels (const TopologyTemplate< typename Shape::FaceTraits< ShapeType, entity_dim_ >::ShapeType > &tmplt, const LevelTuple< parent_dim_ > &lvls)
 Spread refinement levels to a child entity. More...
 
template<int entity_dim_, int result_dim_, int boundary_dim_>
OrientedElementRef< result_dim_ > _resolve_boundary_entity_reference (const ElementTopology< entity_dim_ > &topo, const EntityReference &ref)
 Helper-function for _resolve_entity_reference. Handles boundary entities of any dimension. More...
 
template<int entity_dim_, int result_dim_>
OrientedElementRef< result_dim_ > _resolve_entity_reference (const ElementTopology< entity_dim_ > &topo, const ElementChildren< entity_dim_ > &siblings, const EntityReference &ref)
 

Private Types

template<int dim_>
using AdaptiveElement = typename MeshStorage::template AdaptiveElementByDim< dim_ >
 
using AdaptiveVertex = typename MeshStorage::AdaptiveVertexType
 
using CellKey = typename MeshStorage::template ElementRefByDim< 3 >
 
using EdgeKey = typename MeshStorage::template ElementRefByDim< 1 >
 
template<int dim_>
using ElementChildren = typename MeshStorage::template ElementChildrenByDim< dim_ >
 
template<int dim_>
using ElementRef = typename MeshStorage::template ElementRefByDim< dim_ >
 
template<int dim_>
using ElementTopology = typename MeshStorage::template ElementTopologyByDim< dim_ >
 
using FaceKey = typename MeshStorage::template ElementRefByDim< 2 >
 
template<int dim_>
using LevelTuple = Intern::RefinementFieldTuple< typename TemplateSet::VertexMarkerType, Shape::FaceTraits< typename Shape::FaceTraits< Shape_, dim_ >::ShapeType, 0 >::count >
 
using MeshRoots = Intern::MeshRoots< shape_dim >
 
using MeshStorage = Intern::AdaptiveMeshStorage< Shape_, TemplateSet, VertexType >
 MeshStorage type. More...
 
using OrientedEdge = typename MeshStorage::template OrientedElementRefByDim< 1 >
 
template<int dim_>
using OrientedElementRef = typename MeshStorage::template OrientedElementRefByDim< dim_ >
 
using OrientedFace = typename MeshStorage::template OrientedElementRefByDim< 2 >
 
using VertexKey = typename MeshStorage::template ElementRefByDim< 0 >
 
using VertexMarkerType = typename TemplateSet::VertexMarkerType
 

Private Member Functions

template<int dim_>
void _adapt_children (ElementRef< dim_ > key, const LevelTuple< dim_ > &levels)
 Adjusts the children of the given element to match new subdivision levels. More...
 
void _adapt_roots (const Intern::MeshIndexSet &set, Intern::RefinementField< typename TemplateSet::VertexMarkerType > &sdls)
 Adapts roots of refinement trees. More...
 
template<int dim_>
void _adapt_roots_of_dim (const Intern::MeshIndexSet &set, Intern::RefinementField< typename TemplateSet::VertexMarkerType > &sdls)
 Adapts roots of refinement trees. More...
 
template<int dim_>
Intern::ElementKey< dim_ > _build (Index depth, const LevelTuple< dim_ > &levels, const ElementTopology< dim_ > &topology)
 Construct a new subtree. More...
 

Private Attributes

const FoundationMeshType_foundation_mesh
 Reference to foundation mesh. More...
 
Intern::MeshRoots< shape_dim_roots = {}
 Mesh roots. More...
 
AdaptionStats _stats = {}
 Stats of latest adaption. More...
 
MeshStorage _storage = {}
 Mesh storage. More...
 

Friends

template<typename AdaptiveMeshType_ , int topology_dim_, int collection_dim_>
struct Intern::FoundationTopologyCollector
 
template<typename AdaptiveMeshType_ , typename TargetMeshType_ , typename AlgShape_ >
struct Intern::MeshPartProjector
 

Detailed Description

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

Dynamic mesh data structure.

Mesh data structure that allows adaptively refining a ConformalMesh guided by subdivision levels assigned to the vertices of the ConformalMesh. The refinement is template based. That means mesh entities are replaced with refined versions chosen from a fixed set of possible refinements.

See tutorial_09_adaptivemesh for details on how to use this class and the "Adaptive Meshing" wiki entry for documentation of the ideas and concepts used in this implementation.

The AdaptiveMesh supports:

  • quadrilateral and hexahedral meshes,
  • adaptation to different subdivision levels with minimal work,
  • exchangable template sets,
  • a ConformalMesh-like interface for integrating with the rest of FEAT3,
  • efficient retrieval of mesh entities, allowing assembly directly on the AdaptiveMesh.
Author
Markus Muegge

Definition at line 211 of file adaptive_mesh.hpp.

Member Typedef Documentation

◆ AdaptiveElement

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::AdaptiveElement = typename MeshStorage::template AdaptiveElementByDim<dim_>
private

Definition at line 284 of file adaptive_mesh.hpp.

◆ AdaptiveVertex

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::AdaptiveVertex = typename MeshStorage::AdaptiveVertexType
private

Definition at line 263 of file adaptive_mesh.hpp.

◆ CellKey

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::CellKey = typename MeshStorage::template ElementRefByDim<3>
private

Definition at line 258 of file adaptive_mesh.hpp.

◆ CoordType

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::CoordType = Coord_

Coordinate type.

Definition at line 226 of file adaptive_mesh.hpp.

◆ EdgeKey

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::EdgeKey = typename MeshStorage::template ElementRefByDim<1>
private

Definition at line 256 of file adaptive_mesh.hpp.

◆ ElementChildren

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::ElementChildren = typename MeshStorage::template ElementChildrenByDim<dim_>
private

Definition at line 281 of file adaptive_mesh.hpp.

◆ ElementRef

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::ElementRef = typename MeshStorage::template ElementRefByDim<dim_>
private

Definition at line 272 of file adaptive_mesh.hpp.

◆ ElementTopology

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::ElementTopology = typename MeshStorage::template ElementTopologyByDim<dim_>
private

Definition at line 278 of file adaptive_mesh.hpp.

◆ FaceKey

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::FaceKey = typename MeshStorage::template ElementRefByDim<2>
private

Definition at line 257 of file adaptive_mesh.hpp.

◆ FoundationMeshType

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::FoundationMeshType = ConformalMesh<Shape_, num_coords_, Coord_>

Type of underlying mesh.

Definition at line 229 of file adaptive_mesh.hpp.

◆ LevelTuple

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::LevelTuple = Intern::RefinementFieldTuple< typename TemplateSet::VertexMarkerType, Shape::FaceTraits<typename Shape::FaceTraits<Shape_, dim_>::ShapeType, 0>::count>
private

Definition at line 266 of file adaptive_mesh.hpp.

◆ MeshRoots

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::MeshRoots = Intern::MeshRoots<shape_dim>
private

Definition at line 286 of file adaptive_mesh.hpp.

◆ MeshStorage

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::MeshStorage = Intern::AdaptiveMeshStorage<Shape_, TemplateSet, VertexType>
private

MeshStorage type.

Definition at line 251 of file adaptive_mesh.hpp.

◆ OrientedEdge

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::OrientedEdge = typename MeshStorage::template OrientedElementRefByDim<1>
private

Definition at line 260 of file adaptive_mesh.hpp.

◆ OrientedElementRef

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::OrientedElementRef = typename MeshStorage::template OrientedElementRefByDim<dim_>
private

Definition at line 275 of file adaptive_mesh.hpp.

◆ OrientedFace

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::OrientedFace = typename MeshStorage::template OrientedElementRefByDim<2>
private

Definition at line 261 of file adaptive_mesh.hpp.

◆ ShapeType

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::ShapeType = Shape_

Shape of this mesh.

Definition at line 217 of file adaptive_mesh.hpp.

◆ TemplateSet

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::TemplateSet = TemplateSet_

Template set used by this mesh.

Definition at line 235 of file adaptive_mesh.hpp.

◆ VertexKey

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::VertexKey = typename MeshStorage::template ElementRefByDim<0>
private

Definition at line 255 of file adaptive_mesh.hpp.

◆ VertexMarkerType

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::VertexMarkerType = typename TemplateSet::VertexMarkerType
private

Definition at line 288 of file adaptive_mesh.hpp.

◆ VertexType

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
using FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::VertexType = typename FoundationMeshType::VertexType

Vertex type.

Definition at line 232 of file adaptive_mesh.hpp.

Member Enumeration Documentation

◆ ImportBehaviour

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
enum class FEAT::Geometry::AdaptiveMesh::ImportBehaviour : std::uint8_t
strong

ImportBehaviour for this mesh.

The AdaptiveMesh imports some mesh entities into its own data format. This enum indicate what entities to import.

Enumerator
RequiredOnly 

Import only entites required for the current subdivision levels.

All 

Import all entities. Useful for exporting the complete mesh later.

Definition at line 243 of file adaptive_mesh.hpp.

Constructor & Destructor Documentation

◆ AdaptiveMesh()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::AdaptiveMesh ( const FoundationMeshType mesh)
inlineexplicit

Constructor.

Parameters
[in]meshReference to foundation mesh. The reference is stored and must be valid for the lifetime of the AdaptiveMesh
[in]behaviourThe import behaviour to use during adaptions

Definition at line 319 of file adaptive_mesh.hpp.

Member Function Documentation

◆ _adapt_children()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_children ( ElementRef< dim_ >  key,
const LevelTuple< dim_ > &  levels 
)
inlineprivate

Adjusts the children of the given element to match new subdivision levels.

Children will be

  • further adapted, if their types are unchanged
  • replaced, if their type has changed.
Parameters
[in]elementThe element whose children will be adapted
[in]levelsNew subdivision levels of the element

Definition at line 1137 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_stats, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, FEAT::Geometry::AdaptionStats::kept_element(), FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::type(), and XASSERTM.

◆ _adapt_roots()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_roots ( const Intern::MeshIndexSet set,
Intern::RefinementField< typename TemplateSet::VertexMarkerType > &  sdls 
)
inlineprivate

Adapts roots of refinement trees.

Parameters
[in]setSet of indices that should be part of the mesh after adaptation
[in]sdlsSubdivisionLevels to guide adaptation

This method iterates over all entities in the MeshIndexSet and either

  • adapt its children, if the entity already exists in the adaptive mesh and its type is unchanged
  • replaces it, if the entity already exists in the adaptive mesh and its type is changed
  • builds it, if the entity does not yet exist

This method does not erase entities that are part of the AdaptiveMesh but not in the MeshIndexSet.

Definition at line 1091 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_foundation_mesh, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_roots, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_stats, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_vertex_set(), FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::insert(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::shape_dim.

Referenced by FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::adapt().

◆ _adapt_roots_of_dim()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_roots_of_dim ( const Intern::MeshIndexSet set,
Intern::RefinementField< typename TemplateSet::VertexMarkerType > &  sdls 
)
inlineprivate

Adapts roots of refinement trees.

Template Parameters
dim_Dimension of entities
Parameters
[in]setSet of indices that should be part of the mesh after adaptation
[in]sdlsSubdivisionLevels to guide adaptation

This method iterates over all entities of dimension dim_ in the MeshIndexSet and either

  • adapt its children, if the entity already exists in the adaptive mesh and its type is unchanged
  • replaces it, if the entity already exists in the adaptive mesh and its type is changed
  • builds it, if the entity does not yet exist

This method does not erase entities that are part of the AdaptiveMesh but not in the MeshIndexSet.

Definition at line 1007 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_erase(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_foundation_mesh, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_roots, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::type().

◆ _adapt_sub_entities()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int parent_dim_, int child_dim_>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_sub_entities ( Index  depth,
AdaptiveElement< parent_dim_ > &  self,
const RefinementTemplate< typename Shape::FaceTraits< ShapeType, parent_dim_ >::ShapeType > &  tmplt,
const LevelTuple< parent_dim_ > &  levels 
)
inlineprotected

Adapts children of dimension dim_.

Template Parameters
parent_dim_Dimension of parent
child_dim_Dimension of children
TQuery_Template query type
MQuery_Mesh query type
Parameters
[in]depthCurrent refinement tree depth
[in]selfCurrent AdaptiveElement
[in]t_queryTemplate query for current dimension
[in]m_queryMesh Query for self

Definition at line 1216 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_erase(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::type().

◆ _build()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
Intern::ElementKey< dim_ > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_build ( Index  depth,
const LevelTuple< dim_ > &  levels,
const ElementTopology< dim_ > &  topology 
)
inlineprivate

Construct a new subtree.

The root element will be refined using templates from the TemplateSet template parameter.

Parameters
[in]depthThe starting depth for the new subtree
[in]levelsThe refinement levels for the element, dictates further refinement
[in]topologyThe surrounding elements of the new element
Returns
The key of the root element of the new subtree

Definition at line 881 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_stats, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, FEAT::Geometry::AdaptionStats::added_element(), ASSERT, FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::insert(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::vertex().

◆ _build_topology()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int parent_dim_, int topo_dim_, int dim_ = topo_dim_ - 1>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_build_topology ( const TopologyTemplate< typename Shape::FaceTraits< ShapeType, topo_dim_ >::ShapeType > &  tmplt,
ElementTopology< topo_dim_ > &  topo,
const ElementTopology< parent_dim_ > &  parent_topo,
const ElementChildren< parent_dim_ > &  siblings 
)
inlineprotected

Construct a topology for a new child element.

Template Parameters
parent_dim_Dimension of the parent element
topo_dimDimension of the topology
dim_Current working dim
Parameters
[in]tmpltTopology template
[in,out]topoTopology being constructed
[in]parent_topoParent topology
[in]siblingsSibling elemets, aka children of the parent entity

Implemented via recursion on dim_.

Definition at line 1300 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_build_topology(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, FEAT::Geometry::BoundaryEdge, FEAT::Geometry::BoundaryFace, FEAT::Geometry::EntityReference::source, and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::vertex().

Referenced by FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_build_topology().

◆ _dbg_check_topology_orientations()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_dbg_check_topology_orientations ( const ElementTopology< topo_dim_ > &  topology)
inlineprotected

Definition at line 1487 of file adaptive_mesh.hpp.

◆ _dbg_check_topology_unique()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_dbg_check_topology_unique ( const ElementTopology< topo_dim_ > &  topology)
inlineprotected

Definition at line 1459 of file adaptive_mesh.hpp.

◆ _dbg_is_topology_consistent()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_dbg_is_topology_consistent ( const ElementTopology< topo_dim_ > &  topology)
inlineprotected

Definition at line 1531 of file adaptive_mesh.hpp.

◆ _dbg_is_topology_layering_consistent()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int topo_dim_, int dim_ = topo_dim_ - 1>
bool FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_dbg_is_topology_layering_consistent ( Intern::Layer  layer,
const ElementTopology< topo_dim_ > &  topology 
)
inlineprotected

Definition at line 1575 of file adaptive_mesh.hpp.

◆ _delete_unused()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_delete_unused ( std::unordered_map< Index, ElementRef< dim_ > > &  roots,
const std::set< Index > &  elements 
)
inlineprotected

Helper for garbage_collect. Deletes all entities of dimension dim that are not in the given set.

Parameters
[in,out]rootsMeshRoots to operate on
[in]setSet of mesh indices to keep

Definition at line 1423 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_erase().

◆ _erase()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_erase ( Intern::ElementKey< dim_ >  key)
inlineprotected

◆ _garbage_collect()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_ = shape_dim>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_garbage_collect ( Intern::MeshRoots< shape_dim > &  roots,
const Intern::MeshIndexSet set 
)
inlineprotected

Delete all elements from the storage and mesh roots that are not in the index set.

Parameters
[in,out]rootsMeshRoots to operate on
[in]setSet of mesh indices to keep

Definition at line 1449 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_garbage_collect().

Referenced by FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_garbage_collect(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::adapt().

◆ _levels()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int parent_dim_, int entity_dim_>
LevelTuple< entity_dim_ > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_levels ( const TopologyTemplate< typename Shape::FaceTraits< ShapeType, entity_dim_ >::ShapeType > &  tmplt,
const LevelTuple< parent_dim_ > &  lvls 
)
inlineprotected

Spread refinement levels to a child entity.

Template Parameters
parent_dim_Dimension of the parent
entity_dim_Dimension of the child entity
Parameters
tmpltTopology template for the children
lvlsRefinement field markings of the parent

Calculates the vertex markings for a child element, based on its topology template.

Definition at line 1263 of file adaptive_mesh.hpp.

References FEAT::Geometry::Intern::RefinementFieldTuple< VertexMarking_, size_ >::size.

◆ _resolve_boundary_entity_reference()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int entity_dim_, int result_dim_, int boundary_dim_>
OrientedElementRef< result_dim_ > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_resolve_boundary_entity_reference ( const ElementTopology< entity_dim_ > &  topo,
const EntityReference ref 
)
inlineprotected

◆ _resolve_entity_reference()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int entity_dim_, int result_dim_>
OrientedElementRef< result_dim_ > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_resolve_entity_reference ( const ElementTopology< entity_dim_ > &  topo,
const ElementChildren< entity_dim_ > &  siblings,
const EntityReference ref 
)
inlineprotected

Definition at line 1358 of file adaptive_mesh.hpp.

◆ adapt()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
AdaptionStats FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::adapt ( SubdivisionLevels foundation_levels,
ImportBehaviour  import_behaviour = ImportBehaviour::RequiredOnly 
)
inline

◆ bridge_pairs()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
std::vector< std::pair< Index, Index > > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::bridge_pairs ( )
inline

◆ create_refined_mesh()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<typename VertexMarker_ >
static FoundationMeshType FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::create_refined_mesh ( const FoundationMeshType foundation_mesh,
const VertexMarker_ &  marker 
)
inlinestatic

Use the AdaptiveMesh as a generator for other meshes.

Template Parameters
VertexMarker_Marker for creating subdivision levels. Callable object, which takes an Index as the only argument and returns a std::uint64_t. Used to assign a subdivision level to each vertex.
Parameters
[in]foundation_meshFoundation mesh which gets adaptively refined to produce the new mesh
[in]markerVertex marker which determines subdivision levels
Returns
A new, independent mesh of type FoundationMeshType
Note
Use this for one off refinements. Create and keep an AdaptiveMesh if you intend to change the mesh's refinement more than once.

Definition at line 402 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::adapt(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::All, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::foundation_mesh(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_vertices(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::num_layers(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::to_conformal_mesh().

◆ exclusive_meshpart()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
MeshPart< FoundationMeshType > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::exclusive_meshpart ( ) const
inline

Exclusive MeshPart factory.

Creates a MeshPart (without topology) of all elements of the foundation mesh that are not part of the AdaptiveMesh, i.e. all elements that are not overlapped by the AdaptiveMesh. That is, all elements which are not further refined (if ImportBehaviour::RequiredOnly is used) or no elements (if ImportBehaviour::All is used).

The created MeshPart is the inverse of the MeshPart created by overlap_meshpart().

Returns
A MeshPart describing all cells of the regular mesh not overlapped by this adaptive mesh

Definition at line 700 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_foundation_mesh, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_roots, FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::shape_dim.

◆ fill_neighbors()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
void FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::fill_neighbors ( )
inline

◆ foundation_mesh()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
FoundationMeshType & FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::foundation_mesh ( )
inline

◆ get_child()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
std::optional< Index > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_child ( Layer  layer,
Index  parent_idx,
Index  child 
)
inline

Retrieve index of a child element.

Template Parameters
dim_Dimension of the child
Parameters
[in]layerLayer of parent element
[in]parent_idxIndex 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 564 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::get_index().

◆ get_face_index()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_, int codim_>
Index FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_face_index ( Layer  layer,
Index  entity_idx,
Index  face_idx 
) const
inline

Returns an index of a sub-entity, i.e. the index of a face of a cell.

Template Parameters
dim_Dimension of the entity
codim_Dimension of the sub-entity
Parameters
[in]layerLayer to retrieve index on
[in]entity_idxIndex of the entity of layer
[in]face_idxIndex of the sub-entity

Definition at line 531 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::get_index().

◆ get_neighbor()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
Index FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_neighbor ( Layer  layer,
Index  element_idx,
Index  neighbor_idx 
) const
inline

Returns the index of the n-th neighbor of the given element.

Returns
The index of the neighbor, if one exists, ~Index(0) otherwise.

Definition at line 827 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::get_neighbor().

◆ get_num_children()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim>
Index FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_num_children ( Layer  layer,
Index  elem 
)
inline

Returns the number of children of an element in the mesh.

Parameters
[in]layerLayer of parent element
[in]elemIndex of parent
Returns
Number of children of parent

Definition at line 594 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::type().

◆ get_num_entities()

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

Returns number of elements of dimension dim in layer layer.

Parameters
[in]layerThe mesh layer to retrieve numbentr of elements from
[in]dimThe dimension of the elements

Definition at line 546 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::num_entities().

Referenced by FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::to_conformal_mesh().

◆ get_overlap_cell()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
std::optional< Index > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_overlap_cell ( Index  foundation_index)
inline

Mapping of elements of the foundation mesh to elements of the AdaptiveMesh.

Returns
Index of element corresponding to given foundation mesh element, if one exists. Index belongs to layer 0.

Definition at line 645 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_roots, FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::get_index().

◆ has_vertex_changed()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
bool FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::has_vertex_changed ( Layer  layer,
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 610 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::get_vertex_by_index(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::vertex().

◆ num_layers()

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

◆ num_total_entities()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<int dim_>
Index FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::num_total_entities ( ) const
inline

Returns the total number of entities of dimension dim_ across all mesh layers.

Definition at line 500 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage.

◆ overlap_mapping()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
std::vector< Index > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::overlap_mapping ( )
inline

◆ overlap_meshpart()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
MeshPart< FoundationMeshType > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::overlap_meshpart ( ) const
inline

Overlap MeshPart factory.

Creates a MeshPart (without topology) of all elements of the foundation mesh that are also part of the AdaptiveMesh, i.e. all elements that are overlapped by the AdaptiveMesh. That is, all elements which are further refined (if ImportBehaviour::RequiredOnly is used) or all elements (if ImportBehaviour::All is used).

The created MeshPart is the inverse of the MeshPart created by exclusive_meshpart().

Returns
A MeshPart describing all cells of the regular mesh overlapped by this adaptive mesh

Definition at line 744 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_roots, and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::shape_dim.

◆ project_meshpart()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<typename TargetMeshType_ >
MeshPart< TargetMeshType_ > FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::project_meshpart ( Layer  layer,
const MeshPart< FoundationMeshType > &  part 
) const
inline

Convert a mesh part on the regular mesh to a mesh part on the adaptive mesh.

All components of the adaptive mesh, that are a (grand)-child of any of the regular components are included. In other words, this method computes the intersection of a regular mesh part with an adaptive mesh, accounting for refinement of elements.

Maintains relative order of entities. This means, for example, if the original MeshPart contains edges 1, 4 and 6, then the projected mesh part will first contain all (grand)-children of edge 1, then all (grand-)children of edge 4, and then finally all (grand-)children of edge 6. This, by extension, means that mesh part projection is suitable for mirror assembly.

Template Parameters

in]

Parameters
[in]partThe MeshPart to project
[in]layerThe layer to project to
Returns
A mesh part corresponding to the regular mesh part

Definition at line 467 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_roots, and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage.

◆ to_conformal_mesh()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
FoundationMeshType FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::to_conformal_mesh ( Layer  layer) const
inline

◆ transfer_sdls()

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
SubdivisionLevels FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::transfer_sdls ( SubdivisionLevels lvls_in) const
inline

Transfer subdivision levels from the adaptive mesh to the foundation mesh.

For each vertex of the finest layer of the AdaptiveMesh the closest foundation mesh vertex is found and its subdivision level is set, such that each founation vertex is assigned the maximum subdivision level of any of its closests vertices.

Parameters
[in]lvl_inSubdivisionLevels on the AdaptiveMesh. Assigns a subdivision level to each vertex of the finest adaptive mesh level
Returns
SubdivisionLevels on the foundation mesh. Computed such that subdivision levels assigned to

Definition at line 782 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::get_vertex_by_index(), FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::num_entities(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::num_layers(), and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::num_layers().

◆ transform()

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

Applies a "proper rigid" transformation onto the mesh vertices.

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.
Warning
Affects all layers of the mesh

Definition at line 860 of file adaptive_mesh.hpp.

References FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage, and FEAT::Geometry::Intern::AdaptiveMeshStorage< MeshShape_, TemplateSet_, VertexType_ >::transform().

◆ vertex() [1/2]

◆ vertex() [2/2]

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
const VertexType & FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::vertex ( Layer  layer,
Index  vertex_index 
) const
inline

Friends And Related Function Documentation

◆ Intern::FoundationTopologyCollector

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<typename AdaptiveMeshType_ , int topology_dim_, int collection_dim_>
friend struct Intern::FoundationTopologyCollector
friend

Definition at line 298 of file adaptive_mesh.hpp.

◆ Intern::MeshPartProjector

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
template<typename AdaptiveMeshType_ , typename TargetMeshType_ , typename AlgShape_ >
friend struct Intern::MeshPartProjector
friend

Definition at line 295 of file adaptive_mesh.hpp.

Member Data Documentation

◆ _foundation_mesh

◆ _roots

◆ _stats

◆ _storage

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
MeshStorage FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_storage = {}
private

Mesh storage.

Definition at line 307 of file adaptive_mesh.hpp.

Referenced by FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_children(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_roots(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_roots_of_dim(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_adapt_sub_entities(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_build(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_build_topology(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_erase(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::_resolve_boundary_entity_reference(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::adapt(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::bridge_pairs(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::fill_neighbors(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_child(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_face_index(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_neighbor(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_num_children(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_num_entities(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::get_overlap_cell(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::has_vertex_changed(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::num_layers(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::num_total_entities(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::overlap_mapping(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::project_meshpart(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::transfer_sdls(), FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::transform(), and FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::vertex().

◆ shape_dim

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
constexpr int FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::shape_dim = ShapeType::dimension
staticconstexpr

◆ world_dim

template<typename TemplateSet_ , typename Shape_ , int num_coords_ = Shape_::dimension, typename Coord_ = Real>
constexpr int FEAT::Geometry::AdaptiveMesh< TemplateSet_, Shape_, num_coords_, Coord_ >::world_dim = ShapeType::dimension
staticconstexpr

World dimension.

Definition at line 223 of file adaptive_mesh.hpp.


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