dune-multidomaingrid 2.9
Loading...
Searching...
No Matches
Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType > Class Template Reference

A meta grid for dividing an existing DUNE grid into subdomains that can be accessed as a grid in their own right. More...

#include <dune/grid/multidomaingrid/multidomaingrid.hh>

Inheritance diagram for Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >:
Inheritance graph

Public Types

using HostGrid = HostGrid_
 
typedef MultiDomainGridFamily< HostGrid, MDGridTraitsTypeGridFamily
 
typedef GridFamily::Traits Traits
 
typedef MDGridTraitsType MDGridTraits
 
typedef HostGrid::ctype ctype
 
typedef MDGridTraits::SubDomainIndex SubDomainIndex
 The (integer) type used to identify subdomains.
 
typedef subdomain::SubDomainGrid< ThisTypeSubDomainGrid
 The type used for representing the grid of a subdomain, always a specialization of Dune::mdgrid::subdomain::SubDomainGrid.
 
typedef Traits::LeafSubDomainInterfaceIterator LeafSubDomainInterfaceIterator
 The type of the iterators over the codim 1 interface between two subdomains on the leaf view.
 
typedef Traits::LevelSubDomainInterfaceIterator LevelSubDomainInterfaceIterator
 The type of the iterators over the codim 1 interface between two subdomains on a level view.
 
typedef Traits::LeafAllSubDomainInterfacesIterator LeafAllSubDomainInterfacesIterator
 The type of the iterators over the codim 1 interfaces between all subdomains on the leaf view.
 
typedef Traits::LevelAllSubDomainInterfacesIterator LevelAllSubDomainInterfacesIterator
 The type of the iterators over the codim 1 interfaces between all subdomains on a level view.
 
typedef GridFamily::Traits::LeafGridView LeafGridView
 
typedef GridFamily::Traits::LevelGridView LevelGridView
 
typedef GridFamily::Traits::LeafIntersection LeafIntersection
 
typedef GridFamily::Traits::LevelIntersection LevelIntersection
 
typedef GridFamily::Traits::LeafIntersectionIterator LeafIntersectionIterator
 
typedef GridFamily::Traits::LevelIntersectionIterator LevelIntersectionIterator
 
typedef GridFamily::Traits::HierarchicIterator HierarchicIterator
 
typedef GridFamily::Traits::LevelIndexSet LevelIndexSet
 
typedef GridFamily::Traits::LeafIndexSet LeafIndexSet
 
typedef GridFamily::Traits::GlobalIdSet GlobalIdSet
 
typedef GridFamily::Traits::LocalIdSet LocalIdSet
 
typedef detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t, typename GridFamily::TraitsCommunication
 
typedef Communication CollectiveCommunication
 

Public Member Functions

const SubDomainIndex maxSubDomainIndex () const
 The largest allowed index for a subdomain.
 
Traits::LevelGridView levelGridView (int level) const
 
Traits::LeafGridView leafGridView () const
 
