Salome HOME
To be coherent in medpartitioner options and code, use imperative for create_boundary...
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 26 Jun 2017 15:27:39 +0000 (17:27 +0200)
committerabn <adrien.bruneton@cea.fr>
Wed, 28 Jun 2017 14:05:48 +0000 (16:05 +0200)
doc/user/doxygen/doxfiles/reference/misc/tools.dox
src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx
src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx
src/MEDPartitioner/MEDPARTITIONER_Utils.cxx
src/MEDPartitioner/MEDPARTITIONER_Utils.hxx
src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx
src/MEDPartitioner/medpartitioner.cxx
src/MEDPartitioner/medpartitioner_para.cxx
src/MEDPartitioner_Swig/MEDPartitionerCommon.i

index 8bcba7cd2b2f4b2d5649eedbd83ef3721cbba12e..3c69b67093c521693d54b25972fc4acdb98c369e 100644 (file)
@@ -55,7 +55,7 @@ Available options:
         --meshname=<string>    : name of the input mesh (not used with --distributed option)
         --ndomains=<number>    : number of subdomains in the output file, default is 1
         --plain-master         : creates a plain masterfile instead of an XML file
-        --creates-boundary-faces: creates the necessary faces so that faces joints are created in the output files
+        --create-boundary-faces: creates the necessary faces so that faces joints are created in the output files
         --family-splitting     : preserves the family names instead of focusing on the groups
 \endcode
 
index 6ea40a0e6a931d31e57ba4008dbe8fae12c3b138..ea4eea532b7d31bd8d9983cad7121c45b37d3e2d 100644 (file)
 #include <iostream>
 #include <vector>
 
-MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory):
+MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int ndomains, const std::string& library,bool create_boundary_faces, bool create_joints, bool mesure_memory):
   _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 )
 {
   MyGlobals::_World_Size = 1;
   MyGlobals::_Rank = 0;
-  MyGlobals::_Creates_Boundary_Faces = creates_boundary_faces;
+  MyGlobals::_Create_Boundary_Faces = create_boundary_faces;
   MyGlobals::_Create_Joints = create_joints;
 
   ParaDomainSelector parallelizer(mesure_memory);
@@ -54,17 +54,17 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const std::string& filename, int
     (MEDPARTITIONER::ParallelTopology*) _input_collection->getTopology();
   aPT->setGlobalNumerotationDefault( _input_collection->getParaDomainSelector() );
   _input_collection->prepareFieldDescriptions();
-  createPartitionCollection(ndomains, library, creates_boundary_faces, create_joints, mesure_memory);
+  createPartitionCollection(ndomains, library, create_boundary_faces, create_joints, mesure_memory);
 
   parallelizer.evaluateMemory();
 }
 
-MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory):
+MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, int ndomains, const std::string& library,bool create_boundary_faces, bool create_joints, bool mesure_memory):
   _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 )
 {
   MyGlobals::_World_Size = 1;
   MyGlobals::_Rank = 0;
-  MyGlobals::_Creates_Boundary_Faces = creates_boundary_faces;
+  MyGlobals::_Create_Boundary_Faces = create_boundary_faces;
   MyGlobals::_Create_Joints = create_joints;
 
   ParaDomainSelector parallelizer(mesure_memory);
@@ -76,17 +76,17 @@ MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* f
     (MEDPARTITIONER::ParallelTopology*) _input_collection->getTopology();
   aPT->setGlobalNumerotationDefault( _input_collection->getParaDomainSelector() );
   _input_collection->prepareFieldDescriptions();
-  createPartitionCollection(ndomains, library, creates_boundary_faces, create_joints, mesure_memory);
+  createPartitionCollection(ndomains, library, create_boundary_faces, create_joints, mesure_memory);
 
   parallelizer.evaluateMemory();
 }
 
-MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, MEDPARTITIONER ::Graph* graph, bool creates_boundary_faces, bool create_joints, bool mesure_memory):
+MEDPARTITIONER::MEDPartitioner::MEDPartitioner(const MEDCoupling::MEDFileData* filedata, MEDPARTITIONER ::Graph* graph, bool create_boundary_faces, bool create_joints, bool mesure_memory):
   _input_collection( 0 ), _output_collection( 0 ), _new_topology( 0 )
 {
   MyGlobals::_World_Size = 1;
   MyGlobals::_Rank = 0;
-  MyGlobals::_Creates_Boundary_Faces = creates_boundary_faces;
+  MyGlobals::_Create_Boundary_Faces = create_boundary_faces;
   MyGlobals::_Create_Joints = create_joints;
 
   ParaDomainSelector parallelizer(mesure_memory);
@@ -113,7 +113,7 @@ MEDPARTITIONER::MEDPartitioner::~MEDPartitioner()
   delete _new_topology; _new_topology = 0;
 }
 
