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

Mapping between RawEntities and EntityReferences. More...

#include <template_builder.hpp>

Public Types

using BaseClass = TemplateSearchSpace< typename Shape::FaceTraits< Shape_, Shape_::dimension - 1 >::ShapeType, num_coords_ >
 Our base class. More...
 
using Entry = EntitySearchEntry< Shape_, num_coords_ >
 Type of search entry for current shape. More...
 
template<int dim_>
using EntryByDim = EntitySearchEntry< typename Shape::FaceTraits< Shape_, dim_ >::ShapeType, num_coords_ >
 Accessor for EntitySearchEntry types. More...
 
template<int dim_>
using RawTemplateByDimes = RawTemplate< typename Shape::FaceTraits< ShapeType, dim_ >::ShapeType >
 Accessor for RawTemplate types. More...
 
using ShapeType = Shape_
 Current shape. More...
 

Public Member Functions

template<typename EntityShape_ , int dim_ = EntityShape_::dimension>
void add_boundary_entity (int parent_index, const RawTemplate< EntityShape_ > &tmplt)
 Adds boundary entities to the search space. More...
 
template<typename Shape__ >
void add_sibling (const RawEntity< Shape__, num_coords_ > &entity, Index idx)
 Add a sibling entity to the search space. More...
 
template<int dim_ = ShapeType::dimension - 1>
void add_topology ()
 Adds topology entities to a TemplateSearchSpace. More...
 
template<int dim_>
std::vector< EntryByDim< dim_ > > & entries ()
 Accessor for search space entries. More...
 
template<int dim_>
const std::vector< EntryByDim< dim_ > > & entries () const
 Const accessor for search space entries. More...
 
template<typename Shape__ >
EntityReference search (const RawEntity< Shape__, num_coords_ > &entity) const
 Search for a RawEntity in this search space. More...
 

Static Public Attributes

static const constexpr int num_coords = num_coords_
 

Protected Member Functions

void _add_sibling (const RawEntity< Shape_, num_coords_ > &entity, Index idx)
 Inner add_sibling logic for the current shape. More...
 
template<int dim_ = ShapeType::dimension - 1>
void _add_topology_rec (const std::array< Tiny::Vector< Real, num_coords >, Shape::FaceTraits< ShapeType, 0 >::count > &vertices)
 Helper-function for add_topology_to_search_space. More...
 
EntityReference _search (const RawEntity< Shape_, num_coords_ > &entity) const
 Inner search logic for the current shape. More...
 

Protected Attributes

std::vector< Entry_entries
 Vector of search space entries. More...
 

Detailed Description

template<typename Shape_, int num_coords_ = Shape_::dimension>
class FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >

Mapping between RawEntities and EntityReferences.

Template Parameters
Shape_Template shape
num_coords_Number of coordinates for each vertex

The TemplateBuilder constructs RefinementTemplates from lists of RawEntities. During this process RawEntities must be mapped to EntityReferences, so that the AdaptiveMesh can retrieve the correct entities during refinement.

This class manages a list of EntitySearchEntries to allow this mapping. It is dimension-recursive to allows storing entities of multiple dimensions.

Definition at line 981 of file template_builder.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename Shape_ , int num_coords_ = Shape_::dimension>
using FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::BaseClass = TemplateSearchSpace<typename Shape::FaceTraits<Shape_, Shape_::dimension - 1>::ShapeType, num_coords_>

Our base class.

Definition at line 993 of file template_builder.hpp.

◆ Entry

template<typename Shape_ , int num_coords_ = Shape_::dimension>
using FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::Entry = EntitySearchEntry<Shape_, num_coords_>

Type of search entry for current shape.

Definition at line 989 of file template_builder.hpp.

◆ EntryByDim

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<int dim_>
using FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::EntryByDim = EntitySearchEntry<typename Shape::FaceTraits<Shape_, dim_>::ShapeType, num_coords_>

Accessor for EntitySearchEntry types.

Definition at line 998 of file template_builder.hpp.

◆ RawTemplateByDimes

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<int dim_>
using FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::RawTemplateByDimes = RawTemplate<typename Shape::FaceTraits<ShapeType, dim_>::ShapeType>