bool mark (int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
 
bool mark (int refCount, const typename Codim< 0 >::Entity &e)
 
int getMark (const typename Traits::template Codim< 0 >::Entity &e) const
 
int getMark (const typename Codim< 0 >::Entity &e) const
 
Constructors
 MultiDomainGrid (const std::shared_ptr< HostGrid > &hostGrid, bool supportLevelIndexSets=true)
 Constructs a new MultiDomainGrid from the given host grid.
 
 MultiDomainGrid (const std::shared_ptr< HostGrid > &hostGrid, const MDGridTraitsType &traits, bool supportLevelIndexSets=true)
 Constructs a new MultiDomainGrid from the given host grid.
 
 MultiDomainGrid (HostGrid &hostGrid, bool supportLevelIndexSets=true)
 Constructs a new MultiDomainGrid from the given host grid.
 
 MultiDomainGrid (HostGrid &hostGrid, const MDGridTraitsType &traits, bool supportLevelIndexSets=true)
 Constructs a new MultiDomainGrid from the given host grid.
 
Dune grid interface methods
template<typename EntitySeed >
Traits::template Codim< EntitySeed::codimension >::Entity entity (const EntitySeed &entitySeed) const
 
int maxLevel () const
 The current maximum level of the grid.
 
template<int codim>
Traits::template Codim< codim >::LevelIterator lbegin (int level) const
 
template<int codim>
Traits::template Codim< codim >::LevelIterator lend (int level) const
 
template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LevelIterator lbegin (int level) const
 
template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LevelIterator lend (int level) const
 
template<int codim>
Traits::template Codim< codim >::LeafIterator leafbegin () const
 
template<int codim>
Traits::template Codim< codim >::LeafIterator leafend () const
 
template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin () const
 
template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafend () const
 
int size (int level, int codim) const
 
int size (int codim) const
 
int size (int level, GeometryType type) const
 
int size (GeometryType type) const
 
const Traits::GlobalIdSetglobalIdSet () const
 
const Traits::LocalIdSetlocalIdSet () const
 
const Traits::LevelIndexSetlevelIndexSet (int level) const
 
const Traits::LeafIndexSetleafIndexSet () const
 
void globalRefine (int refCount)
 
bool mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e)
 
int getMark (const typename Traits::template Codim< 0 >::Entity &e)
 
bool preAdapt ()
 
bool adapt ()
 
void postAdapt ()
 
int overlapSize (int level, int codim) const
 
int overlapSize (int codim) const
 
int ghostSize (int level, int codim) const
 
int ghostSize (int codim) const
 
const Traits::Communicationcomm () const
 
template<typename DataHandleImp , typename DataTypeImp >
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
 
template<typename DataHandleImp , typename DataTypeImp >
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const
 
template<typename DataHandle >
bool loadBalance (DataHandle &dataHandle)
 
bool loadBalance ()
 
size_t numBoundarySegments () const
 
Methods for iterating over subdomain interfaces
LeafSubDomainInterfaceIterator leafSubDomainInterfaceBegin (SubDomainIndex subDomain1, SubDomainIndex subDomain2) const
 Returns an iterator over the leaf interface of two subdomains.
 
LeafSubDomainInterfaceIterator leafSubDomainInterfaceEnd (SubDomainIndex subDomain1, SubDomainIndex subDomain2) const
 Returns the corresponding end iterator for leafSubDomainInterfaceBegin().
 
LevelSubDomainInterfaceIterator levelSubDomainInterfaceBegin (SubDomainIndex subDomain1, SubDomainIndex subDomain2, int level) const
 Returns an iterator over the interface of two subdomains at the given level.
 
LevelSubDomainInterfaceIterator levelSubDomainInterfaceEnd (SubDomainIndex subDomain1, SubDomainIndex subDomain2, int level) const
 Returns the corresponding end iterator for levelSubDomainInterfaceBegin().
 
LeafAllSubDomainInterfacesIterator leafAllSubDomainInterfacesBegin () const
 Returns an iterator over all subdomain interfaces on the leaf view.
 
LeafAllSubDomainInterfacesIterator leafAllSubDomainInterfacesEnd () const
 Returns the corresponding end iterator for leafAllSubDomainInterfacesBegin().
 
LevelAllSubDomainInterfacesIterator levelAllSubDomainInterfacesBegin (int level) const
 Returns an iterator over all subdomain interfaces on the requested level view.
 
LevelAllSubDomainInterfacesIterator levelAllSubDomainInterfacesEnd (int level) const
 Returns the corresponding end iterator for levelAllSubDomainInterfacesBegin().
 
Subdomain creation- and adaptation methods
void startSubDomainMarking ()
 Prepares the grid for (re-)assigning cells to subdomains.
 
void preUpdateSubDomains ()
 Calculates the new subdomain layout, but does not update the current subdomains yet.
 
void updateSubDomains ()
 Switches the subdomain layout over to the new layout.
 
void postUpdateSubDomains ()
 clears the saved state of the subdomain layout that was active before the last call to updateSubDomains().
 
void addToSubDomain (SubDomainIndex subDomain, const typename Traits::template Codim< 0 >::Entity &e)
 Adds the given leaf entity to the specified subdomain.
 
