]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message *** StartingPortingMED3
authorageay <ageay>
Tue, 8 Mar 2011 09:46:33 +0000 (09:46 +0000)
committerageay <ageay>
Tue, 8 Mar 2011 09:46:33 +0000 (09:46 +0000)
src/ParaMEDMEM/OverlapMapping.cxx
src/ParaMEDMEM/OverlapMapping.hxx

index 69fddab6a27c1e642556fb5950f954dbe6dd11a7..2f7fc4db5e05ca2066b48a7b7bfa07aa41dc4b20 100644 (file)
@@ -113,7 +113,7 @@ void OverlapMapping::prepare(const std::vector< std::vector<int> >& procsInInter
   unserializationST(nbOfSrcElems,nbrecv,bigArrRecv,nbrecv1,nbrecv2,
                     bigArrRecv2,bigArrDRecv2,nbrecv3,nbrecv4);
   //finish to fill _the_matrix_st and _the_matrix_st_target_proc_id with already in place matrix in _matrixes_st
-  finishToFillFinalMatrixST();
+  finishToFillFinalMatrixST(nbOfSrcElems);
   //exchanging target ids for future sending
   prepareIdsToSendST();
 }
@@ -318,12 +318,8 @@ void OverlapMapping::unserializationST(int nbOfSrcElems,
  * 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.
  */
-void OverlapMapping::finishToFillFinalMatrixST()
+void OverlapMapping::finishToFillFinalMatrixST(int nbOfSrcElems)
 {
-  if(_the_matrix_st.empty())
-    return ;
-  if(_the_matrix_st[0].empty())
-    return ;
   int myProcId=_group.myRank();
   int sz=_matrixes_st.size();
   int nbOfEntryToAdd=0;
@@ -337,7 +333,6 @@ void OverlapMapping::finishToFillFinalMatrixST()
     return ;
   int oldNbOfEntry=_the_matrix_st.size();
   int newNbOfEntry=oldNbOfEntry+nbOfEntryToAdd;
-  int nbOfSrcElems=_the_matrix_st[0].size();
   _the_matrix_st.resize(newNbOfEntry);
   _the_matrix_st_target_ids.resize(newNbOfEntry);
   for(int i=oldNbOfEntry;i<newNbOfEntry;i++)
index 79d7588ddcbf36b51870a7443600c97252ea39e7..79248a1f8830273883092c92a499c3a0217eb2d9 100644 (file)
@@ -45,7 +45,7 @@ namespace ParaMEDMEM
                                int *countForRecv, int *offsForRecv) const;
     void unserializationST(int nbOfSrcElems, 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 finishToFillFinalMatrixST(int nbOfSrcElems);
     void prepareIdsToSendST();
   private:
     const ProcessorGroup &_group;