\mainpage Introduction to MG-Tetra plug-in
MG-Tetra plug-in adds two meshing algorithm to the SALOME Mesh:
-\b MG-Tetra (former GHS3D) and <b>MG-Tetra Optimization</b>.
+<b> MG-Tetra or MG-Tetra HPC</b> (former GHS3D) and <b>MG-Tetra Optimization</b>.
-\b MG-Tetra meshing algorithm is destined for:
+<b> MG-Tetra or MG-Tetra HPC</b> meshing algorithm is destined for:
- Meshing 3D geometric entities: solids are split into tetrahedral (pyramidal) elements.
- Generating 3D meshes from 2D meshes (triangles and quadrangles), working without geometrical objects.
self.Parameters().SetToRemoveCentralPoint(toRemove)
pass
+ ## To set the algorithm id
+ # @param algorithm ID 0 MGTetra HPC - 1 MGTetra
+ def SetAlgorithm(self,algoId):
+ self.Parameters().SetAlgorithm(algoId)
+ pass
+
+ ## To use parallel mode
+ # @param toUseNumOfThreads "use max number of threads" flag value
+ def SetUseNumOfThreads(self,useThreads):
+ self.Parameters().SetUseNumOfThreads(useThreads)
+ pass
+
+ ## To set the number of threads to be used
+ # @param numberOfThreads define max_num_threads for MGTetra and MGTetra HPC
+ def SetNumOfThreads(self,numThreads):
+ self.Parameters().SetNumOfThreads(numThreads)
+ pass
+
+ ## Set SetPthreadMode.
+ # @param pthreadMode for parallel algorithm in MGTetra
+ # - 0 - none
+ # - 1 - aggresive
+ # - 2 - safe
+ def SetPthreadMode(self,pthreadMode):
+ self.Parameters().SetPthreadMode(pthreadMode)
+ pass
+
+ ## Set SetParallelMode.
+ # @param parallelMode for parallel algorithm in MGTetra HPC
+ # - 0 - none
+ # - 1 - reproducible_given_max_number_of_threads
+ # - 2 - reproducible
+ # - 3 - aggressive
+ def SetPthreadMode(self,parallelMode):
+ self.Parameters().SetParallelMode(parallelMode)
+ pass
+
## To set an enforced vertex.
# @param x : x coordinate
# @param y : y coordinate
std::string _MEDName = "DOMAIN\0";
bool verbose = _hyp ? !_hyp->HasOptionDefined("verbose") : true;
bool proximity = _hyp->GetUseVolumeProximity();
- bool _Multithread = _hyp->GetUseNumOfThreads();
+ bool isMultithread = _hyp->GetUseNumOfThreads();
double minSize = _hyp->GetMinSize();
double maxSize = _hyp->GetMaxSize();
TCollection_AsciiString cmd = TCollection_AsciiString();
std::string _AdvOptions;
- if (_Multithread)
+ if (isMultithread)
cmd += "mg-tetra_hpc.exe";
else
cmd = cmd + "mpirun --n " + NbPart + " mg-tetra_hpc_mpi.exe";
cmd = cmd + " --in=" + GHS3DPRL_In;
- if (_Multithread)
+
+ if (isMultithread)
{
cmd = cmd + " --max_number_of_threads " + SMESH_Comment( _hyp->GetNumOfThreads() );
const char* parallelMode[] = { "none", "reproducible_given_max_number_of_threads", "reproducible", "aggressive" };
const short myMode = _hyp->GetParallelMode();
- if ( myMode >= 0 && myMode < 4 ) {
+ if ( myMode >= 1 && myMode < 4 ) {
cmd += " --parallel_mode ";
cmd += parallelMode[ myMode ];
}
return error(log);
}
- if (!_Multithread)
+ if (!isMultithread)
{
fileskinmed=path + casenamemed + "_skin.med";
cout<<" Write file "<<fileskinmed<<"...";
// Check the real need for calling this program in production!!!
// ... continue the original code!
- if (_Multithread)
+ if (isMultithread)
{
// check the med file has been created (only one med file, since multithread)
TCollection_AsciiString resuMedFile = TCollection_AsciiString(path) + casenamemed + "_1.med";
"split_overconstrained_tetrahedra", // no
"" // mark of end
};
- _commonMGTetraAdvancedOptions = { "split_overconstrained_tetrahedra" };
+
int i = 0;
while (boolOptionNames[i][0])
{
{
option = o2v->first;
value = this->GetOptionValue( option, &isDefault );
- std::cout << option << ", " << value << std::endl;
if ( isDefault )
continue;
* \brief Return command to run MG-Tetra mesher excluding file prefix (-f)
*/
//================================================================================
-
std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* hyp,
const bool hasShapeToMesh,
const bool forExecutable)
if ( aInitialMemory > 0 ) cmd += SMESH_Comment( int( aInitialMemory ));
else cmd += "100";
}
+
// component to mesh
if ( comp && !useBndRecovery ) {
// We always run MG-Tetra with "to mesh holes'==TRUE (see PAL19680)
cmd += " --verbose " + SMESH_Comment( hyp->myVerboseLevel );
}
- // boundary recovery version
- // if ( useBndRecovery ) {
- // cmd += " -C";
- // }
-
- // to use FEM correction
- // if ( fem && hyp && hyp->myToUseFemCorrection) {
- // cmd += " -FEM";
- // }
-
// to remove initial central point.
if ( rem && hyp->myToRemoveCentralPoint ) {
if ( forExecutable )
cmd += " --centralpoint no";
}
- // options as text
- // if ( !hyp->myTextOption.empty() ) {
- // cmd += " " + hyp->myTextOption;
- // }
-
-
if ( hyp->GetMinSize() > 0 )
cmd += " --min_size " + SMESH_Comment( hyp->GetMinSize() );
{
cmd += " --max_number_of_threads " + SMESH_Comment( hyp->GetNumOfThreads() );
const char* pthreadMode[] = { "none" , "aggressive" , "safe" };
- if ( hyp->myPthreadModeMG >= 0 && hyp->myPthreadModeMG < 3 ) {
+ if ( hyp->myPthreadModeMG >= 1 && hyp->myPthreadModeMG < 3 ) {
cmd += " --pthreads_mode ";
cmd += pthreadMode[ hyp->myPthreadModeMG ];
}
void ClearOption(const std::string& optionName);
TOptionValues GetOptionValues() const;
const TOptionValues& GetCustomOptionValues() const { return _customOption2value; }
+
+ bool isMGTetraHPCOptions( std::string & option ) const;
/*!
* \brief To set the advanced options in the execution command line
*/
TOptionValues _option2value, _customOption2value; // user defined values
TOptionValues _defaultOptionValues; // default values
TOptionNames _doubleOptions, _charOptions, _boolOptions; // to find a type of option
- std::vector<std::string> _commonMGTetraAdvancedOptions; // common advanced options for MGTetra and MGTetraHPC
TGHS3DEnforcedVertexList _enfVertexList;
TGHS3DEnforcedVertexCoordsValues _enfVertexCoordsSizeList;
void SetNumOfThreads(CORBA::Short numThreads);
CORBA::Short GetNumOfThreads();
/*!
+ * For MGTetra
* PthreadMode: 0-PThreadNone, 1-PThreadAggressive, 2-Safe
*/
void SetPthreadMode(CORBA::Short pThreadMode);
CORBA::Short GetPthreadMode();
/*!
- * SetParallelMode level: 0-ParallelNone, 1-ReproducibleGivenMaxNumThreads, 2-Reproducible, 3-ParallelAggressive
-
+ * For MGTetra HPC
+ * SetParallelMode level: 0-ParallelNone, 1-ReproducibleGivenMaxNumThreads, 2-Reproducible, 3-ParallelAggressive
*/
void SetParallelMode(CORBA::Short parallelMode);
CORBA::Short GetParallelMode();
<source>LEVEL_LIGHT</source>
<translation>Light</translation>
</message>
+ <message>
+ <source>LEVEL_MEDIUM</source>
+ <translation>Medium (standard)</translation>
+ </message>
<message>
<source>GHS3D_PTHREAD_MODE</source>
<translation>Pthread Mode</translation>
</message>
<message>
<source>GHS3D_PARALLE_STRAT</source>
- <translation>Paralle Stategy (HPC)</translation>
+ <translation>Parallel Strategy (HPC)</translation>
</message>
<message>
<source>MODE_NONE</source>
<source>GHS3D_THREADS_SIZE</source>
<translation>Maximal number of threads</translation>
</message>
- <message>
- <source>LEVEL_MEDIUM</source>
- <translation>Medium (standard)</translation>
- </message>
<message>
<source>LEVEL_STANDARDPLUS</source>
<translation>Standard+</translation>
<source>LEVEL_MEDIUM</source>
<translation>Moyen (standard)</translation>
</message>
+ <message>
+ <source>GHS3D_PTHREAD_MODE</source>
+ <translation>Mode Pthread</translation>
+ </message>
+ <message>
+ <source>GHS3D_PARALLE_STRAT</source>
+ <translation>Statégie Parallèle(HPC)</translation>
+ </message>
+ <message>
+ <source>MODE_NONE</source>
+ <translation>Zéro</translation>
+ </message>
+ <message>
+ <source>MODE_AGGRESSIVE</source>
+ <translation>Agressif</translation>
+ </message>
+ <message>
+ <source>MODE_SAFE</source>
+ <translation>Sûr</translation>
+ </message>
+ <message>
+ <source>MODE_REPRODUCIBLE</source>
+ <translation>Reproductible</translation>
+ </message>
+ <message>
+ <source>MODE_REPRODUCIBLE_GIVEN_MAX_THREADS</source>
+ <translation>Reproductible étant donné le nombre max de threads</translation>
+ </message>
+ <message>
+ <source>GHS3D_ALGO_SELECTION</source>
+ <translation>Sélection d'algorithme</translation>
+ </message>
+ <message>
+ <source>GHS3D_ALGO_MGTETRA</source>
+ <translation>MG-Tetra</translation>
+ </message>
+ <message>
+ <source>GHS3D_ALGO_MGTETRAHPC</source>
+ <translation>MG-Tetra HPC</translation>
+ </message>
+ <message>
+ <source>GHS3D_THREADS_SIZE</source>
+ <translation>Nombre max de threads</translation>
+ </message>
<message>
<source>LEVEL_STANDARDPLUS</source>
<translation>Standard+</translation>