of proc #m. In this case proc#k computes part of mesh A in boundingbox B of proc#m. It implies that the corresponding cellIds or nodeIds of
corresponding part are sent to proc #m too.
- Let's consider the couple (k,m) in TODO list. This couple is treated by either k or m as seen \ref ParaMEDMEMOverlapDECAlgoStep2 "here".
+ Let's consider the couple (k,m) in TODO list. This couple is treated by either k or m as seen \ref ParaMEDMEMOverlapDECAlgoStep2 "here in Step2".
- As it will be dealt in Step 6, at the end for final matrix-vector computation the result matrix of the couple (k,m) anywhere it is computed (proc#k or proc#m)
+ As it will be dealt in Step 6, at the end for final matrix-vector computation the result matrix of the couple (k,m) anywhere it is computed (proc #k or proc #m)
it will be stored in \b proc#m.
- If proc#k is in charge of this couple (k,m) target ids (cells or nodes) of mesh in proc#m are renumbered, because proc#m has stripped
- its target mesh to avoid big amount of data. In this case has it is finally proc#m in charge of the matrix, proc#m keeps preciously the
- target ids sent to proc#k. No problem will appear for source ids because no restriction done.
+ - If proc #k is in charge (performs matrix computation) of this couple (k,m) target ids (cells or nodes) of mesh in proc #m are renumbered, because proc #m has stripped
+ its target mesh to avoid big amount of data to transfer. In this case as it is finally proc #m in charge finally of the matrix, proc #k must keep preciously the
+ source ids needed to be sent to proc#m. No problem will appear for matrix assembling in proc m, for source ids because no restriction done.
+ Concerning source ids to be sent for matrix-vector computation, proc k will known precisely which source ids field values to send to proc #m.
+ This is incarnated by OverlapMapping::keepTracksOfTargetIds in proc m.
+
+ - If proc #m is in charge (performs matrix computation) of this couple (k,m) source ids (cells or nodes) of mesh in proc #k are renumbered, because proc #k has stripped
+ its source mesh to avoid big amount of data to transfer. In this case as it is finally proc #m in charge finally of the matrix, proc #m receive the source ids
+ from remote proc #k so the matrix is directly OK, no need of renumbering will be needed in \ref ParaMEDMEMOverlapDECAlgoStep5 "Step 5". But proc k must
+ keep tracks of sent ids to proc m for matrix-vector computation.
+ This is incarnated by OverlapMapping::keepTracksOfSourceIds in proc k.
This step is performed in ParaMEDMEM::OverlapElementLocator::exchangeMeshes method.
For a proc#k, it is necessary to fetch info of all matrix built in \ref ParaMEDMEMOverlapDECAlgoStep4 "Step4" where the first element in pair
is equal to k.
+ After this step, the matrix repartition is the following after call ParaMEDMEM::OverlapMapping::prepare :
+
+ - proc#0 : (0,0),(1,0),(2,0)
+ - proc#1 : (0,1),(2,1)
+ - proc#2 : (1,2),(2,2)
+
+ Tuple (2,1) computed on proc 2 is stored at the end of "prepare" in proc 1. So it is an example of item 0 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2".
+ Tuple (0,1) computed on proc 1 and stored in proc 1 too. So it is an example of item 1 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2".
+
+ In ParaMEDMEM::OverlapMapping::_proc_ids_to_send_vector_st will contain :
+
+ - Proc#0 : 0,1
+ - Proc#1 : 0,2
+ - Proc#2 : 0,1,2
+
+ In ParaMEDMEM::OverlapMapping::_proc_ids_to_recv_vector_st will contain :
+
+ - Proc#0 : 0,1,2
+ - Proc#1 : 0,2
+ - Proc#2 : 1,2
+
The method in charge to perform this is : ParaMEDMEM::OverlapMapping::prepare.
* This method stores from a matrix in format Target(rows)/Source(cols) for a source procId 'srcProcId' and for a target procId 'trgProcId'.
* All ids (source and target) are in format of local ids.
*/
-void OverlapMapping::addContributionST(const std::vector< std::map<int,double> >& matrixST, const int *srcIds, const int *trgIds, int trgIdsLgth, int srcProcId, int trgProcId)
+void OverlapMapping::addContributionST(const std::vector< std::map<int,double> >& matrixST, const DataArrayInt *srcIds, int srcProcId, const DataArrayInt *trgIds, int trgProcId)
int nbOfPseudoProcs=_the_matrix_st_source_proc_id.size();//_the_matrix_st_target_proc_id.size() contains number of matrix fetched remotely whose sourceProcId==myProcId
* 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.
- void addContributionST(const std::vector< std::map<int,double> >& matrixST, const int *srcIds, const int *trgIds, int trgIdsLgth, int srcProcId, int trgProcId);
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);
+ std::vector< int > _nb_of_src_ids_proc_st2;//item #1
+ std::vector< int > _src_ids_proc_st2;//item #1
+ std::vector< std::vector<int> > _src_ids_zip_st2;//same size as _src_ids_zip_proc_st2. Sorted. specifies for each id the corresponding ids to send. This is for item0 of Step2 of main algorithm
+ std::vector< int > _src_ids_zip_proc_st2;
//! vector of matrixes the first entry correspond to source proc id in _source_ids_st