-void MEDPARTITIONER::MEDPartitioner::createPartitionCollection(int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory)
+void MEDPARTITIONER::MEDPartitioner::createPartitionCollection(int ndomains, const std::string& library,bool create_boundary_faces, bool create_joints, bool mesure_memory)
 {
   //ParallelTopology* aPT = (ParallelTopology*) _input_collection->getTopology();
   if (library == "metis")
index dc80f70ebe7eacddecb9d9cac8dd6660ca2b5553..0105969bd0b94a25689f924fba5189e836396fa2 100644 (file)
@@ -39,16 +39,16 @@ namespace MEDPARTITIONER
   class MEDPARTITIONER_EXPORT MEDPartitioner
   {
   public:
-    MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
-    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
-    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
+    MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
+    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
+    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false);
     static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0);
     void write(const std::string& filename);
     MEDCoupling::MEDFileData* getMEDFileData();
     ~MEDPartitioner();
 
     MEDCoupling::MEDFileData *convertToMEDFileData(MeshCollection* meshcollection);
-    void createPartitionCollection(int ndomains, const std::string& library,bool creates_boundary_faces, bool create_joints, bool mesure_memory);
+    void createPartitionCollection(int ndomains, const std::string& library,bool create_boundary_faces, bool create_joints, bool mesure_memory);
 
   private:
     MeshCollection* _input_collection;
index e7023ab9c760b636cea1389cdf0e4d9ffa0fd4c2..1fb3771c00ff0445d6be7be940a09f1eae68f533 100644 (file)
@@ -71,7 +71,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection()
     _domain_selector( 0 ),
     _i_non_empty_mesh(-1),
     _driver_type(MEDPARTITIONER::MedXml),
-    _subdomain_boundary_creates( MyGlobals::_Creates_Boundary_Faces ),
+    _subdomain_boundary_creates( MyGlobals::_Create_Boundary_Faces ),
     _family_splitting(false),
     _create_empty_groups(false),
     _joint_finder(0)
@@ -100,7 +100,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
     _i_non_empty_mesh(-1),
     _name(initialCollection._name),
     _driver_type(MEDPARTITIONER::MedXml),
-    _subdomain_boundary_creates(MyGlobals::_Creates_Boundary_Faces),
+    _subdomain_boundary_creates(MyGlobals::_Create_Boundary_Faces),
     _family_splitting(family_splitting),
     _create_empty_groups(create_empty_groups),
     _joint_finder(0)
@@ -1508,7 +1508,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename)
     _domain_selector( 0 ),
     _i_non_empty_mesh(-1),
     _driver_type(MEDPARTITIONER::Undefined),
-    _subdomain_boundary_creates(MyGlobals::_Creates_Boundary_Faces),
+    _subdomain_boundary_creates(MyGlobals::_Create_Boundary_Faces),
     _family_splitting(false),
     _create_empty_groups(false),
     _joint_finder(0)
@@ -1552,7 +1552,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, Para
     _domain_selector( &domainSelector ),
     _i_non_empty_mesh(-1),
     _driver_type(MEDPARTITIONER::Undefined),
-    _subdomain_boundary_creates(MyGlobals::_Creates_Boundary_Faces),
+    _subdomain_boundary_creates(MyGlobals::_Create_Boundary_Faces),
     _family_splitting(false),
     _create_empty_groups(false),
     _joint_finder(0)
@@ -1712,7 +1712,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, cons
     _i_non_empty_mesh(-1),
     _name(meshname),
     _driver_type(MEDPARTITIONER::MedXml),
-    _subdomain_boundary_creates(MyGlobals::_Creates_Boundary_Faces),
+    _subdomain_boundary_creates(MyGlobals::_Create_Boundary_Faces),
     _family_splitting(false),
     _create_empty_groups(false),
     _joint_finder(0)
index aa95be87c727aff83885c7f077c1d2480f2f764d..335746d0c6b6a684b935b4481f558f7802261629 100644 (file)
@@ -234,7 +234,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const
     }
 
   // MEDCoupling::MEDCouplingUMesh* boundaryMesh=0;
-  // if (MyGlobals::_Creates_Boundary_Faces>0)
+  // if (MyGlobals::_Create_Boundary_Faces>0)
   //   {
   //     //try to write Boundary meshes
   //     bool keepCoords=false; //TODO or true
