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

VertexSet interface for adaptive meshes. More...

#include <adaptive_mesh_layer.hpp>

Public Types

using AdaptiveMeshType = AdaptiveMeshType_
 Type of underlying adaptive mesh. More...
 
using CoordType = typename AdaptiveMeshType::CoordType
 Type of single vertex coordinate. More...
 
using VertexType = typename AdaptiveMeshType::VertexType
 Vertex type. More...
 

Public Member Functions

 AdaptiveVertexSet (std::shared_ptr< AdaptiveMeshType > mesh, Layer layer)
 Constructor. More...
 
std::size_t bytes () const
 
AdaptiveVertexSet clone () const
 Returns a clone of this vertex set. More...
 
int get_num_coords () const
 Returns the number of coordinates per vertex. More...
 
Index get_num_vertices () const
 Returns the number of vertices in the vertex set. More...
 
VertexTypeoperator[] (Index idx)
 Returns a reference to a vertex. More...
 
const VertexTypeoperator[] (Index idx) const
 Returns a reference to a vertex. More...
 
void permute (const Adjacency::Permutation &perm, bool invert=false)
 Permutes this vertex set. More...
 

Static Public Member Functions

static String name ()
 

Static Public Attributes

static constexpr int num_coords = AdaptiveMeshType::world_dim
 Number of coordinates per vertex. More...
 

Private Attributes

Layer _layer
 
std::shared_ptr< AdaptiveMeshType_mesh
 Underlying adaptive mesh. More...
 
std::optional< Adjacency::Permutation_perm
 

Detailed Description

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

VertexSet interface for adaptive meshes.

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

Author
Markus Muegge

Definition at line 34 of file adaptive_mesh_layer.hpp.

Member Typedef Documentation

◆ AdaptiveMeshType

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

Type of underlying adaptive mesh.

Definition at line 38 of file adaptive_mesh_layer.hpp.

◆ CoordType

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

Type of single vertex coordinate.

Definition at line 44 of file adaptive_mesh_layer.hpp.

◆ VertexType

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

Vertex type.

Definition at line 47 of file adaptive_mesh_layer.hpp.

Constructor & Destructor Documentation

◆ AdaptiveVertexSet()

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

Constructor.

Parameters
[in]meshShared pointer to underlying mesh
[in]layerLayer this vertex set is to refer to

Definition at line 70 of file adaptive_mesh_layer.hpp.

Member Function Documentation

◆ bytes()

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

Definition at line 86 of file adaptive_mesh_layer.hpp.

◆ clone()

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

Returns a clone of this vertex set.

Warning
A AdaptiveVertexSet is a view into a underlying AdaptiveMesh. The returned clone will thus not be independent of this AdaptiveVertexSet.

Definition at line 81 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::_mesh.

◆ get_num_coords()

template<typename AdaptiveMeshType_ >
int FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::get_num_coords ( ) const
inline

Returns the number of coordinates per vertex.

Definition at line 95 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::num_coords.

◆ get_num_vertices()

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

Returns the number of vertices in the vertex set.

Definition at line 103 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::_mesh.

◆ name()

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

Definition at line 168 of file adaptive_mesh_layer.hpp.

◆ operator[]() [1/2]

template<typename AdaptiveMeshType_ >
VertexType & FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::operator[] ( Index  idx)
inline

Returns a reference to a vertex.

Parameters
[in]idxThe index of the vertex to be returned.
Returns
A reference to the vertex.

Definition at line 115 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::_mesh.

◆ operator[]() [2/2]

template<typename AdaptiveMeshType_ >
const VertexType & FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::operator[] ( Index  idx) const
inline

Returns a reference to a vertex.

Parameters
[in]idxThe index of the vertex to be returned.
Returns
A reference to the vertex.

Definition at line 125 of file adaptive_mesh_layer.hpp.

References FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::_mesh.

◆ permute()

template<typename AdaptiveMeshType_ >
void FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::permute ( const Adjacency::Permutation perm,
bool  invert = false 
)
inline

Permutes this vertex set.

Parameters
[in]permThe permutation to apply
[in]invertSpecified whether to apply the forward or inverse permutation
Warning
Does not permute the underlying memory. The permutation is applied by mapping indices one each future access.
Does not apply to any other AdaptiveVertexSet, even if the other AdaptiveVertexSet points to the same AdaptiveMesh.

Definition at line 149 of file adaptive_mesh_layer.hpp.

References FEAT::Adjacency::Permutation::clone(), FEAT::Adjacency::Permutation::concat(), and FEAT::Adjacency::Permutation::inverse().

Referenced by FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::create_permutation(), and FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::set_permutation().

Member Data Documentation

◆ _layer

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

Definition at line 54 of file adaptive_mesh_layer.hpp.

◆ _mesh

◆ _perm

template<typename AdaptiveMeshType_ >
std::optional<Adjacency::Permutation> FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::_perm
private

Definition at line 61 of file adaptive_mesh_layer.hpp.

◆ num_coords

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

Number of coordinates per vertex.

Definition at line 41 of file adaptive_mesh_layer.hpp.

Referenced by FEAT::Geometry::AdaptiveVertexSet< AdaptiveMeshType_ >::get_num_coords().


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