void removeFromSubDomain (SubDomainIndex subDomain, const typename Traits::template Codim< 0 >::Entity &e)
 Removes the given leaf entity from the specified subdomain.
 
void assignToSubDomain (SubDomainIndex subDomain, const typename Traits::template Codim< 0 >::Entity &e)
 Assigns the given leaf entity to the specified subdomain, clearing any previous subdomain assignments.
 
void removeFromAllSubDomains (const typename Traits::template Codim< 0 >::Entity &e)
 Removes the given leaf entity from all subdomains it currently belongs to.
 
Access to the subdomain grids
const SubDomainGridsubDomain (SubDomainIndex subDomain) const
 Returns a reference to the SubDomainGrid associated with the given subdomain.
 
SubDomainGridsubDomain (SubDomainIndex subDomain)
 Returns a reference to the SubDomainGrid associated with the given subdomain.
 
SubDomainIndex maxAssignedSubDomainIndex () const
 Returns the largest subdomain index that was ever assigned to a cell in this grid.
 
bool supportLevelIndexSets () const
 Indicates whether this MultiDomainGrid instance supports level index sets on its SubDomainGrids.
 

Static Public Member Functions

static constexpr bool maxSubDomainIndexIsStatic ()
 

Static Public Attributes

static const std::size_t maxNumberOfSubDomains = MDGridTraits::maxSubDomainsPerCell
 The largest number of subdomains any given grid cell may belong to.
 
static constexpr int dimension
 
static constexpr int dimensionworld
 

Protected Types

typedef typename T::Communication Communication_t
 
typedef typename T::CollectiveCommunication DeprecatedCollectiveCommunication_t
 

Protected Member Functions

GridImpasImp ()
 
const GridImpasImp () const
 

Entity conversion methods

const MDGridTraitstraits () const
 
template<typename Entity >
Traits::template Codim< Entity::codimension >::Entity wrapHostEntity (const Entity &e) const
 
template<int codim>
Traits::template Codim< codim >::Entity wrapHostEntity (const typename HostGrid::template Codim< codim >::Entity &e) const
 
template<typename EntityType >
static const HostEntity< EntityType >::type & hostEntity (const EntityType &e)
 Returns a reference to the corresponding host entity.
 
template<typename EntityType >
static const MultiDomainEntity< EntityType >::type & multiDomainEntity (const EntityType &e)
 
template<typename IntersectionType >
static const automultiDomainIntersection (const IntersectionType &is)
 

Detailed Description

template<typename HostGrid_, typename MDGridTraitsType>
class Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >

A meta grid for dividing an existing DUNE grid into subdomains that can be accessed as a grid in their own right.

Template Parameters
HostGridThe type of the underlying grid implementation.
MDGridTraitsTypeA traits type for customizing how the MultiDomainGrid manages the partitioning information.

Member Typedef Documentation

◆ ctype

◆ GridFamily

◆ HostGrid

◆ LeafAllSubDomainInterfacesIterator

The type of the iterators over the codim 1 interfaces between all subdomains on the leaf view.

◆ LeafSubDomainInterfaceIterator

The type of the iterators over the codim 1 interface between two subdomains on the leaf view.

◆ LevelAllSubDomainInterfacesIterator

The type of the iterators over the codim 1 interfaces between all subdomains on a level view.

◆ LevelSubDomainInterfaceIterator

The type of the iterators over the codim 1 interface between two subdomains on a level view.

◆ MDGridTraits

◆ SubDomainGrid

The type used for representing the grid of a subdomain, always a specialization of Dune::mdgrid::subdomain::SubDomainGrid.

◆ SubDomainIndex

typedef MDGridTraits::SubDomainIndex Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::SubDomainIndex

The (integer) type used to identify subdomains.

◆ Traits

Constructor & Destructor Documentation

◆ MultiDomainGrid() [1/4]

Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::MultiDomainGrid ( const std::shared_ptr< HostGrid > &  hostGrid,
bool  supportLevelIndexSets = true 
)
inlineexplicit

