DUNE PDELab (2.8)
globalindexset.hh
Go to the documentation of this file.
114 /* A DataHandle class to calculate the minimum of a std::vector which is accompanied by an index set */
190 // Evil hack: I need to call subEntity, which needs the entity codimension as a static parameter.
192 PartitionType subPartitionType = SubPartitionTypeProvider<typename GridView::template Codim<0>::Entity, GridView::dimension>::get(*it,codim,i);
338 ? std::distance(gridview.template begin<0, Dune::Interior_Partition>(), gridview.template end<0, Dune::Interior_Partition>())
342 // without double, aka. redundant entities, on the interprocessor boundary via global reduce. */
345 /* communicate the number of locally owned entities to all other processes so that the respective offset
346 * can be calculated on the respective processor; we use the Dune mpi collective communication facility
347 * for this; first, we gather the number of locally owned entities on the root process and, second, we
360 /* compute globally unique index over all processes; the idea of the algorithm is as follows: if
363 * by the process, it is assigned -1, which signals that this specific entity will get its global
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition: datahandleif.hh:76
void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
unpack data from message buffer to user.
Definition: datahandleif.hh:205
bool contains(int dim, int codim) const
returns true if data for given valid codim should be communicated
Definition: datahandleif.hh:129
void gather(MessageBufferImp &buff, const EntityType &e) const
pack data from user to message buffer
Definition: datahandleif.hh:191
PartitionType partitionType() const
Partition type of this entity.
Definition: entity.hh:129
Calculate globally unique index over all processes in a Dune grid.
Definition: globalindexset.hh:61
Index subIndex(const Entity &entity, unsigned int i, unsigned int codim) const
Return the global index of a subentity of a given entity.
Definition: globalindexset.hh:472
MapId2Index globalIndex_
Stores global index of entities with entity's globally unique id as key.
Definition: globalindexset.hh:510
int Index
The number type used for global indices
Definition: globalindexset.hh:64
int nGlobalEntity_
Global number of entities, i.e. number of entities without rendundant entities on interprocessor boun...
Definition: globalindexset.hh:504
Index index(const Entity &entity) const
Return the global index of a given entity.
Definition: globalindexset.hh:451
unsigned int codim_
Codimension of the entities that we hold indices for.
Definition: globalindexset.hh:501
unsigned int size(unsigned int codim) const
Return the total number of entities over all processes that we have indices for.
Definition: globalindexset.hh:492
GlobalIndexSet(const GridView &gridview, int codim)
Constructor for a given GridView.
Definition: globalindexset.hh:324
GridFamily::Traits::CollectiveCommunication CollectiveCommunication
A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective co...
Definition: grid.hh:518
Describes the parallel communication interface class for MessageBuffers and DataHandles.
const IndexSet & indexSet() const
obtain the index set
Definition: gridview.hh:175
const Grid & grid() const
obtain a const reference to the underlying hierarchic grid
Definition: gridview.hh:164
const CollectiveCommunication & comm() const
obtain collective communication object
Definition: gridview.hh:249
int size(int codim) const
obtain number of entities in a given codimension
Definition: gridview.hh:181
auto communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
Communicate data on this view.
Definition: gridview.hh:268
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
@ ForwardCommunication
communicate as given in InterfaceType
Definition: gridenums.hh:169
@ All_All_Interface
send all and receive all entities
Definition: gridenums.hh:89
auto min(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::min()
Definition: defaults.hh:87
Helpers for dealing with MPI.
Helper class to provide access to subentity PartitionTypes with a run-time codimension.
Definition: globalindexset.hh:73
static PartitionType get(const Entity &entity, int codim, int i)
Get PartitionType of the i-th subentity of codimension 'codim' of entity 'entity'.
Definition: globalindexset.hh:76
std::size_t fixedSize
The number of data items per index if it is fixed, 0 otherwise.
Definition: variablesizecommunicator.hh:272
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)