]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
22875: debug continue
authorimn <imn@opencascade.com>
Mon, 25 May 2015 09:59:28 +0000 (12:59 +0300)
committerimn <imn@opencascade.com>
Mon, 25 May 2015 09:59:28 +0000 (12:59 +0300)
src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx
src/MEDPartitioner_Swig/MEDPartitionerTest.py

index 3185a54954fb571dfd551ed27469b7b0906b7f97..0290e75ebb572f93a76449f082095155831d02bf 100644 (file)
@@ -46,8 +46,14 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int
 {
   ParaDomainSelector parallelizer(mesure_memory);
   _input_collection=new MeshCollection(filename,parallelizer);
-  parallelizer.evaluateMemory();
+
+  MEDPARTITIONER::ParallelTopology* aPT =
+    (MEDPARTITIONER::ParallelTopology*) _input_collection->getTopology();
+  aPT->setGlobalNumerotationDefault( _input_collection->getParaDomainSelector() );
+  _input_collection->prepareFieldDescriptions();
   createPartitionCollection(ndomains, library, creates_boundary_faces, create_joints, mesure_memory);
+
+  parallelizer.evaluateMemory();
 }
 
 MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory)
@@ -61,8 +67,9 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const ParaMEDMEM::MEDFileData* fi
     (MEDPARTITIONER::ParallelTopology*) _input_collection->getTopology();
   aPT->setGlobalNumerotationDefault( _input_collection->getParaDomainSelector() );
   _input_collection->prepareFieldDescriptions();
-
   createPartitionCollection(ndomains, library, creates_boundary_faces, create_joints, mesure_memory);
+
+  parallelizer.evaluateMemory();
 }
 
 void MEDPARTITIONER::MEDPartitioner::createPartitionCollection(int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory)
index da9ce71d7be8cbc65cddb169e701e644cf00b5ea..bfc02aa66b7de4f1e4df519a202c7b976ce82559 100644 (file)
@@ -2239,6 +2239,10 @@ void MEDPARTITIONER::MeshCollection::prepareFieldDescriptions()
 //filter _field_descriptions to be in all procs compliant and equal
 {
   int nbfiles=MyGlobals::_File_Names.size(); //nb domains
+  if (nbfiles==0)
+    {
+      nbfiles=_topology->nbDomain();
+    }
   std::vector<std::string> r2;
   //from allgatherv then vector(procs) of serialised vector(fields) of vector(description) data
   for (int i=0; i<(int)_field_descriptions.size(); i++)
index 71a53f49d6046ed2963cedb71122c05790313bf5..773bb0fdb38172663eacbd2ac7891ff292f79d45 100644 (file)
@@ -22,22 +22,26 @@ from MEDLoader import *
 import unittest
 
 class MEDPartitionerTest(unittest.TestCase):
-
-#    @unittest.skipUnless("BOOST" in RenumberAvailableMethods
-#(),"requires BOOST prerequisite !")
-    def test1(self):
+   # def test1(self):
         from MEDCoupling import MEDCouplingCMesh
-        #ren=RenumberingFactory("BOOST")
         arr=DataArrayDouble(100) ; arr.iota()
         c=MEDCouplingCMesh() ; c.setCoords(arr,arr)
         m=c.buildUnstructured()
         d=MEDFileData.New("/dn20/salome/imn/SALOME7YA/MED_BUILD/src/MEDLoader/Swig/splitted_blade1.med")
-       #mfd1 = MEDFileData.New()
         p=MEDPartitioner.New(d,2);
         part=p.Graph(m.generateGraph())
         part.partGraph(2)
         #a=part.getGraph()
-        #n2o,o2n=ren.renumber(a,b)
+    pass
+    def test2(self):
+        from MEDCoupling import MEDCouplingCMesh
+        arr=DataArrayDouble(100) ; arr.iota()
+        c=MEDCouplingCMesh() ; c.setCoords(arr,arr)
+        m=c.buildUnstructured()
+        p=MEDPartitioner.New("/dn20/salome/imn/SALOME7YA/MED_BUILD/src/MEDLoader/Swig/splitted_blade1.med");
+        part=p.Graph(m.generateGraph())
+        part.partGraph(2)
+        #a=part.getGraph()
     pass
 
 unittest.main()