AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
UniqueBorderPartition< Grid > Class Template Reference

Determine for each border entity which processor owns it. More...

#include <UniqueBorderPartition.hpp>

Inherits CommDataHandleIF< UniqueBorderPartition< Grid >, int >.

Public Types

using EntitySet = std::set< IdType >
 

Public Member Functions

 UniqueBorderPartition (int rank, Grid const &grid)
 Construct a UniqueBorderPartition DataHandle to be used in a GridView communicator. More...
 
bool contains (int, int) const
 
bool fixedSize (int, int) const
 
template<class Entity >
std::size_t size (Entity const &e) const
 
template<class MessageBuffer , class Entity >
void gather (MessageBuffer &buff, Entity const &e) const
 
template<class MessageBuffer , class Entity >
void scatter (MessageBuffer &buff, Entity const &e, std::size_t n)
 
bool contains (IdType const &id) const
 Returns whether id is owned by this rank.
 
int numIterations () const
 Number of iterations to perform the communication in order to collect all neighboring entities.
 

Detailed Description

template<class Grid>
class AMDiS::UniqueBorderPartition< Grid >

Determine for each border entity which processor owns it.

All entities must be uniquely owned by exactly one processor, but they can exist on multiple processors. For interior, overlap, and ghost entities the assignment is trivial: interior: owner, otherwise not owner.

For border entities (codim != 0) the ownership is not known a priori and must be communicated. Here we assign the entity to the processor with the lowest rank.

Constructor & Destructor Documentation

◆ UniqueBorderPartition()

UniqueBorderPartition ( int  rank,
Grid const &  grid 
)
inline

Construct a UniqueBorderPartition DataHandle to be used in a GridView communicator.

Parameters
rankThe own processor rank
idSetThe id set of entity ids to store in borderEntities, typically the grid globalIdSet.

NOTE: Since idSet is stored by reference it must not go out of scope until all calls to gather and scatter are finished.


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