Accessor for RawTemplate types.

Definition at line 1002 of file template_builder.hpp.

◆ ShapeType

template<typename Shape_ , int num_coords_ = Shape_::dimension>
using FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::ShapeType = Shape_

Current shape.

Definition at line 986 of file template_builder.hpp.

Member Function Documentation

◆ _add_sibling()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
void FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_add_sibling ( const RawEntity< Shape_, num_coords_ > &  entity,
Index  idx 
)
inlineprotected

◆ _add_topology_rec()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<int dim_ = ShapeType::dimension - 1>
void FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_add_topology_rec ( const std::array< Tiny::Vector< Real, num_coords >, Shape::FaceTraits< ShapeType, 0 >::count > &  vertices)
inlineprotected

◆ _search()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
EntityReference FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_search ( const RawEntity< Shape_, num_coords_ > &  entity) const
inlineprotected

◆ add_boundary_entity()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<typename EntityShape_ , int dim_ = EntityShape_::dimension>
void FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::add_boundary_entity ( int  parent_index,
const RawTemplate< EntityShape_ > &  tmplt 
)
inline

Adds boundary entities to the search space.

This function adds the entities of a template to the search space as boundary elements.

Parameters
[in]parent_indexWhich boundary entity we are adding
[in]tmpltEntities to add

Definition at line 1068 of file template_builder.hpp.

References FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::add_boundary_entity(), FEAT::Geometry::BoundaryEdge, FEAT::Geometry::BoundaryFace, and FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::entries().

Referenced by FEAT::Geometry::TemplateBuilder< RawData_ >::_setup_search_space(), and FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::add_boundary_entity().

◆ add_sibling()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<typename Shape__ >
void FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::add_sibling ( const RawEntity< Shape__, num_coords_ > &  entity,
Index  idx 
)
inline

Add a sibling entity to the search space.

Parameters
[in]entityThe entity to add
[in]idxThe index of the entity

These sibling entities get created by the template builder during template construction. We hence present a way to easily add these to the search space.

Definition at line 1053 of file template_builder.hpp.

References FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_add_sibling().

Referenced by FEAT::Geometry::TemplateBuilder< RawData_ >::_build_template().

◆ add_topology()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<int dim_ = ShapeType::dimension - 1>
void FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::add_topology ( )
inline

Adds topology entities to a TemplateSearchSpace.

This function adds the entities of a shapes topology to a search space.

Parameters
[in]search_spaceThe search space to add to

Definition at line 1118 of file template_builder.hpp.

References FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_add_topology_rec().

Referenced by FEAT::Geometry::TemplateBuilder< RawData_ >::_setup_search_space().

◆ entries() [1/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<int dim_>
std::vector< EntryByDim< dim_ > > & FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::entries ( )
inline

◆ entries() [2/2]

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<int dim_>
const std::vector< EntryByDim< dim_ > > & FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::entries ( ) const
inline

Const accessor for search space entries.

Definition at line 1017 of file template_builder.hpp.

◆ search()

template<typename Shape_ , int num_coords_ = Shape_::dimension>
template<typename Shape__ >
EntityReference FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::search ( const RawEntity< Shape__, num_coords_ > &  entity) const
inline

Search for a RawEntity in this search space.

Parameters
[in]entityA raw entity
Note
O(n) runtime, n number of search space entries.
Returns
A EntityReference that refers to the given raw entity if one exists. Aborts otherwise.

Definition at line 1037 of file template_builder.hpp.

References FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_search().

Referenced by FEAT::Geometry::TemplateBuilder< RawData_ >::_build_topology().

Member Data Documentation

◆ _entries

template<typename Shape_ , int num_coords_ = Shape_::dimension>
std::vector<Entry> FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::_entries
protected

◆ num_coords

template<typename Shape_ , int num_coords_ = Shape_::dimension>
const constexpr int FEAT::Geometry::TemplateSearchSpace< Shape_, num_coords_ >::num_coords = num_coords_
staticconstexpr

Definition at line 990 of file template_builder.hpp.


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