#include <BlockTopology.hxx>

Public Member Functions | |
| BlockTopology () | |
| BlockTopology (const ProcessorGroup &group, MEDCouplingCMesh *grid) | |
| BlockTopology (const BlockTopology &geom_topo, const ComponentTopology &comp_topo) | |
| BlockTopology (const ProcessorGroup &group, int nb_elem) | |
| virtual | ~BlockTopology () |
| int | getNbElements () const |
| Retrieves the number of elements for a given topology. | |
| int | getNbLocalElements () const |
| const ProcessorGroup * | getProcGroup () const |
| std::pair< int, int > | globalToLocal (const int) const |
| converts a pair <subdomainid,local> to a global number | |
| int | localToGlobal (const std::pair< int, int >) const |
| std::vector< std::pair< int, int > > | getLocalArrayMinMax () const |
| int | getDimension () const |
| void | serialize (int *&serializer, int &size) const |
| void | unserialize (const int *serializer, const CommInterface &comm_interface) |
Private Attributes | |
| int | _dimension |
| std::vector< int > | _nb_procs_per_dim |
| std::vector< std::vector< int > > | _local_array_indices |
| std::vector< CYCLE_TYPE > | _cycle_type |
| const ProcessorGroup * | _proc_group |
| int | _nb_elems |
| bool | _owns_processor_group |
| ParaMEDMEM.BlockTopology.BlockTopology | ( | ) |
| ParaMEDMEM.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 ParaMEDMEM.BlockTopology._cycle_type, ParaMEDMEM.BlockTopology._dimension, ParaMEDMEM.BlockTopology._local_array_indices, ParaMEDMEM.BlockTopology._nb_elems, ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._proc_group, ParaMEDMEM.Block, ParaMEDMEM.MEDCouplingCMesh.getCoordsAt(), ParaMEDMEM.DataArray.getNbOfElems(), and ParaMEDMEM.ProcessorGroup.size().
| ParaMEDMEM.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 ParaMEDMEM.BlockTopology._cycle_type, ParaMEDMEM.BlockTopology._dimension, ParaMEDMEM.BlockTopology._local_array_indices, ParaMEDMEM.BlockTopology._nb_elems, ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._proc_group, ParaMEDMEM.Block, ParaMEDMEM.ComponentTopology.getBlockIndices(), ParaMEDMEM.BlockTopology.getDimension(), ParaMEDMEM.BlockTopology.getNbElements(), ParaMEDMEM.ComponentTopology.getProcGroup(), ParaMEDMEM.BlockTopology.getProcGroup(), LOCALIZED, ParaMEDMEM.ComponentTopology.nbBlocks(), ParaMEDMEM.ComponentTopology.nbComponents(), and ParaMEDMEM.ProcessorGroup.size().
| ParaMEDMEM.BlockTopology::BlockTopology | ( | const ProcessorGroup & | group, |
| int | 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 ParaMEDMEM.BlockTopology._cycle_type, ParaMEDMEM.BlockTopology._local_array_indices, ParaMEDMEM.BlockTopology._nb_elems, ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._proc_group, ParaMEDMEM.CommInterface.allGather(), ParaMEDMEM.Block, ParaMEDMEM.MPIProcessorGroup.getComm(), ParaMEDMEM.ProcessorGroup.getCommInterface(), and ParaMEDMEM.ProcessorGroup.size().
| ParaMEDMEM.BlockTopology::~BlockTopology | ( | ) | [virtual] |
| int ParaMEDMEM.BlockTopology.getNbElements | ( | ) | const [virtual] |
Retrieves the number of elements for a given topology.
Implements ParaMEDMEM.Topology.
References ParaMEDMEM.BlockTopology._nb_elems.
| int ParaMEDMEM.BlockTopology::getNbLocalElements | ( | ) | const [virtual] |
Implements ParaMEDMEM.Topology.
| const ProcessorGroup* ParaMEDMEM.BlockTopology.getProcGroup | ( | ) | const [virtual] |
Implements ParaMEDMEM.Topology.
References ParaMEDMEM.BlockTopology._proc_group.
converts a pair <subdomainid,local> to a global number
References test_NonCoincidentDEC.size.
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 ParaMEDMEM.BlockTopology._dimension, ParaMEDMEM.BlockTopology._local_array_indices, ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._proc_group, and ParaMEDMEM.ProcessorGroup.myRank().
| int ParaMEDMEM.BlockTopology.getDimension | ( | ) | const |
References ParaMEDMEM.BlockTopology._dimension.
Serializes the data contained in the Block Topology for communication purposes
References ParaMEDMEM.BlockTopology._cycle_type, ParaMEDMEM.BlockTopology._dimension, ParaMEDMEM.BlockTopology._local_array_indices, ParaMEDMEM.BlockTopology._nb_elems, ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._proc_group, ParaMEDMEM.ProcessorGroup.getCommInterface(), ParaMEDMEM.ProcessorGroup.size(), test_NonCoincidentDEC.size, and ParaMEDMEM.MPIProcessorGroup.translateRank().
| void ParaMEDMEM.BlockTopology::unserialize | ( | const int * | 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()
References ParaMEDMEM.BlockTopology._cycle_type, ParaMEDMEM.BlockTopology._dimension, ParaMEDMEM.BlockTopology._local_array_indices, ParaMEDMEM.BlockTopology._nb_elems, ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._owns_processor_group, ParaMEDMEM.BlockTopology._proc_group, and test_NonCoincidentDEC.size.
int ParaMEDMEM.BlockTopology._dimension [private] |
std::vector<int> ParaMEDMEM.BlockTopology._nb_procs_per_dim [private] |
std::vector<std::vector<int> > ParaMEDMEM.BlockTopology._local_array_indices [private] |
std::vector<CYCLE_TYPE> ParaMEDMEM.BlockTopology._cycle_type [private] |
const ProcessorGroup* ParaMEDMEM.BlockTopology._proc_group [private] |
int ParaMEDMEM.BlockTopology._nb_elems [private] |
bool ParaMEDMEM.BlockTopology._owns_processor_group [private] |