Constructs a new MultiDomainGrid from the given host grid.

Parameters
hostGridthe host grid that will be wrapped by the MultiDomainGrid
supportLevelIndexSetsflag indicating support for level index sets on subdomains

◆ MultiDomainGrid() [2/4]

Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::MultiDomainGrid ( const std::shared_ptr< HostGrid > &  hostGrid,
const MDGridTraitsType traits,
bool  supportLevelIndexSets = true 
)
inlineexplicit

Constructs a new MultiDomainGrid from the given host grid.

Parameters
hostGridthe host grid that will be wrapped by the MultiDomainGrid
traitsan instance of the grid traits, which might contain runtime information
supportLevelIndexSetsflag indicating support for level index sets on subdomains

◆ MultiDomainGrid() [3/4]

Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::MultiDomainGrid ( HostGrid hostGrid,
bool  supportLevelIndexSets = true 
)
inlineexplicit

Constructs a new MultiDomainGrid from the given host grid.

Parameters
hostGridthe host grid that will be wrapped by the MultiDomainGrid
supportLevelIndexSetsflag indicating support for level index sets on subdomains

◆ MultiDomainGrid() [4/4]

Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::MultiDomainGrid ( HostGrid hostGrid,
const MDGridTraitsType traits,
bool  supportLevelIndexSets = true 
)
inlineexplicit

Constructs a new MultiDomainGrid from the given host grid.

Parameters
hostGridthe host grid that will be wrapped by the MultiDomainGrid
traitsan instance of the grid traits, which might contain runtime information
supportLevelIndexSetsflag indicating support for level index sets on subdomains

Member Function Documentation

◆ adapt()

◆ addToSubDomain()

void Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::addToSubDomain ( SubDomainIndex  subDomain,
const typename Traits::template Codim< 0 >::Entity e 
)
inline

Adds the given leaf entity to the specified subdomain.

◆ assignToSubDomain()

void Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::assignToSubDomain ( SubDomainIndex  subDomain,
const typename Traits::template Codim< 0 >::Entity e 
)
inline

Assigns the given leaf entity to the specified subdomain, clearing any previous subdomain assignments.

◆ comm()

◆ communicate() [1/2]

◆ communicate() [2/2]

◆ entity()

◆ getMark()

◆ ghostSize() [1/2]

◆ ghostSize() [2/2]

int Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::ghostSize ( int  level,
int  codim 
) const
inline

◆ globalIdSet()

◆ globalRefine()

◆ hostEntity()

Returns a reference to the corresponding host entity.

Warning
The returned reference will only be valid as long as the passed-in reference to the MultiDomainGrid entity! If you need a persistent host entity object , copy the returned reference.

◆ lbegin() [1/2]

template<int codim>
Traits::template Codim< codim >::LevelIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::lbegin ( int  level) const
inline

◆ lbegin() [2/2]

template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LevelIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::lbegin ( int  level) const
inline

◆ leafAllSubDomainInterfacesBegin()

Returns an iterator over all subdomain interfaces on the leaf view.

This method returns an iterator that will visit all pairwise surface interfaces between subdomains on the leaf view. In particular, given to adjacent cells \(e_1\) and \(e_2\) and two subdomains \(s_1\) and \(s_2\), this iterator will visit the intersection between \(e_1\) and \(e_2\) iff all of the following hold:

\begin{eqnarray*} e_1 \in s_1,\ e_1 \not\in s_2,\\ e_2 \not\in s_1,\ e_1 \in s_2.\end{eqnarray*}

In essence, the two subdomains have to be locally disjoint on \(e_1\) and \(e_2\).

The iterator will only traverse the host grid once for visiting all subdomain interfaces. Incrementing the iterator might thus result in an iterator pointing to the same grid intersection, but to a different pair of subdomains. The subdomains pointed to by the iterator can be retrieved by calling LeafAllSubDomainInterfacesIterator::subDomain1() and LeafAllSubDomainInterfacesIterator::subDomain2(), respectively.

◆ leafAllSubDomainInterfacesEnd()

