X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGHS3DPRLPlugin%2FGHS3DPRLPluginBuilder.py;h=b6ab314fd248b81e5afcb2fba5076d5b46f7fc95;hb=0ab6a3e0b79a17ae0777497eea855925d5b1464b;hp=448e626a60c47a251ae87d75c3d42caf22087679;hpb=c367a365c155ca64fc97c643de586cad60eab4fb;p=plugins%2Fghs3dprlplugin.git diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py b/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py index 448e626..b6ab314 100644 --- a/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py +++ b/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D +# Copyright (C) 2007-2020 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -19,7 +19,7 @@ ## # @package GHS3DPRLPluginBuilder -# Python API for the MG-Tetra Parallel meshing plug-in module. +# Python API for the MG-Tetra_HPC meshing plug-in module. from salome.smesh.smesh_algorithm import Mesh_Algorithm from salome.smesh.smeshBuilder import AssureGeomPublished @@ -32,7 +32,7 @@ except ImportError: noGHS3DPRLPlugin = 1 pass -# Optimization level of MG-Tetra Parallel +# Optimization level of MG-Tetra_HPC # V3.1 None_Optimization, Light_Optimization, Medium_Optimization, Strong_Optimization = 0,1,2,3 # V4.1 (partialy redefines V3.1). Issue 0020574 @@ -42,17 +42,18 @@ None_Optimization, Light_Optimization, Standard_Optimization, StandardPlus_Optim # Mesh algo type identifiers #---------------------------- -## Algorithm type: MG-Tetra Parallel tetrahedron 3D algorithm, see GHS3DPRL_Algorithm -MG_Tetra_Parallel = "MG-Tetra Parallel" -GHS3DPRL = MG_Tetra_Parallel +## Algorithm type: MG-Tetra_HPC tetrahedron 3D algorithm, see GHS3DPRL_Algorithm +MG_Tetra_HPC = "MG-Tetra Parallel" +MG_Tetra_Parallel = MG_Tetra_HPC +GHS3DPRL = MG_Tetra_HPC #---------------------------- # Algorithms #---------------------------- -## Tetrahedron MG-Tetra Parallel 3D algorithm +## Tetrahedron MG-Tetra_HPC 3D algorithm # -# It can be created by calling smeshBuilder.Mesh.Tetrahedron( smeshBuilder.MG_Tetra_Parallel ) +# It can be created by calling smeshBuilder.Mesh.Tetrahedron( smeshBuilder.MG_Tetra_HPC ) class GHS3DPRL_Algorithm(Mesh_Algorithm): ## name of the dynamic method in smeshBuilder.Mesh class @@ -60,7 +61,7 @@ class GHS3DPRL_Algorithm(Mesh_Algorithm): meshMethod = "Tetrahedron" ## type of algorithm used with helper function in smeshBuilder.Mesh class # @internal - algoType = MG_Tetra_Parallel + algoType = MG_Tetra_HPC ## doc string of the method in smeshBuilder.Mesh class # @internal docHelper = "Creates tetrahedron 3D algorithm for volumes" @@ -71,7 +72,7 @@ class GHS3DPRL_Algorithm(Mesh_Algorithm): # if it is @c 0 (default), the algorithm is assigned to the main shape def __init__(self, mesh, geom=0): Mesh_Algorithm.__init__(self) - if noGHS3DPRLPlugin: print "Warning: GHS3DPRLPlugin module unavailable" + if noGHS3DPRLPlugin: print("Warning: GHS3DPRLPlugin module unavailable") self.Create(mesh, geom, self.algoType, "libGHS3DPRLEngine.so") self.params = None pass @@ -103,40 +104,46 @@ class GHS3DPRL_Algorithm(Mesh_Algorithm): self.Parameters().SetNbPart(value) pass - ## When big mesh, start tepal in background + ## When big mesh, start tetra_hpc in background # @param value "background mode" flag value def SetBackground(self, value): self.Parameters().SetBackground(value) pass + ## use multithread version + # @param value "multithread mode" flag value + def SetMultithread(self, value): + self.Parameters().SetMultithread(value) + pass + ## To mesh "holes" in a solid or not. Default is to mesh. # @param toMesh "mesh holes" flag value #def SetToMeshHoles(self, toMesh): # self.Parameters().SetToMeshHoles(toMesh) # pass - ## To Merge Subdomains. Default is to no. - # @param toMesh "MergeSubdomains" flag value - def SetToMergeSubdomains(self, toMesh): - self.Parameters().SetToMergeSubdomains(toMesh) + ## Sets the neigbour cell gradation of the initial mesh + # @param value number of partition value + def SetGradation(self, value): + self.Parameters().SetGradation(value) pass - - ## To Tag Subdomains. Default is to no. - # @param toMesh "TagSubdomains" flag value - def SetToTagSubdomains(self, toMesh): - self.Parameters().SetToTagSubdomains(toMesh) + + ## Sets the cell min size of the initial mesh + # @param value number of partition value + def SetMinSize(self, value): + self.Parameters().SetMinSize(value) pass - - ## To Output Interfaces. Default is to no. - # @param toMesh "OutputInterfaces" flag value - def SetToOutputInterfaces(self, toMesh): - self.Parameters().SetToOutputInterfaces(toMesh) + + ## Sets the cell max size of the initial mesh + # @param value number of partition value + def SetMaxSize(self, value): + self.Parameters().SetMaxSize(value) pass - ## To Discard Subdomains. Default is to no. - # @param toMesh "DiscardSubdomains" flag value - def SetToDiscardSubdomains(self, toMesh): - self.Parameters().SetToDiscardSubdomains(toMesh) + ## Sets command line option as text. + # @param option command line option + def SetAdvancedOption(self, option): + self.Parameters().SetAdvancedOption(option) pass - + pass # end of GHS3DPRL_Algorithm class