Version: 5.1.6

ParaMEDMEM.BlockTopology Class Reference

#include <BlockTopology.hxx>

Inheritance diagram for ParaMEDMEM.BlockTopology:
Inheritance graph

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 ProcessorGroupgetProcGroup () const
std::pair< int, intglobalToLocal (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)

Data Fields

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

Constructor & Destructor Documentation

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._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 
)
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._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]

Member Function Documentation

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]
const ProcessorGroup* ParaMEDMEM.BlockTopology.getProcGroup (  )  const [virtual]
std::pair< int, int > ParaMEDMEM.BlockTopology::globalToLocal ( const int  global  )  const
int ParaMEDMEM.BlockTopology.localToGlobal ( const std::pair< int, int  )  const
std::vector< std::pair< int, int > > ParaMEDMEM.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 ParaMEDMEM.BlockTopology._nb_procs_per_dim, ParaMEDMEM.BlockTopology._proc_group, and ParaMEDMEM.ProcessorGroup.myRank().

int ParaMEDMEM.BlockTopology.getDimension (  )  const
void ParaMEDMEM.BlockTopology::serialize ( int *&  serializer,
int size 
) const
void ParaMEDMEM.BlockTopology::unserialize ( const int serializer,
const CommInterface comm_interface 
)

Field Documentation