Returns the corresponding end iterator for leafAllSubDomainInterfacesBegin().

◆ leafbegin() [1/2]

template<int codim>
Traits::template Codim< codim >::LeafIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::leafbegin ( ) const
inline

◆ leafbegin() [2/2]

template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::leafbegin ( ) const
inline

◆ leafend() [1/2]

template<int codim>
Traits::template Codim< codim >::LeafIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::leafend ( ) const
inline

◆ leafend() [2/2]

template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::leafend ( ) const
inline

◆ leafIndexSet()

◆ leafSubDomainInterfaceBegin()

LeafSubDomainInterfaceIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::leafSubDomainInterfaceBegin ( SubDomainIndex  subDomain1,
SubDomainIndex  subDomain2 
) const
inline

Returns an iterator over the leaf interface of two subdomains.

The resulting iterator will visit all cell intersections that are part of both subdomains.

Attention
The iterator assumes the two subdomains to be non-overlapping! If there is an overlap, some intersections will be iterated over twice!
Parameters
subDomain1the first subdomain
subDomain2the second subdomain

◆ leafSubDomainInterfaceEnd()

Returns the corresponding end iterator for leafSubDomainInterfaceBegin().

◆ lend() [1/2]

template<int codim>
Traits::template Codim< codim >::LevelIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::lend ( int  level) const
inline

◆ lend() [2/2]

template<int codim, PartitionIteratorType pitype>
Traits::template Codim< codim >::template Partition< pitype >::LevelIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::lend ( int  level) const
inline

◆ levelAllSubDomainInterfacesBegin()

Returns an iterator over all subdomain interfaces on the requested level view.

This method returns an iterator that will visit all pairwise surface interfaces between subdomains on the requested level view. In particular, given to adjacent cells \(e_1\) and \(e_2\) and two subdomains \(s_1\) and \(s_2\), this iterator will visit the intersection between \(e_1\) and \(e_2\) iff all of the following hold:

\begin{eqnarray*} e_1 \in s_1,\ e_1 \not\in s_2,\\ e_2 \not\in s_1,\ e_1 \in s_2.\end{eqnarray*}

In essence, the two subdomains have to be locally disjoint on \(e_1\) and \(e_2\).

The iterator will only traverse the host grid once for visiting all subdomain interfaces. Incrementing the iterator might thus result in an iterator pointing to the same grid intersection, but to a different pair of subdomains. The subdomains pointed to by the iterator can be retrieved by calling LevelAllSubDomainInterfacesIterator::subDomain1() and LevelAllSubDomainInterfacesIterator::subDomain2(), respectively.

Parameters
levelthe grid level to be iterated over.

◆ levelAllSubDomainInterfacesEnd()

Returns the corresponding end iterator for levelAllSubDomainInterfacesBegin().

Parameters
levelthe grid level to be iterated over.

◆ levelIndexSet()

◆ levelSubDomainInterfaceBegin()

LevelSubDomainInterfaceIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::levelSubDomainInterfaceBegin ( SubDomainIndex  subDomain1,
SubDomainIndex  subDomain2,
int  level 
) const
inline

Returns an iterator over the interface of two subdomains at the given level.

The resulting iterator will visit all cell intersections that are part of both subdomains.

Attention
The iterator assumes the two subdomains to be non-overlapping! If there is an overlap, some intersections will be iterated over twice!
Parameters
subDomain1the first subdomain
subDomain2the second subdomain
levelthe grid level over which to iterate

◆ levelSubDomainInterfaceEnd()

LevelSubDomainInterfaceIterator Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::levelSubDomainInterfaceEnd ( SubDomainIndex  subDomain1,
SubDomainIndex  subDomain2,
int  level 
) const
inline

Returns the corresponding end iterator for levelSubDomainInterfaceBegin().

Parameters
levelthe grid level to be iterated over.

◆ loadBalance() [1/2]

◆ loadBalance() [2/2]

template<typename DataHandle >
bool Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::loadBalance ( DataHandle &  dataHandle)
inline

◆ localIdSet()

◆ mark()