index ef0d248b7e377987e8d4bfeaf9ff88e028653652..e0b868ed55be565ee4cecb11bc03e34404ff3f9e 100644 (file)
@@ -44,7 +44,7 @@ int MEDPARTITIONER::MyGlobals::_Rank=-1;
 int MEDPARTITIONER::MyGlobals::_World_Size=-1;
 int MEDPARTITIONER::MyGlobals::_Randomize=0;
 int MEDPARTITIONER::MyGlobals::_Atomize=0;
-int MEDPARTITIONER::MyGlobals::_Creates_Boundary_Faces=0;
+int MEDPARTITIONER::MyGlobals::_Create_Boundary_Faces=0;
 int MEDPARTITIONER::MyGlobals::_Create_Joints=0;
 std::vector<std::string> MEDPARTITIONER::MyGlobals::_File_Names;
 std::vector<std::string> MEDPARTITIONER::MyGlobals::_Mesh_Names;
index 6a469b5974505197ea1ada92e5529176b3c72bce..b50c9dadd6e073173ece472e4fa1a0519d9b8f65 100644 (file)
@@ -126,7 +126,7 @@ namespace MEDPARTITIONER
     static int _World_Size;
     static int _Randomize;
     static int _Atomize;
-    static int _Creates_Boundary_Faces;
+    static int _Create_Boundary_Faces;
     static int _Create_Joints;
     static int _Is0verbose; //trace cout if rank 0 and verbose
     static std::vector<std::string> _File_Names;    //on [iold]
index e8059978d8705cd270ebcaa59c5dd646381641d3..2329b41e968f0ef649f85dc42b0469a92a1b620e 100644 (file)
@@ -1421,7 +1421,7 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
 
   const char xmlName[] = "tmp_testCreateBoundaryFaces2D";
   {
-    MyGlobals::_Creates_Boundary_Faces = true;
+    MyGlobals::_Create_Boundary_Faces = true;
     MeshCollection new_collection(collection,new_topo.get());
 
     CPPUNIT_ASSERT_EQUAL(ndomains,new_collection.getNbOfLocalMeshes());
index 07adb0e2eb7fb49a028a89470a20101686194493..de188190c895d56c72971d680f11e0e6dbce8ac2 100644 (file)
@@ -72,7 +72,7 @@ int main(int argc, char** argv)
   //sequential : no MPI
   MyGlobals::_World_Size=1;
   MyGlobals::_Rank=0;
-  MyGlobals::_Creates_Boundary_Faces=0;
+  MyGlobals::_Create_Boundary_Faces=0;
   MyGlobals::_Create_Joints=0;
 
   // Primitive parsing of command-line options
@@ -86,8 +86,8 @@ int main(int argc, char** argv)
   //user can choose!
                "\t--split-method=<string>  : name of the splitting library (metis/scotch), default is metis\n"
 #endif
-               "\t--creates-boundary-faces : creates boundary faces mesh in the output files\n"
-               "\t--creates-joints         : creates joints in the output files\n"
+               "\t--create-boundary-faces  : creates boundary faces mesh in the output files\n"
+               "\t--create-joints          : creates joints in the output files\n"
                "\t--dump-cpu-memory        : dumps passed CPU time and maximal increase of used memory\n"
                );
 
@@ -112,7 +112,7 @@ int main(int argc, char** argv)
       else if (TestArg(argv[i],"--output-file",value)) output=value;
       else if (TestArg(argv[i],"--split-method",value)) library=value;
       else if (TestArg(argv[i],"--ndomains",value)) ndomains=atoi(value.c_str());
-      else if (TestArg(argv[i],"--creates-boundary-faces",value)) MyGlobals::_Creates_Boundary_Faces=1;
+      else if (TestArg(argv[i],"--create-boundary-faces",value)) MyGlobals::_Create_Boundary_Faces=1;
       else if (TestArg(argv[i],"--create-joints",value)) MyGlobals::_Create_Joints=1;
       else if (TestArg(argv[i],"--dump-cpu-memory",value)) mesure_memory=true;
       else 
@@ -153,7 +153,7 @@ int main(int argc, char** argv)
       cout << "  output-file = " << output << endl;
       cout << "  split-method = " << library << endl;
       cout << "  ndomains = " << ndomains << endl;
-      cout << "  creates_boundary_faces = " << MyGlobals::_Creates_Boundary_Faces << endl;
+      cout << "  create_boundary_faces = " << MyGlobals::_Create_Boundary_Faces << endl;
       cout << "  create-joints = " << MyGlobals::_Create_Joints<< endl;
       cout << "  dump-cpu-memory = " << mesure_memory<< endl;
       cout << "  verbose = " << MyGlobals::_Verbose << endl;
