DUNE-FEM (unstable)

Dune::Fem::GridPartInterface< GridPartTraits > Class Template Reference

Interface for the GridPart classes A GridPart class allows to access only a specific subset of a grid's entities. A GridPart implementation provides the corresponding index set and a begin/end iterator pair for accessing those entities, the corresponding intersection iterators and a appropriate communication method. GridParts are used to parametrize spaces (see DiscreteFunctionSpaceDefault [in dune-fem]). More...

#include <dune/fem/gridpart/common/gridpart.hh>

Public Types

typedef GridPartTraits Traits
 Type of the Traits.
 
typedef Traits::GridPartType GridPartType
 Type of the implementation.
 
typedef Traits::GridType GridType
 type of Grid implementation
 
typedef GridType Grid
 type of Grid implementation
 
typedef Traits::IndexSetType IndexSetType
 Index set implementation.
 
typedef IndexSetType IndexSet
 Index set implementation.
 
typedef Traits::CommunicationType CommunicationType
 Collective communication.
 
typedef CommunicationType Communication
 Collective communication.
 
typedef Traits::TwistUtilityType TwistUtilityType
 Twist utility type.
 
typedef Traits::IntersectionIteratorType IntersectionIteratorType
 type of IntersectionIterator
 
typedef IntersectionIteratorType IntersectionIterator
 type of IntersectionIterator
 
typedef IntersectionIteratorType::Intersection IntersectionType
 type of Intersection
 
typedef IntersectionType Intersection
 type of Intersection
 

Public Member Functions

const GridTypegrid () const
 Returns const reference to the underlying grid.
 
GridTypegrid ()
 Returns reference to the underlying grid.
 
const IndexSetTypeindexSet () const
 Returns reference to index set of the underlying grid.
 
bool isConforming () const
 returns true if current grid part represents a conforming grid
 
int size (int codim) const
 obtain number of entities in a given codimension
 
int size (const GeometryType &type) const
 obtain number of entities with a given geometry type
 
template<int codim>
Codim< codim >::IteratorType begin () const
 obtain begin iterator for the interior-border partition More...
 
template<int codim, PartitionIteratorType pitype>
Codim< codim >::template Partition< pitype >::IteratorType begin () const
 obtain begin iterator for the given partition More...
 
template<int codim>
Codim< codim >::IteratorType end () const
 obtain end iterator for the interior-border partition More...
 
template<int codim, PartitionIteratorType pitype>
Codim< codim >::template Partition< pitype >::IteratorType end () const
 obtain end iterator for the given partition More...
 
int level () const
 Level of the grid part.
 
IntersectionIteratorType ibegin (const typename Codim< 0 >::EntityType &entity) const
 ibegin of corresponding intersection iterator for given entity
 
IntersectionIteratorType iend (const typename Codim< 0 >::EntityType &entity) const
 iend of corresponding intersection iterator for given entity
 
int boundaryId (const IntersectionType &intersection) const
 return boundary if given an intersection
 
const CommunicationTypecomm () const
 obtain collective communication object
 
template<class DataHandleImp , class DataType >
void communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
 corresponding communication method for grid part
 
template<class EntitySeed >
Codim< EntitySeed::codimension >::EntityType entity (const EntitySeed &seed) const
 obtain entity pointer from entity seed
 
template<class Entity >
const Entityconvert (const Entity &entity) const
 convert the grid's entity to a grid part entity Usually the parameter is GridType :: Codim< codim > :: Entity and the return is Codim< codim > :: EntityType. In general these types are the same, but for overloaded entities on grid parts this can differ.
 
template<class EntityType >
bool contains (const EntityType &e) const
 Return true if the given entity is contained in this grid view. More...
 
int sequence () const
 return sequence number to update structures depending on the grid part More...
 

Static Public Attributes

static const PartitionIteratorType indexSetPartitionType = Traits::indexSetPartitionType
 Maximum Partition type, the index set provides indices for.
 

Protected Member Functions

 GridPartInterface ()=default
 do not create explicit instances of this class
 

Detailed Description

template<class GridPartTraits>
class Dune::Fem::GridPartInterface< GridPartTraits >

Interface for the GridPart classes A GridPart class allows to access only a specific subset of a grid's entities. A GridPart implementation provides the corresponding index set and a begin/end iterator pair for accessing those entities, the corresponding intersection iterators and a appropriate communication method. GridParts are used to parametrize spaces (see DiscreteFunctionSpaceDefault [in dune-fem]).

Member Function Documentation

◆ begin() [1/2]

template<class GridPartTraits >
template<int codim>
Codim< codim >::IteratorType Dune::Fem::GridPartInterface< GridPartTraits >::begin ( ) const
inline

obtain begin iterator for the interior-border partition

Template Parameters
codimcodimension for which the iterator is requested

◆ begin() [2/2]

template<class GridPartTraits >
template<int codim, PartitionIteratorType pitype>
Codim< codim >::template Partition< pitype >::IteratorType Dune::Fem::GridPartInterface< GridPartTraits >::begin ( ) const
inline

obtain begin iterator for the given partition

Template Parameters
codimcodimension for which the iterator is requested
pityperequested partition iterator type

◆ contains()

template<class GridPartTraits >
template<class EntityType >
bool Dune::Fem::GridPartInterface< GridPartTraits >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in this grid view.

Todo:
Currently we call the implementation on the IndexSet. This may lead to suboptimal efficiency.
Note
If the input element e is not an element of the grid, then the result of contains() is undefined.

◆ end() [1/2]

template<class GridPartTraits >
template<int codim>
Codim< codim >::IteratorType Dune::Fem::GridPartInterface< GridPartTraits >::end ( ) const
inline

obtain end iterator for the interior-border partition

Template Parameters
codimcodimension for which the iterator is requested

◆ end() [2/2]

template<class GridPartTraits >
template<int codim, PartitionIteratorType pitype>
Codim< codim >::template Partition< pitype >::IteratorType Dune::Fem::GridPartInterface< GridPartTraits >::end ( ) const
inline

obtain end iterator for the given partition

Template Parameters
codimcodimension for which the iterator is requested
pityperequested partition iterator type

◆ sequence()

template<class GridPartTraits >
int Dune::Fem::GridPartInterface< GridPartTraits >::sequence ( ) const
inline

return sequence number to update structures depending on the grid part

Note
The default returns DofManager< Grid > :: sequence ()

References DUNE_THROW.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)