

Public Member Functions | |
| BlockTopology () | |
| BlockTopology (const BlockTopology &geom_topo, const ComponentTopology &comp_topo) | |
| BlockTopology (const ProcessorGroup &group, mcIdType nb_elem) | |
| BlockTopology (const ProcessorGroup &group, MEDCouplingCMesh *grid) | |
| int | getDimension () const |
| std::vector< std::pair< int, mcIdType > > | getLocalArrayMinMax () const |
| mcIdType | getNbElements () const |
| mcIdType | getNbLocalElements () const |
| const ProcessorGroup * | getProcGroup () const |
| std::pair< int, mcIdType > | globalToLocal (const mcIdType) const |
| mcIdType | localToGlobal (const std::pair< int, mcIdType >) const |
| void | release () |
| void | serialize (mcIdType *&serializer, mcIdType &size) const |
| void | unserialize (const mcIdType *serializer, const CommInterface &comm_interface) |
| virtual | ~BlockTopology () |
Public Member Functions inherited from MEDCoupling::Topology | |
| Topology () | |
| virtual | ~Topology () |
A BlockTopology typically represents the split of a structured mesh among the processors of a common ProcessorGroup. Each processor gets a contiguous part of the cells in the mesh (a block).
A BlockTopology can also be used to split a structured domain among the various components of a field.
| MEDCoupling::BlockTopology::BlockTopology | ( | ) |
Default ctor.
| MEDCoupling::BlockTopology::BlockTopology | ( | const ProcessorGroup & | group, |
| MEDCouplingCMesh * | grid | ||
| ) |
Constructor of a block topology from a grid. This preliminary version simply splits along the first axis instead of making the best choice with respect to the values of the different axes.
References MEDCoupling::Block, MEDCoupling::MEDCouplingCMesh::getCoordsAt(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), and MEDCoupling::ProcessorGroup::size().
| MEDCoupling::BlockTopology::BlockTopology | ( | const BlockTopology & | geom_topo, |
| const ComponentTopology & | comp_topo | ||
| ) |
Creation of a block topology by composing a geometrical topology and a component topology. This constructor is intended for creating fields for which the parallel distribution is made on the components of the field rather than on the geometrical partitioning of the underlying mesh.
References MEDCoupling::Block, MEDCoupling::ComponentTopology::getBlockIndices(), getDimension(), getNbElements(), getProcGroup(), MEDCoupling::ComponentTopology::getProcGroup(), MEDCoupling::ComponentTopology::nbBlocks(), MEDCoupling::ComponentTopology::nbComponents(), and MEDCoupling::ProcessorGroup::size().
| MEDCoupling::BlockTopology::BlockTopology | ( | const ProcessorGroup & | group, |
| mcIdType | nb_elem | ||
| ) |
Constructor for creating a one-dimensional topology from a processor group and a local number of elements on each processor
The function must be called only by the processors belonging to group group. Calling it from a processor not belonging to group will cause an MPI error, while calling from a subset of group will result in a deadlock.
References MEDCoupling::CommInterface::allGather(), MEDCoupling::Block, MEDCoupling::MPIProcessorGroup::getComm(), MEDCoupling::ProcessorGroup::getCommInterface(), and MEDCoupling::ProcessorGroup::size().
|
virtual |
References release().
| void MEDCoupling::BlockTopology::release | ( | ) |
Destructor involves MPI operations: make sure this is accessible from a proper method for Python wrapping.
Referenced by ~BlockTopology().
|
virtual |
Retrieves the number of elements for a given topology.
Implements MEDCoupling::Topology.
Referenced by BlockTopology().
|
virtual |
|
virtual |
| std::pair< int, mcIdType > MEDCoupling::BlockTopology::globalToLocal | ( | const mcIdType | global | ) | const |
converts a pair <subdomainid,local> to a global number
References MEDCoupling::ProcessorGroup::size().
Referenced by MEDCoupling::StructuredCoincidentDEC::prepareSourceDE(), MEDCoupling::StructuredCoincidentDEC::prepareTargetDE(), and MEDCoupling::StructuredCoincidentDEC::recvData().
| mcIdType MEDCoupling::BlockTopology::localToGlobal | ( | const std::pair< int, mcIdType > | ) | const |
converts local number to a global number
References getNbLocalElements(), and MEDCoupling::ProcessorGroup::size().
Referenced by MEDCoupling::ParaMESH::ParaMESH(), MEDCoupling::StructuredCoincidentDEC::prepareSourceDE(), MEDCoupling::StructuredCoincidentDEC::prepareTargetDE(), and MEDCoupling::StructuredCoincidentDEC::recvData().
| std::vector< std::pair< int, mcIdType > > MEDCoupling::BlockTopology::getLocalArrayMinMax | ( | ) | const |
Retrieves the min and max indices of the domain stored locally for each dimension. The output vector has the topology dimension as a size and each pair <int,int> contains min and max. Indices range from min to max-1.
References MEDCoupling::ProcessorGroup::myRank().
| int MEDCoupling::BlockTopology::getDimension | ( | ) | const |
Referenced by BlockTopology().
| void MEDCoupling::BlockTopology::serialize | ( | mcIdType *& | serializer, |
| mcIdType & | size | ||
| ) | const |
Serializes the data contained in the Block Topology for communication purposes
References MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::MPIProcessorGroup::translateRank().
| void MEDCoupling::BlockTopology::unserialize | ( | const mcIdType * | serializer, |
| const CommInterface & | comm_interface | ||
| ) |
Unserializes the data contained in the Block Topology after communication. Uses the same structure as the one used for serialize()