/*!
-\page ghs3dprl_hypo_page MG-Tetra Parallel Parameters hypothesis
-
-\n MG-Tetra Parallel Parameters hypothesis works only with <b>MG-Tetra Parallel</b> algorithm.
-This algorithm is a commercial software, its use requires a licence (http://www.distene.com/fr/build/offer.html).
-\n Tepal_V1.4 gives the possibility to generate a partitioned
-mesh with 200 million tetrahedrons on a computer with average memory size
-(2Go RAM) in about 50 hours on one CPU (Xeon, 2008).
-\n New Tepal_V2.0 gives the possibility to generate a partitioned mesh with (for the moment) no more than 100 million
-tetrahedrons on computers using MPI, (Total 16 Go RAM)
-in about 900 seconds (!yes! : !seconds!) on 2 octo processors (Xeon, 2009).
-The launch of this beta-version is described below.
+\page ghs3dprl_hypo_page MG-Tetra_HPC Parameters hypothesis
+
+\n MG-Tetra Parameters hypothesis works only with <b>MG-Tetra</b>
+meshing algorithm which uses <b>MG-Tetra_HPC</b> code (formerly tepal)
+which is the parallel implementation of MG-Tetra (formerly TetMesh-GHS3D) algorithm.
+This algorithm is a DISTENE commercial software, its use requires a license.
+\n
+See http://www.distene.com and http://www.meshgems.com/volume-meshing-meshgems-tetra.html.
+\n MG-Tetra-hpc (Tepal V3 in fact) gives the possibility to generate a partitioned
+mesh with more than 200 million tetrahedrons on computers using MPI.
+The launch of this version is described below.
\n This is a serious alternative to MG-Tetra, which requires a much less common
configuration with 64Go RAM to only try to make a partition of a mesh with
-200 million tetrahedrons, no result guaranteed.
+200 million tetrahedrons, no result guaranteed (in 2010).
\n
-\note The Plugin doesn't load in the Memory the supposedly large resulting meshes.
+\note The plug-in doesn't load in the memory the supposedly large resulting meshes.
The meshes are saved in MED files and can be imported in the user-defined location via menu File-Import-MED Files.
\n Pay attention, that Salome GUI needs 2Go RAM to load a MED
file with 5 million tetrahedrons.
<ul>
<li>
-<b>Name</b> - allows to define the name of the hypothesis (MG-Tetra Parallel Parameters by default).
+<b>Name</b> - allows to define the name of the hypothesis (MG-Tetra_HPC Parameters by default).
</li>
<li>
-<b>MED_Name</b> - allows to define the path and the prefix of the
-resulting MED files ("DOMAIN" by default).
+<b>MED Name</b> - allows to define the path and the prefix of the
+resulting MED files ("DOMAIN" by default).
If the path is not defined, the environment variable $SALOME_TMP_DIR
is used. If $SALOME_TMP_DIR is not defined as well, the environment
variable $TMP is used.
</li>
<li>
-<b>Nb_Part</b> - allows to define the number of generated MED files.
+<b>Nb Partitions</b> - allows to define the number of generated MED files.
The initial skin (triangles) will be meshed (tetrahedrons) and partitioned
in Nb_Part by the elementary algorithm implemented in Tepal.<br>
</li>
<li>
-<b>Keep_Files</b> - if this box is checked, input files of Tepal
-(GHS3DPRL.points and GHS3DPRL.faces) are not deleted after use (...if the
+<b>Keep Files</b> - if this box is checked, input files of MG-Tetra-hpc
+(GHS3DPRL.points and GHS3DPRL.faces) are not deleted after use (if the
background mode was not used).
</li>
<li>
-<b>Tepal_in_Background</b> - if this box is checked, Tepal execution
+<b>Tetra_hpc in Background</b> - if this box is checked, MG-Tetra-hpc execution
and MED file generation are launched in background mode and the user
-can even exit Salome. Pay attention that in this case Tepal algorithm works
+can even exit Salome. Pay attention that in this case MG-Tetra-hpc algorithm works
independently of "killSalome.py", and sometimes on another host.
</li>
<li>
-<b>To_Mesh_Holes</b> - if this box is checked, the parameter component
-of MG-Tetra will mesh holes.
+<b>Tetra_hpc Multithread</b> - if this box is checked, MG-Tetra-hpc execution
+is with mg_tetra_hpc.exe (multithread version), else mg_tetra_hpc_mpi.exe (MPI distributed version).
</li>
-
-<h1>Modifying MG-Tetra Parallel Advanced Parameters</h1><br>
-GHS3DPRL Plugin launches a standalone binary executable tepal2med.<br>
-tepal2med launches tepal, waits for the end of computation, and
-converts the resulting output tepal files into MED files.<br>
-Some advanced optional parameters are accessible as arguments.<br>
-
-If keep_files option is checked, it is possible to re-launch tepal2med
-or tepal in the Terminal as a command with custom parameters.<br>
-
<li>
-<b>Advanced tepal2med Parameters</b> - type "tepal2med --help" in the Terminal. <p>
-
-\verbatim
-myname@myhost > /export/home/myname/salome_5/GHS3DPRLPLUGIN_5/bin/salome/tepal2med --help
-Available options:
- --help : produces this help message
- --casename : path and name of input tepal2med files which are
- - output files of tepal .msg .noboite .faces .points .glo
- - output file of GHS3DPRL_Plugin casename_skin.med (optional)
- with initial skin and its initial groups
- --number : number of partitions
- --medname : path and name of output MED files
- --limitswap : max size of working cpu memory (Mo) (before swapping on .temp files)
- --verbose : trace of execution (0->6)
- --test : more tests about joints, before generation of output files
- --menu : a GUI menu for option number
- --launchtepal : also launch tepal on files casename.faces and casename.points and option number
- --meshholes : force parameter component of tetmesh-ghs3d to mesh holes
- --background : force background mode from launch tepal and generation of final MED files (big meshes)
- --deletegroups : regular expression (see QRegExp) which matches unwanted groups in final MED files
- (try --deletegroups="(\bAll_Nodes|\bAll_Faces)"
- (try --deletegroups="((\bAll_|\bNew_)(N|F|T))"
-example:
- tepal2med --casename=/tmp/GHS3DPRL --number=2 --medname=DOMAIN --limitswap=1000
- --verbose=0 --test=yes --menu=no --launchtepal=no
-
-\endverbatim
-\n
+<b>Merge subdomains</b> - if this box is checked, merge the sub-domains
+into one mesh and write the output .mesh(b).
</li>
<li>
-<b>Advanced Tepal_V1.4 Parameters</b> <p>
-
-\verbatim
-
-USAGE : tepal options
-
-With options :
- --filename name (-f name) :
- Prefix of the input case (MANDATORY)
-
- --ndom n (-n n) :
- Number of subdomains to make (MANDATORY)
-
- --ghs3d ghs3d options (-g ghs3d options) :
- Runs temesh ghs3d on a previously generated subdomain. (ghs3d options must be "quoted")
-
- --memory m (-m m) :
- Max amount of memory (megabytes) allowed for ghs in the cutting process. (default is 0 : unlimited)
-
- --mesh_only (-Z ) :
- Only (re)meshes all subdomains and updates communications messages
-
- --mesh_call command (-c command) :
- Calls the user specified command for meshing all the
- subomains after their skin has been generated
-
- --stats_only (-S ) :
- Only computes and shows some statistics on subdomains
-
- --rebuild (-r ) :
- Merges final subdomains skins
+<b>Tag subdomains</b> - if this box is checked, use the parallel sub-domain
+index as tag into the merged output mesh or not (used in combination with the
+<b>Merge subdomains</b> option).
+</li>
+<li>
+<b>Output interfaces</b> - if this box is checked, write the parallel
+sub-domains interface triangles into the merged output mesh (used in
+combination with the <b>Merge subdomains</b> option).
+</li>
+<li>
+<b>Discard subdomains</b> - if this box is checked, discard the parallel sub-domains
+(mesh, global numbering and interfaces).
+</li>
- --rebuild_tetra (-R ) :
- Merges final subdomains skins and tetraedra
+\image html ghs3dprl_parameters_advanced.png
- --rebuild_iface (-i ) :
- Includes interfaces in final subdomains merge
+In \b Advanced tab page you can specify not exposed options of MG_Tetra-hpc.
- --rebuild_retag (-t ) :
- Tags vertices, faces (and tetra if selected) with their
- subdomain number in the final merge of subdomains (keeps the lowest tag for shared elements)
+<b>Add option</b> adds a line to the table where you can type an option and its value as text.
+A check box in the first column activates/deactivates the option of the current row. A deactivated option will be erased upon pressing \a Ok.
- --rebuild_ensight_parts (-e ) :
- Builds ensight geom file with parts
+<h1>Modifying MG-Tetra-hpc Advanced Parameters</h1><br>
+MG-Tetra_HPC plug-in launches a standalone binary
+executable <b>tetrahpc2med</b>.<br>
+tetrahpc2med launches MG_Tetra-hpc, waits for the end of computation, and
+converts the resulting output files into MED files.<br>
+Some advanced optional parameters are accessible as arguments.<br>
- --tetmesh_args str (-G str) :
- Arguments to pass to Tetmesh during cutting process
+If <b>Keep Files</b> option is checked, it is possible to re-launch
+\a tetrahpc2med or MG-Tetra-hpc in the Terminal as a command with
+custom parameters.<br>
-\endverbatim
-\n
-</li>
<li>
-<b>Advanced MG-Tertra Parameters (through Tepal_V1.4's --tetmesh_args)</b> - type "ghs3d -h" in a Terminal. <p>
+<b>Advanced tetrahpc2med Parameters</b> - type <b>tetrahpc2med --help</b> in the Terminal. <p>
\verbatim
-myname@myhost > ghs3d -h
-
-USE
- /export/home/myname/ghs3d-4.0/DISTENE/Tools/TetMesh-GHS3D4.0/bin/Linux/ghs3dV4.0
- [-u] [-m memory>] [-M MEMORY] [-f prefix] [-v verbose]
- [-c component] [-p0] [-C] [-E count] [-t] [-o level]
- [-I filetype] [-a/-b] [-O n m]
-
-DESCRIPTION
-
- -u (-h) : prints this message.
-
- -m memory : launches the software with memory in Megabytes.
- The default value of this parameter is 64 Megabytes and its
- minimum value is 10 Megabytes.
- It is also possible to set this parameter with the
- environment variable GHS3D_MEMORY by means of an operation
- equivalent to:
- setenv GHS3D_MEMORY memory,
- the value specified in the command line has the priority on
- the environment variable.
-
- -M MEMORY : provides the automatic memory adjustment feature.
- If MEMORY (in Megabytes) is equal to zero, the size of the work space is
- calculated from the input. If MEMORY is not equal to
- zero, the software starts with MEMORY amount of work space.
- The software reallocates memory as necessary.
- The start value of MEMORY can range from 0 to 64 Megabytes,
- the maximum depends on -m option and the actual memory available.
-
- -f prefix : defines the generic prefix of the files.
-
- -v verbose : sets the output level parameter (the verbose parameter
- must be in the range 0 to 10).
-
- -c component : chooses the meshed component. If the parameter is
- 0, all components will be meshed, if
- 1, only the main (outermost) component will be meshed
-
- -p0 : disables creation of internal points.
-
- -C : uses an alternative boundary recovery mechanism. It should be used only
- when the standard boundary recovery fails.
-
- -E count : sets the extended output for error messages. If -E is used,
- the error messages will be printed, it is possible
- to indicate the maximum number of printed messages between 1 and 100.
-
- -t : generates an error file prefix.Log
-
- -o level : sets the required optimisation level.
- Valid optimisation levels are:
- none, light, standard or strong,
- with increase of "quality vs speed" ratio.
-
- -I filetype : defines the input mesh format as follows:
- -IP input files are ascii files, named prefix.points
- and prefix.faces - this is the default type of files
- -IPb input files are binary files, named prefix.pointsb
- and prefix.facesb
- -IM input file is ascii file, named prefix.mesh
- where prefix is defined with -f option
-
- -a/-b : selects the output file type:
- -a for ascii (the default) and
- -b for binary.
-
- -On : saves a NOPO file in addition. NOPO is the mesh data
- structure of the Simail and Modulef software packages.
- -Om : saves a mesh file in addition.
- -Omn : saves both NOPO and mesh files.
-
- ==============================================================================
- TETMESH-GHS3D SOFTWARE 4.0-3 (December, 2006)
- END OF SESSION
- COPYRIGHT (C)1989-2006 INRIA ALL RIGHTS RESERVED
- ==============================================================================
- ( Distene SAS
- Phone: +33(0)1-69-26-62-10 Fax: +33(0)1-69-26-90-33
- EMail: support@distene.com )
+myname@myhost > /export/home/myname/salome_7/GHS3DPRLPLUGIN/bin/salome/tetrahpc2med --help
+tetrahpc2med V3.0 (MED3+tetra-hpc) Available options:
+ --help : produces this help message
+ --casename : path and name of input tetrahpc2med files which are
+ - output files of GHS3DPRL_Plugin .mesh
+ - output file of GHS3DPRL_Plugin casename_skin.med (optional)
+ with initial skin and its initial groups
+ --number : number of partitions
+ --medname : path and name of output MED files
+ --limitswap : max size of working cpu memory (Mo) (before swapping on .temp files)
+ --verbose : trace of execution (0->6)
+ --test : more tests about joints, before generation of output files
+ --menu : a GUI menu for option number
+ --launchtetra : also launch tetra-hpc on files casename.mesh and option number
+ --merge_subdomains : merge the subdomains into one mesh and write the output .mesh(b) file
+ --tag_subdomains : use the parallel subdomain index as tag into the merged output mesh
+ to identify the parallel subdomains (used in combination with the merge_subdomains option)
+ --output_interfaces : write the parallel subdomains interface triangles into the merged output mesh
+ (used in combination with the merge_subdomains option)
+ --discard_subdomains : discard the parallel subdomains informations output (mesh, global numbering and interfaces)
+ --background : force background mode from launch tetra-hpc and generation of final MED files (big meshes)
+ --deletegroups : regular expression (see QRegExp) which matches unwanted groups in final MED files
+ (try --deletegroups="(\bJOINT)"
+ (try --deletegroups="(\bAll_Nodes|\bAll_Faces)"
+ (try --deletegroups="((\bAll_|\bNew_)(N|F|T))"
+example:
+ tetrahpc2med --casename=/tmp/GHS3DPRL --number=2 --medname=DOMAIN --limitswap=1000 --verbose=0 --test=yes --menu=no --launchtetra=no
\endverbatim
\n
</li>
-<h1>Saving user's preferred MG-Tetra Parallel Advanced Parameters</h1><br>
-GHS3DPRL Plugin launches standalone binary executable tepal2med.<br>
-You may rename file tepal2med as tepal2med.exe for example, and replace
-tepal2med by a shell script at your convenience to overriding parameters.
-<br>... or else $PATH modification... .<br>Idem for file tepal.<br><br>
<li>
-<b>Advanced tepal2med Parameters</b> - overriding parameter deletegroups<p>
-You may rename tepal2med as tepal2med.exe for example.
+<b>Advanced tetra_hpc parameters (2014)</b> <p>
-\code
-#!/bin/bash
-#script tepal2med overriding parameter deletegroups
-#we have renamed binary executable tepal2med as tepal2med.exe
-#echo tepal2med initial parameters are $1 $2 $3 $4 ... or $*
-#$0 is ignored
+\verbatim
-tepal2med.exe $* --deletegroups="(\bAll_Nodes|\bAll_Faces)"
+Usage: tetra_hpc.exe [options]
+
+Options:
+
+ Short option (if it exists)
+ / Long option
+ | / Description
+ | | /
+ v v v
+
+ --help
+ print this help
+
+ --in <input mesh file name>
+ Sets the input file
+ (MANDATORY)
+
+ --out <output mesh file name>
+ Sets the output file
+ (MANDATORY)
+
+ --merge_subdomains <merge>
+ Describes whether to merge the subdomains into one mesh and write the
+ output .mesh(b) file or not.
+ if <merge> is
+ yes : the subdomains will be merged into one mesh and written to
+ the output .mesh(b),
+ no : the subdomains will not be merged.
+ default : no
+
+ --tag_subdomains <tag>
+ Describes whether to use the parallel subdomain index as tag into the
+ merged output mesh or not (used in combination with the
+ merge_subdomains option).
+ if <tag> is
+ yes : the tags of the tetrahedra in the merged output will
+ identify the parallel subdomains,
+ no : the tag will keep its standard meaning of volume domain.
+ default : no
+
+ --output_interfaces <output_interfaces>
+ Describes whether to write the parallel subdomains interface
+ triangles into the merged output mesh or not (used in combination
+ with the merge_subdomains option).
+ if <output_interfaces> is
+ yes : the parallel subdomains interface triangles will be written
+ into the merged output mesh,
+ no : they will not be added to the merged output mesh.
+ default : no
+
+ --verbose <verbose>
+ Set the verbosity level, increasing from 0 to 10.
+ <verbose> values are increasing from 0 to 10 :
+ 0 : no details
+ 10 : very detailed
+ default : 3
+
+ --discard_subdomains <discard>
+ Describes whether to discard the parallel subdomains (mesh, global
+ numbering and interfaces) or not.
+ if <discard> is
+ yes : the subdomain informations (mesh, global numbering and
+ interfaces) will be discarded,
+ no : they will be written to disk as output.
+ default : no
-\endcode
+\endverbatim
\n
</li>
-<li>
-<b>Advanced Tepal_V1.4 Parameters</b> - overriding parameter component of ghs3d (to mesh holes). <p>
-You may rename tepal as tepal.exe for example.
-\code
-#!/bin/bash
-#script tepal overriding parameter component of tetmesh-ghs3d
-#we have renamed binary executable tepal as tepal.exe
-
-#optionnaly we could set licence only for us
-DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
-DLIM8VAR="dlim8 1:1:29030@is142356/0016175ef08c::a1ba1...etc...e19"
-SIMULOGD_LICENSE_FILE=29029@is142356
-
-tepal.exe $* --tetmesh_args "-c 0"
-
-\endcode
-\n
-</li>
+<h1>Saving user's preferred MG-Tetra_HPC Advanced Parameters</h1><br>
+MG-Tetra_HPC plug-in launches standalone binary executable tetrahpc2med.<br>
+You may rename file tetrahpc2med as tetrahpc2med.exe for example, and replace
+tetrahpc2med by a shell script at your convenience to overriding parameters.
+<br>... or else $PATH modification... .<br>
<li>
-<b>Advanced tepal Parameters</b> - overriding launching tepal on other host. <p>
-You may rename tepal as tepal.exe for example.
+<b>Advanced tetrahpc2med Parameters</b> - overriding parameter deletegroups<p>
+You may rename tetrahpc2med as tetrahpc2med.exe for example.
\code
#!/bin/bash
-#script tepal overriding launching tepal on other host (tepal run 64 bits only)
-#we have renamed binary executable tepal as tepal.exe
-#common file system (same path) otherwise scp... on input or result files
-#ssh -keygen -t rsa done and files id_rsa et id-rsa.pub move in ~/.ssh
-
-#example of typical command
-#tepal -f /home/myname/tmp/GHS3DPRL -n 4 > /home/myname/tmp/tepal.log
-#echo parameters $1 $2 $3 $4 ... or $*
-
-#tepal licence ought to be known on otherhost
-ssh otherhost "tepal.exe $* > /home/myname/tmp/tepal.log"
+#script tetrahpc2med overriding parameter deletegroups
+#we have renamed binary executable tetrahpc2med as tetrahpc2med.exe
+#echo tetrahpc2med initial parameters are $1 $2 $3 $4 ... or $*
+#$0 is ignored
-#or more and more
-#ssh otherhost "tepal.exe $* --tetmesh_args \"-c 0\"" > /home/myname/tmp/tepal.log
+tetrahpc2med.exe $* --deletegroups="(\bAll_Nodes|\bAll_Faces)"
\endcode
\n
</li>
-
-<h1>Tepal_V2.0 and MPI use.</h1><br>
-This all new beta-version needs MPI, (openmpi-1.3.1 was used). To use it you have to proceed
-as done in "overriding parameter component of ghs3d".
-Advanced ghs3d Parameters (through Tepal_V1.4's --tetmesh_args) are not assumed yet.
-It meshes holes.
-\n You may rename tepal as tepal64_v2.exe for example, and replace tepal by a shell script like below.
+
+<h1>tetra_hpc and MPI use.</h1><br>
+This 2014 beta-version needs MPI, (openmpi was used). To use it you have to proceed as below.
<li>
-<b>example tepal_v2_mpirun.</b><p>
+<b>Obsolete example tepal_v2_mpirun.</b><p>
\code
#we have renamed binary executable tepal as tepal64_v2.exe.
#typical command to launch tepal v1 :
#tepal -f /tmp/myname/GHS3DPRL -n 16 > /tmp/myname/tepal.log
-#this file is an exemple to transform this call for tepal v2.0,
+#this file is an example to transform this call for tepal v2.0,
# (beta version using .mesh input file)
#you have to adapt for your convenience.
#third problem is convert tepal v2 output files GHS3DPRL*.mesh
# to v1 input files GHS3DPRL*.faces an GHS3DPRL*.points.
-#you have to work on the same physical disk and same path input and ouput files : $SAME_DIR
+#you have to work on the same physical disk and same path input and output files : $SAME_DIR
#you have to work on different physical disk but same path and name for executable files
# (and shared libraries) : $DIFF_DIR
export LD_LIBRARY_PATH=$DIFF_DIR/tepal-2.0.0/bin/Linux_64:${LD_LIBRARY_PATH}
export PATH=$DIFF_DIR/tepal-2.0.0/bin/Linux_64:$PATH
-#small test betweeen friends
+#small test between friends
#rm hostnames.log
#mpirun -n $4 hostname >> hostnames.log
export SIMULOGD_LICENSE_FILE=29029@is142356
export LICENSE_FILE=/product/distene/dlim8.var.sh
-#mpirun with necessary set envenvironment
+#mpirun with necessary set environment
export TMP_ENV="-x PATH -x LD_LIBRARY_PATH -x DISTENE_LICENSE_FILE -x DLIM8VAR \
-x SIMULOGD_LICENSE_FILE -x LICENSE_FILE"
#mpirun $TMPENV -n $4 which tepal64_v2.exe >> hostnames.log
#convert output files tepalv1 format
/through_salome_path/mesh2facespoints.py $IN_FILES
-#copy ouputs files from $SAME_DIR to local current directory (something like /tmp/myname)
+#copy output files from $SAME_DIR to local current directory (something like /tmp/myname)
cp -f hostnames.log $IN_DIR
cp -f $IN_FILES* $IN_DIR
algo2d.SetGeometricMesh(0)
-# 3D mesh with tepal
-# ------------------
+# 3D mesh with tetra-hpc (formerly tepal v3 (2014))
+# ----------------------------------------------------
-algo3d = m.Tetrahedron(smeshBuilder.MG_Tetra_Parallel)
+algo3d = m.Tetrahedron(smeshBuilder.MG_Tetra_HPC)
algo3d.SetMEDName(results)
algo3d.SetNbPart(4)
algo3d.SetBackground(False)
+algo3d.SetMultithread(False)
algo3d.SetKeepFiles(False)
-algo3d.SetToMeshHoles(True)
+algo3d.SetGradation(1.05)
+algo3d.SetMinSize(0)
+algo3d.SetMaxSize(0)
+
# Launch meshers
# --------------
# ----------
if os.access(results+".xml", os.F_OK):
- print "Ok: tepal"
+ print("Ok: tetra_hpc")
else:
- print "KO: tepal"
+ print("KO: tetra_hpc")
\endcode
\n
</li>