Version: 5.1.6

ParaMEDMEM.OverlapMapping Class Reference

#include <OverlapMapping.hxx>

Public Member Functions

 OverlapMapping (const ProcessorGroup &group)
void keepTracksOfSourceIds (int procId, DataArrayInt *ids)
void keepTracksOfTargetIds (int procId, DataArrayInt *ids)
void addContributionST (const std::vector< std::map< int, double > > &matrixST, const DataArrayInt *srcIds, int srcProcId, const DataArrayInt *trgIds, int trgProcId)
void prepare (const std::vector< std::vector< int > > &procsInInteraction, int nbOfTrgElems)
void computeDenoConservativeVolumic (int nbOfTuplesTrg)
void computeDenoGlobConstraint ()
void multiply (const MEDCouplingFieldDouble *fieldInput, MEDCouplingFieldDouble *fieldOutput) const
void transposeMultiply (const MEDCouplingFieldDouble *fieldInput, MEDCouplingFieldDouble *fieldOutput)
void serializeMatrixStep0ST (const int *nbOfElemsSrc, int *&bigArr, int *count, int *offsets, int *countForRecv, int *offsetsForRecv) const
int serializeMatrixStep1ST (const int *nbOfElemsSrc, const int *recvStep0, const int *countStep0, const int *offsStep0, int *&bigArrI, double *&bigArrD, int *count, int *offsets, int *countForRecv, int *offsForRecv) const
void unserializationST (int nbOfTrgElems, const int *nbOfElemsSrcPerProc, const int *bigArrRecv, const int *bigArrRecvCounts, const int *bigArrRecvOffs, const int *bigArrRecv2, const double *bigArrDRecv2, const int *bigArrRecv2Count, const int *bigArrRecv2Offs)
void finishToFillFinalMatrixST ()
void prepareIdsToSendST ()
void updateZipSourceIdsForFuture ()

Data Fields

const ProcessorGroup_group
std::vector
< MEDCouplingAutoRefCountObjectPtr
< DataArrayInt > > 
_src_ids_st2
 vector of ids
std::vector< int_src_proc_st2
std::vector
< MEDCouplingAutoRefCountObjectPtr
< DataArrayInt > > 
_trg_ids_st2
std::vector< int_trg_proc_st2
std::vector< int_nb_of_src_ids_proc_st2
std::vector< int_src_ids_proc_st2
std::vector< std::vector< int > > _src_ids_zip_st2
std::vector< int_src_ids_zip_proc_st2
std::vector< std::vector
< std::map< int, double > > > 
_matrixes_st
 vector of matrixes the first entry correspond to source proc id in _source_ids_st
std::vector< std::vector< int > > _source_ids_st
std::vector< int_source_proc_id_st
std::vector< std::vector< int > > _target_ids_st
std::vector< int_target_proc_id_st
std::vector< std::vector
< std::map< int, double > > > 
_the_matrix_st
 the matrix for matrix-vector product. The first dimension the set of target procs that interacts with local source mesh. The second dimension correspond to nb of local source ids.
std::vector< int_the_matrix_st_source_proc_id
std::vector< std::vector< int > > _the_matrix_st_source_ids
std::vector< std::vector
< std::map< int, double > > > 
_the_deno_st
std::vector< int_proc_ids_to_send_vector_st
 this attribute stores the proc ids that wait for data from this proc ids for matrix-vector computation
std::vector< int_proc_ids_to_recv_vector_st
std::vector< std::vector< int > > _source_ids_to_send_st
 this attribute is of size _group.size(); for each procId in _group _source_ids_to_send_st[procId] contains tupleId to send abroad

Constructor & Destructor Documentation

OverlapMapping::OverlapMapping ( const ProcessorGroup group  ) 

Member Function Documentation

void OverlapMapping::keepTracksOfSourceIds ( int  procId,
DataArrayInt ids 
)

This method keeps tracks of source ids to know in step 6 of main algorithm, which tuple ids to send away. This method incarnates item#1 of step2 algorithm.

References ParaMEDMEM.OverlapMapping._src_ids_st2, ParaMEDMEM.OverlapMapping._src_proc_st2, and ParaMEDMEM.RefCountObject.incrRef().

void OverlapMapping::keepTracksOfTargetIds ( int  procId,
DataArrayInt ids 
)

This method keeps tracks of target ids to know in step 6 of main algorithm. This method incarnates item#0 of step2 algorithm.

References ParaMEDMEM.OverlapMapping._trg_ids_st2, ParaMEDMEM.OverlapMapping._trg_proc_st2, and ParaMEDMEM.RefCountObject.incrRef().

void OverlapMapping::addContributionST ( const std::vector< std::map< int, double > > &  matrixST,
const DataArrayInt srcIds,
int  srcProcId,
const DataArrayInt trgIds,
int  trgProcId 
)
void OverlapMapping::prepare ( const std::vector< std::vector< int > > &  procsInInteraction,
int  nbOfTrgElems 
)
void OverlapMapping::computeDenoConservativeVolumic ( int  nbOfTuplesTrg  ) 
void OverlapMapping::computeDenoGlobConstraint (  ) 
void OverlapMapping::multiply ( const MEDCouplingFieldDouble fieldInput,
MEDCouplingFieldDouble fieldOutput 
) const
void OverlapMapping::transposeMultiply ( const MEDCouplingFieldDouble fieldInput,
MEDCouplingFieldDouble fieldOutput 
)

