Changeset 898


Ignore:
Timestamp:
07/12/16 18:11:42 (5 years ago)
Author:
ymipsl
Message:

fix remaping for a small number of cells

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/extern/remap/src/parallel_tree.cpp

    r853 r898  
    288288 
    289289  long int nb1, nb2, nb, nbTot ; 
    290   nb1=node.size() ; nb2=node.size() ; 
     290  nb1=node.size() ; nb2=node2.size() ; 
    291291  nb=nb1+nb2 ; 
    292292  MPI_Allreduce(&nb, &nbTot, 1, MPI_LONG, MPI_SUM, communicator) ; 
     
    297297        nbSampleNodes /= 2; 
    298298        nbSampleNodes *= 2; 
    299   assert( nbTot > nbSampleNodes*commSize) ; 
     299//  assert( nbTot > nbSampleNodes*commSize) ; 
    300300     
    301301  int nbSampleNodes1 = nbSampleNodes * (nb1*commSize)/(1.*nbTot) ; 
     
    332332        } 
    333333*/ 
    334         for (int i = 0; i <nbSampleNodes1; i++) sampleNodes.push_back(Node(node[randomArray1[i]].centre,  node[randomArray1[i]].radius, NULL)); 
    335         for (int i = 0; i <nbSampleNodes2; i++) sampleNodes.push_back(Node(node2[randomArray2[i]].centre, node2[randomArray2[i]].radius, NULL)); 
     334        for (int i = 0; i <nbSampleNodes1; i++) sampleNodes.push_back(Node(node[randomArray1[i%nb1]].centre,  node[randomArray1[i%nb1]].radius, NULL)); 
     335        for (int i = 0; i <nbSampleNodes2; i++) sampleNodes.push_back(Node(node2[randomArray2[i%nb2]].centre, node2[randomArray2[i%nb2]].radius, NULL)); 
    336336 
    337337/*           
Note: See TracChangeset for help on using the changeset viewer.