@@ -267,7 +267,7 @@ int main(int argc, char** argv)
       if (MyGlobals::_Is0verbose) 
         cout << "generalInformations : \n"<<ReprVectorOfString(finalInformations);
     
-      //new_collection.setSubdomainBoundaryCreates(creates_boundary_faces);
+      //new_collection.setSubdomainBoundaryCreates(create_boundary_faces);
       if (MyGlobals::_Is0verbose) cout << "Writing "<<ndomains<<" output files "<<output<<"xx.med"<<" and "<<output<<".xml"<<endl;
       new_collection.write(output);
   
index abc9f4b96c6732cb7a8b3c8febe5f6e9fe5f4bc7..070bf74a4c38931053c9e472b11f0945410db00e 100644 (file)
@@ -102,7 +102,7 @@ int main(int argc, char** argv)
 //user can choose! (not yet)
                "\t--split-method=<string>  : name of the splitting library (metis/scotch), default is metis\n"
 #endif
-               "\t--creates-boundary-faces : creates boundary faces mesh in the output files\n"
+               "\t--create-boundary-faces : creates boundary faces mesh in the output files\n"
                "\t--dump-cpu-memory        : dumps passed CPU time and maximal increase of used memory\n"
                //"\t--randomize=<number>     : random seed for other partitionning (only on one proc)\n"
                //"\t--atomize                : do the opposite of a good partitionner (only on one proc)\n"
@@ -131,7 +131,7 @@ int main(int argc, char** argv)
       else if (TestArg(argv[i],"--ndomains",value)) ndomains=atoi(value.c_str());
       else if (TestArg(argv[i],"--randomize",value)) MyGlobals::_Randomize=atoi(value.c_str());
       else if (TestArg(argv[i],"--atomize",value)) MyGlobals::_Atomize=atoi(value.c_str());
-      else if (TestArg(argv[i],"--creates-boundary-faces",value)) MyGlobals::_Creates_Boundary_Faces=1;
+      else if (TestArg(argv[i],"--create-boundary-faces",value)) MyGlobals::_Create_Boundary_Faces=1;
       else if (TestArg(argv[i],"--dump-cpu-memory",value)) mesure_memory=true;
       else 
         {
@@ -196,7 +196,7 @@ int main(int argc, char** argv)
       cout << "  output-file = " << output << endl;
       cout << "  split-method = " << library << endl;
       cout << "  ndomains = " << ndomains << endl;
-      cout << "  creates_boundary_faces = " << MyGlobals::_Creates_Boundary_Faces << endl;
+      cout << "  create_boundary_faces = " << MyGlobals::_Create_Boundary_Faces << endl;
       cout << "  dump-cpu-memory = " << mesure_memory<< endl;
       cout << "  verbose = " << MyGlobals::_Verbose << endl;
     }
@@ -303,7 +303,7 @@ int main(int argc, char** argv)
       if (MyGlobals::_Is0verbose) 
         cout << "generalInformations : \n"<<ReprVectorOfString(finalInformations);
     
-      //new_collection.setSubdomainBoundaryCreates(creates_boundary_faces);
+      //new_collection.setSubdomainBoundaryCreates(create_boundary_faces);
       if (MyGlobals::_Is0verbose) cout << "Writing "<<ndomains<<" output files "<<output<<"xx.med"<<" and "<<output<<".xml"<<endl;
       new_collection.write(output);
   
index 350ac7555c4898f2ff5e6693b41c46cdbfefba4e..a4322ba49a8daa8bbc90074c1b621de0e7e026fb 100644 (file)
@@ -75,9 +75,9 @@ namespace MEDPARTITIONER
   class MEDPartitioner
   {
   public:
-    MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
-    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
-    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool creates_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
+    MEDPartitioner(const std::string& filename, int ndomains=1, const std::string& library="metis",bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
+    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, int ndomains=1, const std::string& library="metis",bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
+    MEDPartitioner(const MEDCoupling::MEDFileData* fileData, Graph* graph, bool create_boundary_faces=false, bool create_joints=false, bool mesure_memory=false) throw(INTERP_KERNEL::Exception);
     static MEDPARTITIONER::Graph* Graph(MEDCoupling::MEDCouplingSkyLineArray* graph, Graph::splitter_type split=Graph::METIS, int* edgeweight=0) throw(INTERP_KERNEL::Exception);
     MEDCoupling::MEDFileData* getMEDFileData() throw(INTERP_KERNEL::Exception);
     void write(const std::string& filename) throw(INTERP_KERNEL::Exception);