This method performs a transpose multiply of 'fieldInput' and put the result into 'fieldOutput'. 'fieldInput' is expected to be the targetfield and 'fieldOutput' the sourcefield.

void OverlapMapping::serializeMatrixStep0ST ( const int nbOfElemsSrc,
int *&  bigArr,
int count,
int offsets,
int countForRecv,
int offsetsForRecv 
) const

This method performs step #0/3 in serialization process.

Parameters:
count tells specifies nb of elems to send to corresponding proc id. size equal to _group.size().
offsets tells for a proc i where to start serialize#0 matrix. size equal to _group.size().
nbOfElemsSrc of size _group.size(). Comes from previous all2all call. tells how many srcIds per proc contains matrix for current proc.

References ParaMEDMEM.OverlapMapping._group, ParaMEDMEM.OverlapMapping._matrixes_st, ParaMEDMEM.OverlapMapping._source_proc_id_st, ParaMEDMEM.OverlapMapping._target_proc_id_st, Med_Gen_test.it, ParaMEDMEM.ProcessorGroup.myRank(), and ParaMEDMEM.ProcessorGroup.size().

int OverlapMapping::serializeMatrixStep1ST ( const int nbOfElemsSrc,
const int recvStep0,
const int countStep0,
const int offsStep0,
int *&  bigArrI,
double *&  bigArrD,
int count,
int offsets,
int countForRecv,
int offsForRecv 
) const
void OverlapMapping::unserializationST ( int  nbOfTrgElems,
const int nbOfElemsSrcPerProc,
const int bigArrRecv,
const int bigArrRecvCounts,
const int bigArrRecvOffs,
const int bigArrRecv2,
const double bigArrDRecv2,
const int bigArrRecv2Count,
const int bigArrRecv2Offs 
)

This is the last step after all2Alls for matrix exchange. _the_matrix_st is the final matrix :

  • The first entry is srcId in current proc.
  • The second is the pseudo id of source proc (correspondance with true id is in attribute _the_matrix_st_source_proc_id and _the_matrix_st_source_ids)
  • the third is the srcId in the pseudo source proc

References ParaMEDMEM.OverlapMapping._group, ParaMEDMEM.OverlapMapping._the_matrix_st, ParaMEDMEM.OverlapMapping._the_matrix_st_source_proc_id, and ParaMEDMEM.ProcessorGroup.size().

void OverlapMapping::finishToFillFinalMatrixST (  ) 

This method should be called when all remote matrix with sourceProcId==thisProcId have been retrieved and are in 'this->_the_matrix_st' and 'this->_the_matrix_st_target_proc_id' and 'this->_the_matrix_st_target_ids'. This method finish the job of filling 'this->_the_matrix_st' and 'this->_the_matrix_st_target_proc_id' by putting candidates in 'this->_matrixes_st' into them.

References ParaMEDMEM.OverlapMapping._group, ParaMEDMEM.OverlapMapping._matrixes_st, ParaMEDMEM.OverlapMapping._source_proc_id_st, ParaMEDMEM.OverlapMapping._the_matrix_st, ParaMEDMEM.OverlapMapping._the_matrix_st_source_proc_id, and ParaMEDMEM.ProcessorGroup.myRank().

void OverlapMapping::prepareIdsToSendST (  ) 
void OverlapMapping::updateZipSourceIdsForFuture (  ) 

This method should be called immediately after _the_matrix_st has been filled with remote computed matrix put in this proc for Matrix-Vector. This method computes for these matrix the minimal set of source ids corresponding to the source proc id.

References ParaMEDMEM.OverlapMapping._group, ParaMEDMEM.OverlapMapping._src_ids_zip_proc_st2, ParaMEDMEM.OverlapMapping._src_ids_zip_st2, ParaMEDMEM.OverlapMapping._the_matrix_st, ParaMEDMEM.OverlapMapping._the_matrix_st_source_proc_id, ParaMEDMEM.ProcessorGroup.getCommInterface(), ParaMEDMEM.ProcessorGroup.myRank(), and TestMedCorba7.s.


Field Documentation

vector of ids

std::vector< std::vector<int> > ParaMEDMEM.OverlapMapping._src_ids_zip_st2
std::vector< std::vector< std::map<int,double> > > ParaMEDMEM.OverlapMapping._matrixes_st

vector of matrixes the first entry correspond to source proc id in _source_ids_st

std::vector< std::vector<int> > ParaMEDMEM.OverlapMapping._source_ids_st
std::vector< std::vector<int> > ParaMEDMEM.OverlapMapping._target_ids_st
std::vector< std::vector< std::map<int,double> > > ParaMEDMEM.OverlapMapping._the_matrix_st

the matrix for matrix-vector product. The first dimension the set of target procs that interacts with local source mesh. The second dimension correspond to nb of local source ids.

std::vector< std::vector< std::map<int,double> > > ParaMEDMEM.OverlapMapping._the_deno_st

this attribute stores the proc ids that wait for data from this proc ids for matrix-vector computation

this attribute is of size _group.size(); for each procId in _group _source_ids_to_send_st[procId] contains tupleId to send abroad