From be494e6140d9ecebbd41a08fd707f61a3301e514 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 29 Feb 2016 15:12:59 +0300 Subject: [PATCH] 23245: [CEA 1696] Patch for HYBRIDPLUGIN HYBRIDPLUGIN uses an old version of MG-Hybrid. This patch modifies the script to use the last version available in the prerequisite base. Since the parameters are quite different between the two versions, I also updated the hybridplugin documentation. --- bin/mg-hybrid.bash | 32 +--- .../gui/HYBRIDPLUGIN/input/hybrid_hypo.doc | 170 +++++++++++------- doc/salome/gui/HYBRIDPLUGIN/input/index.doc | 3 +- src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx | 32 ++-- 4 files changed, 131 insertions(+), 106 deletions(-) diff --git a/bin/mg-hybrid.bash b/bin/mg-hybrid.bash index 0094743..5ade126 100755 --- a/bin/mg-hybrid.bash +++ b/bin/mg-hybrid.bash @@ -31,42 +31,16 @@ resFindOutFile="None" echo "mg-hybrid.bash initial parameters are:" $* #$0 is ignored -if [[ $HOSTNAME == *hpcspot* ]] - then - HOST="hpcspot" - else - HOST="STANDART_CentOs6" #CentOs6 default -fi -echo "HOST" $HOST - -#we need to licence for mg-hybrid.exe -#for example, have to be set -#if [ $HOST == "hpcspot" ] -# then -# #env openmpi centos6.5 hpcspot.com -# export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR" -# export DLIM8VAR="dlim8 1:1:29030@10.27.51.1/002590c96d98::8fbdc02cde090ca0369ad028e839065b97709e3c33e640eb6a3c2c7e40fe3985" -# else -# export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR" -# export DLIM8VAR="dlim8 1:1:29030@132.166.151.49/84c419b8::87af196ab2a936ab31363624539bff8096fbe1f3c83028c8f6b399b0a904ef85" -#fi - echo "mg-hybrid.bash assume licence file set:" env | grep DLIM findOutFile $* echo "result output File is:" $resFindOutFile -#mg-hybrid.exe_Linux_64_avril2014 --help -#mg-hybrid.exe_Linux_64_avril2014 $* -mg-hybrid.exe_Linux_64_juillet2014 $* +$MESHGEMS_ROOT_DIR/bin/run_mg-hybrid.sh $* + +#$MESHGEMS_ROOT_DIR/bin/Linux_64/mg-hybrid.exe $* #to EZ and direct debug visualization (with gui salome load script createGroupsOnEntitiesFromGMFFile.py) cp -f $resFindOutFile /tmp/tmp.mesh -#ldd `which mg-hybrid.exe_Linux_64_avril2014` -# linux-vdso.so.1 => (0x00007fff3bfff000) -# libpthread.so.0 => /lib64/libpthread.so.0 (0x000000358b400000) -# libm.so.6 => /lib64/libm.so.6 (0x000000358a800000) -# libc.so.6 => /lib64/libc.so.6 (0x000000358ac00000) -# /lib64/ld-linux-x86-64.so.2 (0x000000358a400000) diff --git a/doc/salome/gui/HYBRIDPLUGIN/input/hybrid_hypo.doc b/doc/salome/gui/HYBRIDPLUGIN/input/hybrid_hypo.doc index bc7937b..c9995cc 100644 --- a/doc/salome/gui/HYBRIDPLUGIN/input/hybrid_hypo.doc +++ b/doc/salome/gui/HYBRIDPLUGIN/input/hybrid_hypo.doc @@ -14,16 +14,16 @@ To get a licence, visit http://www.distene.com and http://www.meshgems.com/ \image html hybrid_hypothesis_arguments.png -- hybrid parameters - MeshGems-Hybrid is actually a project, waiting for a distene documentation. -See MeshGems-Hybrid help command: +- Hybrid parameters - See distene documentation or MeshGems-Hybrid help command: \verbatim -$> mg-hybrid.exe_Linux_64_juillet2014 --help +$> mg-hybrid.exe --help - ============================================= - MG-Hybrid (b8) -- MeshGems 1.3-5 (July, 2014) - ============================================= + + ============================================== + MG-Hybrid -- MeshGems 2.1-11 (September, 2015) + ============================================== Distene SAS Campus Teratec @@ -33,28 +33,32 @@ $> mg-hybrid.exe_Linux_64_juillet2014 --help Phone: +33(0)970-650-219 Fax: +33(0)169-269-033 EMail: - Running MG-Hybrid (b8) (Copyright 2014 by Distene SAS) - date of run: 10-Jul-2014 AT 13:46:28 - running on : Linux 2.6.32-431.11.2.el6.centos.plus.x86_64 x86_64 + Running MG-Hybrid (Copyright 2014-2015 by Distene SAS) + date of run: 26-Jan-2016 AT 12:24:16 + running on : Linux 3.6.10-4.fc18.x86_64 x86_64 using modules: - MeshGems-Core 1.3-4 + MeshGems-Core 2.1-11 MeshGems is a Registered Trademark of Distene SAS -MeshGems-Hybrid USAGE - mg-hybrid.exe_Linux_64_juillet2014 [-h] [-v ] [-i ] \ - [-o ] [--max_number_of_threads ] \ - [--boundary_layers_surface_ids ] \ - [--boundary_layers_imprint_ids ] \ - [--boundary_layers_subdomain_direction ] \ - [--height_of_the_first_layer ] \ +MG-HYBRID USAGE + mg-hybrid.exe [-h] [-v ] [-i ] [-o ] \ + [--global_physical_size ] \ + [--max_number_of_threads ] \ + [--boundary_layer_size_mode ] \ [--number_of_boundary_layers ] \ - [--boundary_layers_geometric_progression ] [--gradation ] \ + [--boundary_layer_global_initial_height ] \ + [--boundary_layer_surface_tags ] \ + [--boundary_layer_initial_height_on_surface_tags ] \ + [--boundary_layer_imprint_tags ] \ + [--boundary_layer_geometric_progression ] \ + [--boundary_layer_max_element_angle ] \ + [--normal_direction ] [--gradation ] \ [--element_generation ] [--collision_mode ] \ - [--add_multinormals ] \ - [--multinormals_angle_threshold ] [--smooth_normals ] + [--add_multinormals ] [--multinormal_angle_threshold ] \ + [--smooth_normals ] [--optimisation ] -h --help prints this help. @@ -76,84 +80,126 @@ MeshGems-Hybrid USAGE Using an existing file is forbidden. Using the same file as --in is forbidden. + --global_physical_size + Sets the global physical size. + Default: no default. + --max_number_of_threads Sets the maximum number of threads to be used in parallel. Default: 4 - --boundary_layers_surface_ids - Comma separated list of surface references to be used to grow layer. + --boundary_layer_size_mode + Sets the behavior for the boundary layer sizes. + If is: + global: the boundary_layer_global_initial_height is used to compute + the layer heights + local: the boundary_layer_surface_tags and + boundary_layer_initial_height_on_surface_tags are used to compute + the layer heights + Default: global + + --number_of_boundary_layers + Sets the number of boundary layers. + Default: 0 + + --boundary_layer_global_initial_height + Sets the height of the first layer. + + --boundary_layer_surface_tags + Comma separated list of surface references to be used to grow + boundary layers. + + --boundary_layer_initial_height_on_surface_tags + Comma separated list of initial heights to be used to grow boundary + layers. - --boundary_layers_imprint_ids + --boundary_layer_imprint_tags Comma separated list of surface references that are imprinted by boundary layers. - --boundary_layers_subdomain_direction - Describes whether the layers grow inwards or outwards. - if is: - 1 : means the layers grow inward - -1 : means the layers grow outward - Default: 1 + --boundary_layer_geometric_progression + Sets the geometric progression for all the boundary layer growths + (position of layer number i is h * g^(i-1)). + Default: 1.0 - --height_of_the_first_layer - Sets the height of the first layer. + --boundary_layer_max_element_angle + Sets the maximum internal angles of elements (in degree). This + setting applies to the boundary layer elements only. + Default: 165. - --number_of_boundary_layers - Sets the number of boundary layers. + --normal_direction + Specifies whether mg-hybrid should use the surface normals or the + inverse of the surface normals. + if is: + 1 : means the layers grow in the same direction as the normals to + the surface + -1 : means the layers grow in the opposite direction to the normals + of the surface Default: 1 - --boundary_layers_geometric_progression - Sets the geometric progression for the boundary layer growth (layer - number i position is i * h * g^i). - Default: 1.0 - --gradation - Sets the gradation for the boundary layer height. + Sets the desired maximum ratio between 2 adjacent edges. It applies + only to the edges which belong to the tetrahedra. Default: 2.0 --element_generation Sets the element type for the mesh generation. If is: - tetra-dominant : prismatic or hexahedral elements in the boundary - layers, tetrahedra in the remaining volume - hexa-dominant : prismatic or hexahedral elements in the boundary - layers, hexcore in the remaining volume - Default: tetra-dominant + tetra_dominant : prismatic or hexahedral elements in the boundary + layers, tetrahedra in the remaining volume + hexa_dominant : prismatic or hexahedral elements in the boundary + layers, mixture of hexahedra and tetrahedra in the remaining + volume + cartesian_core : cartesian hexa core with tetrahedra and pyramids + in the remaining volume + extrusion_only : only prismatic or hexahedral elements near the + boundary are generated. The remaining volume is not filled. + Default: tetra_dominant --collision_mode Sets the behavior in case of collision between layers. If is: - decrease : keep the number of desired layer but decrease the height - of the layers to avoid collision - stop : stop locally the layers generation; the number of desired - layer may not be respected - Default: skip + decrease : keeps the number of desired layer but decreases the + height of the layers to avoid any collision + stop : stops locally the generation of layers to avoid collisions; + the number of generated layers may differ from the specified + desired number + Default: stop --add_multinormals Add extra normals at opening ridges and corners. Default: no - --multinormals_angle_threshold - Set the maximum angle between the multiple normals at opening ridges - . + --multinormal_angle_threshold + Set the maximum angle between the multiple normals at opening ridges. Default: 30 --smooth_normals Smooth normals at closed ridges and corners. Default: no - - ============================================================================== - MeshGems-Hybrid SOFTWARE 1.3-5 (July, 2014) - compiled Jul 4 2014 14:33:45 GMT - END OF SESSION - Copyright 2014 by Distene SAS All Rights Reserved - ============================================================================== - ( Distene SAS - Phone: +33(0)164-908-596 Fax: +33(0)169-269-033 - EMail: ) + --optimisation + sets the optimisation type. + If is: + no : no optimisation is applied + yes : optimisation is performed upon mesh generation + only : only optimisation is performed to an existing volume mesh. + Default: yes. + + +================================================================================ + MG-Hybrid -- MeshGems 2.1-11 (September, 2015) + END OF SESSION - MG-Hybrid (Copyright 2014-2015 by Distene SAS) + compiled Sep 3 2015 13:52:38 on Linux_64 + MeshGems is a Registered Trademark of Distene SAS +================================================================================ + ( Distene SAS + Phone: +33(0)970-650-219 Fax: +33(0)169-269-033 + EMail: ) \endverbatim \n +- Limitations - Some of the MG-Hybrid parameters can not be changed in SALOME and are set to their default values. The parameters concerned are the following : global_physical_size, boundary_layer_size_mode, boundary_layer_initial_height_on_surface_tags, boundary_layer_max_element_angle and optimisation. \ref hybrid_top "Back to top" diff --git a/doc/salome/gui/HYBRIDPLUGIN/input/index.doc b/doc/salome/gui/HYBRIDPLUGIN/input/index.doc index 3a81751..9096b1f 100644 --- a/doc/salome/gui/HYBRIDPLUGIN/input/index.doc +++ b/doc/salome/gui/HYBRIDPLUGIN/input/index.doc @@ -8,8 +8,7 @@ pyramids, prisms and hexahedra elements. - Generating 3D meshes from 2D meshes of a wrap (triangles and quadrangles), working with geometrical objects for setting and meshing layers. -\note HYBRIDPLUGIN plugin used MeshGems-Hybrid commercial mesher, -which is a project in 2014, and require a +\note HYBRIDPLUGIN plugin used MeshGems-Hybrid commercial mesher and require a license to be used within the Mesh module. To manage parameters of the HYBRIDPLUGIN use \subpage hybrid_hypo_page and \subpage additional_hypo_page diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx index 7d70c42..ae88435 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx @@ -1768,18 +1768,24 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* //bool p_i = ( hyp->myTextOption.find("-i") != std::string::npos ); //bool p_o = ( hyp->myTextOption.find("-o") != std::string::npos ); bool p_mnot = ( hyp->myTextOption.find("--max_number_of_threads ") != std::string::npos ); - bool p_blsi = ( hyp->myTextOption.find("--boundary_layers_surface_ids ") != std::string::npos ); - bool p_blii = ( hyp->myTextOption.find("--boundary_layers_imprint_ids ") != std::string::npos ); - bool p_blsd = ( hyp->myTextOption.find("--boundary_layers_subdomain_direction ") != std::string::npos ); - bool p_hotfl = ( hyp->myTextOption.find("--height_of_the_first_layer ") != std::string::npos ); + bool p_blsi = ( hyp->myTextOption.find("--boundary_layer_surface_tags ") != std::string::npos ); + bool p_blii = ( hyp->myTextOption.find("--boundary_layer_imprint_tags ") != std::string::npos ); + bool p_blsd = ( hyp->myTextOption.find("--normal_direction ") != std::string::npos ); + bool p_hotfl = ( hyp->myTextOption.find("--boundary_layer_global_initial_height ") != std::string::npos ); bool p_nobl = ( hyp->myTextOption.find("--number_of_boundary_layers ") != std::string::npos ); - bool p_blgp = ( hyp->myTextOption.find("--boundary_layers_geometric_progression ") != std::string::npos ); + bool p_blgp = ( hyp->myTextOption.find("--boundary_layer_geometric_progression ") != std::string::npos ); bool p_eg = ( hyp->myTextOption.find("--element_generation ") != std::string::npos ); bool p_cm = ( hyp->myTextOption.find("--collision_mode ") != std::string::npos ); bool p_am = ( hyp->myTextOption.find("--add_multinormals ") != std::string::npos ); - bool p_mat = ( hyp->myTextOption.find("--multinormals_angle_threshold ") != std::string::npos ); + bool p_mat = ( hyp->myTextOption.find("--multinormal_angle_threshold ") != std::string::npos ); bool p_sn = ( hyp->myTextOption.find("--smooth_normals ") != std::string::npos ); +//missing options : +//- global_physical_size +//- boundary_layer_size_mode +//- boundary_layer_initial_height_on_surface_tags +//- boundary_layer_max_element_angle + bool nolayers = false; bool layersOnAllWrap = hyp->myLayersOnAllWrap; @@ -1824,13 +1830,13 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* if ( !p_blsd && hyp ) { if ( hyp->myBoundaryLayersGrowth >= 0 && hyp->myBoundaryLayersGrowth <= 1 ) { const char* value[] = { "1" , "-1" }; - cmd += " --boundary_layers_subdomain_direction "; + cmd += " --normal_direction "; cmd += value[ hyp->myBoundaryLayersGrowth ]; } } if ( !p_hotfl && hyp ) { - cmd += " --height_of_the_first_layer "; + cmd += " --boundary_layer_global_initial_height "; cmd += hyp->myHeightFirstLayer; } @@ -1843,7 +1849,7 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* } if ( !p_blgp && hyp ) { - cmd += " --boundary_layers_geometric_progression "; + cmd += " --boundary_layer_geometric_progression "; cmd += hyp->myBoundaryLayersProgression; } @@ -1852,9 +1858,9 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* //TODO? if ( !nolayers ) cmd += " --boundary_layers_surface_ids 5,6 "; //as all wrap shell and triangles of enforced mesh if ( !nolayers ) { if (layersOnAllWrap) - cmd += " --boundary_layers_surface_ids 5 "; //as triangles of all wrap + cmd += " --boundary_layer_surface_tags 5 "; //as triangles of all wrap else - cmd += " --boundary_layers_surface_ids 6 "; //as triangles of enforced mesh + cmd += " --boundary_layer_surface_tags 6 "; //as triangles of enforced mesh } if ( !p_eg && hyp ) { @@ -1881,7 +1887,7 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* } if ( !p_mat && hyp ) { - cmd += " --multinormals_angle_threshold "; + cmd += " --multinormal_angle_threshold "; cmd += hyp->myMultinormalsAngle; } @@ -1933,7 +1939,7 @@ std::string HYBRIDPlugin_Hypothesis::GetFileName(const HYBRIDPlugin_Hypothesis* std::string HYBRIDPlugin_Hypothesis::GetExeName() { - //call mg-hybrid.bash is script which assumes new project version(s) mg-hybrid.exe_Linux_64_avril2014 and special? licence. + //call mg-hybrid.bash is script which assumes new project version(s) mg-hybrid.exe in the prerequisite base and special? licence. return "mg-hybrid.bash"; } -- 2.39.2