From: Christophe Bourcier Date: Mon, 26 Jun 2017 15:27:39 +0000 (+0200) Subject: To be coherent in medpartitioner options and code, use imperative for create_boundary... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcbr%2Ffix_typo_in_medpartitioner;p=tools%2Fmedcoupling.git To be coherent in medpartitioner options and code, use imperative for create_boundary_faces and create_joints --- diff --git a/doc/user/doxygen/doxfiles/reference/misc/tools.dox b/doc/user/doxygen/doxfiles/reference/misc/tools.dox index 8bcba7cd2..3c69b6709 100644 --- a/doc/user/doxygen/doxfiles/reference/misc/tools.dox +++ b/doc/user/doxygen/doxfiles/reference/misc/tools.dox @@ -55,7 +55,7 @@ Available options: --meshname= : name of the input mesh (not used with --distributed option) --ndomains= : 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 diff --git a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx index 6ea40a0e6..ea4eea532 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.cxx @@ -38,12 +38,12 @@ #include #include -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") diff --git a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx index dc80f70eb..0105969bd 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MEDPartitioner.hxx @@ -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; diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx index e7023ab9c..1fb3771c0 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx @@ -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) diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx index aa95be87c..335746d0c 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx @@ -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 diff --git a/src/MEDPartitioner/MEDPARTITIONER_Utils.cxx b/src/MEDPartitioner/MEDPARTITIONER_Utils.cxx index ef0d248b7..e0b868ed5 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_Utils.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_Utils.cxx @@ -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 MEDPARTITIONER::MyGlobals::_File_Names; std::vector MEDPARTITIONER::MyGlobals::_Mesh_Names; diff --git a/src/MEDPartitioner/MEDPARTITIONER_Utils.hxx b/src/MEDPartitioner/MEDPARTITIONER_Utils.hxx index 6a469b597..b50c9dadd 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_Utils.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_Utils.hxx @@ -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 _File_Names; //on [iold] diff --git a/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx b/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx index e8059978d..2329b41e9 100644 --- a/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx +++ b/src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx @@ -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()); diff --git a/src/MEDPartitioner/medpartitioner.cxx b/src/MEDPartitioner/medpartitioner.cxx index 07adb0e2e..de188190c 100644 --- a/src/MEDPartitioner/medpartitioner.cxx +++ b/src/MEDPartitioner/medpartitioner.cxx @@ -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= : 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"< : 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= : 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"<