Dune-Functions 2.12-git
Loading...
Searching...
No Matches
Dune::Functions::Experimental::SubDomainIndexSet< HGV > Class Template Reference

An IndexSet for a sub-domain. More...

#include <dune/functions/common/subdomain.hh>

Inheritance diagram for Dune::Functions::Experimental::SubDomainIndexSet< HGV >:
Inheritance graph

Classes

struct  Codim
 Codim specific typedefs. More...
 

Public Types

enum  { dimension = Grid::dimension }
 
using Grid = typename HostGridView::Grid
 
using Types = std::vector< Dune::GeometryType >
 
using IndexType = std::size_t
 

Public Member Functions

 SubDomainIndexSet (const HostGridView &hostGridView)
 Construct SubDomainIndexSet for underlying host grid view.
 
IndexType size (Dune::GeometryType gt) const
 
IndexType size (int codim) const
 
template<class Entity >
IndexType index (const Entity &entity) const
 
template<int cc>
IndexType index (const typename Codim< cc >::Entity &entity) const
 
template<class Entity >
IndexType subIndex (const Entity &entity, int subEntity, unsigned int codim) const
 
template<int cc>
IndexType subIndex (const typename Codim< cc >::Entity &entity, int subEntity, unsigned int codim) const
 
template<class Entity >
bool contains (const Entity &entity) const
 
Types types (int codim) const
 
const HostGridView & hostGridView () const
 Access underlying host grid view.
 
void insertElement (const typename Codim< 0 >::Entity &element)
 Insert element and all its sub-entities into SubDomainIndexSet.
 

Protected Member Functions

void clear ()
 

Protected Attributes

HostGridView hostGridView_
 
std::array< std::size_t, typeIndexSize > sizePerGT_
 
std::array< std::size_t, dimension+1 > sizePerCodim_
 
std::array< Types, dimension+1 > typesPerCodim_
 
AllEntityMapper allEntityMapper_
 
std::vector< IndexTypeindices_
 

Detailed Description

template<class HGV>
class Dune::Functions::Experimental::SubDomainIndexSet< HGV >

An IndexSet for a sub-domain.

A SubDomainIndexSet provides indices for a subset of the entities of a grid view. Once created, new entities can be inserted using subDomainIndexSet.insertElement(element) which will insert the grid element of codim 0 and all its sub entities. This will increment the internally stored size information accordingly. Querying the index of an entity or sub-entity that has not been inserted before will lead to an exception.

Internally this uses a std::vector<std::size_t> which stores the sub-domain index for each entity in the underlying grid view using a magic value for entities not contained in the sub-domain.

Template Parameters
HGVThe underlying host grid view type.

Member Typedef Documentation

◆ Grid

template<class HGV >
using Dune::Functions::Experimental::SubDomainIndexSet< HGV >::Grid = typename HostGridView::Grid

◆ IndexType

template<class HGV >
using Dune::Functions::Experimental::SubDomainIndexSet< HGV >::IndexType = std::size_t

◆ Types

Member Enumeration Documentation

◆ anonymous enum

template<class HGV >
anonymous enum
Enumerator
dimension 

Constructor & Destructor Documentation

◆ SubDomainIndexSet()

template<class HGV >
Dune::Functions::Experimental::SubDomainIndexSet< HGV >::SubDomainIndexSet ( const HostGridView &  hostGridView)
inline

Construct SubDomainIndexSet for underlying host grid view.

Member Function Documentation

◆ clear()

template<class HGV >
void Dune::Functions::Experimental::SubDomainIndexSet< HGV >::clear ( )
inlineprotected

◆ contains()

template<class HGV >
template<class Entity >
bool Dune::Functions::Experimental::SubDomainIndexSet< HGV >::contains ( const Entity entity) const
inline

◆ hostGridView()

template<class HGV >
const HostGridView & Dune::Functions::Experimental::SubDomainIndexSet< HGV >::hostGridView ( ) const
inline

Access underlying host grid view.

◆ index() [1/2]

template<class HGV >
template<class Entity >
IndexType Dune::Functions::Experimental::SubDomainIndexSet< HGV >::index ( const Entity entity) const
inline

◆ index() [2/2]

template<class HGV >
template<int cc>
IndexType Dune::Functions::Experimental::SubDomainIndexSet< HGV >::index ( const typename Codim< cc >::Entity entity) const
inline

◆ insertElement()

template<class HGV >
void Dune::Functions::Experimental::SubDomainIndexSet< HGV >::insertElement ( const typename Codim< 0 >::Entity element)
inline

Insert element and all its sub-entities into SubDomainIndexSet.

◆ size() [1/2]

template<class HGV >
IndexType Dune::Functions::Experimental::SubDomainIndexSet< HGV >::size ( Dune::GeometryType  gt) const
inline

◆ size() [2/2]

template<class HGV >
IndexType Dune::Functions::Experimental::SubDomainIndexSet< HGV >::size ( int  codim) const
inline

◆ subIndex() [1/2]

template<class HGV >
template<class Entity >
IndexType Dune::Functions::Experimental::SubDomainIndexSet< HGV >::subIndex ( const Entity entity,
int  subEntity,
unsigned int  codim 
) const
inline

◆ subIndex() [2/2]

template<class HGV >
template<int cc>
IndexType Dune::Functions::Experimental::SubDomainIndexSet< HGV >::subIndex ( const typename Codim< cc >::Entity entity,
int  subEntity,
unsigned int  codim 
) const
inline

◆ types()

template<class HGV >
Types Dune::Functions::Experimental::SubDomainIndexSet< HGV >::types ( int  codim) const
inline

Member Data Documentation

◆ allEntityMapper_

template<class HGV >
AllEntityMapper Dune::Functions::Experimental::SubDomainIndexSet< HGV >::allEntityMapper_
protected

◆ hostGridView_

template<class HGV >
HostGridView Dune::Functions::Experimental::SubDomainIndexSet< HGV >::hostGridView_
protected

◆ indices_

template<class HGV >
std::vector<IndexType> Dune::Functions::Experimental::SubDomainIndexSet< HGV >::indices_
protected

◆ sizePerCodim_

template<class HGV >
std::array<std::size_t, dimension+1> Dune::Functions::Experimental::SubDomainIndexSet< HGV >::sizePerCodim_
protected

◆ sizePerGT_

template<class HGV >
std::array<std::size_t, typeIndexSize> Dune::Functions::Experimental::SubDomainIndexSet< HGV >::sizePerGT_
protected

◆ typesPerCodim_

template<class HGV >
std::array<Types, dimension+1> Dune::Functions::Experimental::SubDomainIndexSet< HGV >::typesPerCodim_
protected

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