--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
#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);
(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);
(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);
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")
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;
_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)
_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)
_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)
_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)
_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)
}
// 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
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;
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]
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());
//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
//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"
);
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
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;
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);
//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"
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
{
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;
}
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);
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);