bool Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::mark ( int  refCount,
const typename Traits::template Codim< 0 >::Entity e 
)
inline

◆ maxAssignedSubDomainIndex()

Returns the largest subdomain index that was ever assigned to a cell in this grid.

This method returns the largest subdomain index that was passed to addToSubDomain() or assignToSubDomain() since this MultiDomainGrid was created. Keep in mind that the subdomain belonging to that index might not contain any entities anymore if all entities have been removed from it at a later point.

◆ maxLevel()

The current maximum level of the grid.

◆ maxSubDomainIndex()

The largest allowed index for a subdomain.

Note
As subdomain indices always start at 0, this also determines the maximum number of possible subdomains.

◆ maxSubDomainIndexIsStatic()

static constexpr bool Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::maxSubDomainIndexIsStatic ( )
inlinestaticconstexpr

◆ multiDomainEntity()

template<typename EntityType >
static const MultiDomainEntity< EntityType >::type & Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::multiDomainEntity ( const EntityType e)
inlinestatic

◆ multiDomainIntersection()

template<typename IntersectionType >
static const auto & Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::multiDomainIntersection ( const IntersectionType &  is)
inlinestatic

◆ numBoundarySegments()

◆ overlapSize() [1/2]

◆ overlapSize() [2/2]

int Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::overlapSize ( int  level,
int  codim 
) const
inline

◆ postAdapt()

◆ postUpdateSubDomains()

clears the saved state of the subdomain layout that was active before the last call to updateSubDomains().

◆ preAdapt()

◆ preUpdateSubDomains()

Calculates the new subdomain layout, but does not update the current subdomains yet.

After calling this method, you can query the grid for the changes that will occur when the new subdomain layout becomes active. This includes the possibility to obtain the new indices entities will be assigned in the modified subdomains.

To switch the grid over to the new layout, call updateSubDomains().

◆ removeFromAllSubDomains()

void Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::removeFromAllSubDomains ( const typename Traits::template Codim< 0 >::Entity e)
inline

Removes the given leaf entity from all subdomains it currently belongs to.

◆ removeFromSubDomain()

void Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::removeFromSubDomain ( SubDomainIndex  subDomain,
const typename Traits::template Codim< 0 >::Entity e 
)
inline

Removes the given leaf entity from the specified subdomain.

◆ size() [1/4]

◆ size() [2/4]

◆ size() [3/4]

◆ size() [4/4]

int Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::size ( int  level,
int  codim 
) const
inline

◆ startSubDomainMarking()

Prepares the grid for (re-)assigning cells to subdomains.

After calling this method, it becomes possible to invoke the various methods for cell assignment to subdomains. When you are done marking, call preUpdateSubDomains().

IMPORTANT: Reassigning subdomains and grid adaptation are mutually exclusive, it is not possibly to do both at the same time. This restriction is enforced by the grid.

◆ subDomain() [1/2]

Returns a reference to the SubDomainGrid associated with the given subdomain.

◆ subDomain() [2/2]

Returns a reference to the SubDomainGrid associated with the given subdomain.

◆ supportLevelIndexSets()

bool Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::supportLevelIndexSets ( ) const
inline

Indicates whether this MultiDomainGrid instance supports level index sets on its SubDomainGrids.

◆ traits()

◆ updateSubDomains()

Switches the subdomain layout over to the new layout.

◆ wrapHostEntity() [1/2]

template<typename Entity >
Traits::template Codim< Entity::codimension >::Entity Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::wrapHostEntity ( const Entity e) const
inline

◆ wrapHostEntity() [2/2]

template<int codim>
Traits::template Codim< codim >::Entity Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::wrapHostEntity ( const typename HostGrid::template Codim< codim >::Entity e) const
inline

Member Data Documentation

◆ dimension

◆ dimensionworld

◆ maxNumberOfSubDomains

const std::size_t Dune::mdgrid::MultiDomainGrid< HostGrid_, MDGridTraitsType >::maxNumberOfSubDomains = MDGridTraits::maxSubDomainsPerCell
static

The largest number of subdomains any given grid cell may belong to.


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