Version: 9.15.0
Home
GHS3D_Algorithm Class Reference

Tetrahedron MG-Tetra 3D algorithm. More...

Inheritance diagram for GHS3D_Algorithm:
Inheritance graph

Public Member Functions

def __init__ (self, mesh, geom=0)
 Private constructor. More...
 
def Parameters (self)
 Defines hypothesis having several parameters. More...
 
def SetMinSize (self, theMinSize)
 Set lower boundary of mesh element size Set it to zero to deactivate this option. More...
 
def SetMaxSize (self, theMaxSize)
 Set upper boundary of mesh element size Set it to zero to deactivate this option. More...
 
def SetVolumeProximity (self, toUse)
 Activate/deactivate volume proximity computation. More...
 
def SetNbVolumeProximityLayers (self, nbLayers)
 Set number of surface element layers to be generated due to volume proximity. More...
 
def SetToMeshHoles (self, toMesh)
 To mesh "holes" in a solid or not. More...
 
def SetToMakeGroupsOfDomains (self, toMakeGroups)
 To make groups of volumes of different domains when mesh is generated from skin. More...
 
def SetOptimizationLevel (self, level)
 Set Optimization level: More...
 
def SetMaximumMemory (self, MB)
 Set maximal size of memory to be used by the algorithm (in Megabytes). More...
 
def SetInitialMemory (self, MB)
 Set initial size of memory to be used by the algorithm (in Megabytes) in automatic memory adjustment mode. More...
 
def SetWorkingDirectory (self, path)
 Set path to working directory. More...
 
def SetKeepFiles (self, toKeep)
 To keep working files or remove them. More...
 
def SetRemoveLogOnSuccess (self, toRemove)
 Remove or not the log file (if any) in case of successful computation. More...
 
def SetPrintLogInFile (self, toPrintLogInFile)
 Print the the log in a file. More...
 
def SetVerboseLevel (self, level)
 Set verbosity level [0-10]. More...
 
def SetToCreateNewNodes (self, toCreate)
 To create new nodes. More...
 
def SetToUseBoundaryRecoveryVersion (self, toUse)
 To use boundary recovery version which tries to create mesh on a very poor quality surface mesh. More...
 
def SetFEMCorrection (self, toUseFem)
 Applies finite-element correction by replacing overconstrained elements where it is possible. More...
 
def SetToRemoveCentralPoint (self, toRemove)
 To remove initial central point. More...
 
def SetAlgorithm (self, algoId)
 To set the algorithm id. More...
 
def SetUseNumOfThreads (self, useThreads)
 To use parallel mode. More...
 
def SetNumOfThreads (self, numThreads)
 To set the number of threads to be used. More...
 
def SetPthreadMode (self, pthreadMode)
 Set SetPthreadMode. More...
 
def SetPthreadMode (self, parallelMode)
 Set SetParallelMode. More...
 
def SetEnforcedVertex (self, x, y, z, size, vertexName="", groupName="")
 To set an enforced vertex. More...
 
def SetEnforcedVertexGeom (self, theVertex, size, groupName="")
 To set an enforced vertex given a GEOM vertex, group or compound. More...
 
def RemoveEnforcedVertex (self, x, y, z)
 To remove an enforced vertex. More...
 
def RemoveEnforcedVertexGeom (self, theVertex)
 To remove an enforced vertex given a GEOM vertex, group or compound. More...
 
def SetEnforcedMesh (self, theSource, elementType, size=-1, groupName="")
 To set an enforced mesh with given size and add the enforced elements in the group "groupName". More...
 
def SetOptionValue (self, optionName, optionValue)
 Set advanced option value. More...
 
def SetAdvancedOption (self, optionAndValue)
 Sets command line option as text. More...
 
def SetTextOption (self, option)
 OBSOLETE Sets command line option as text. More...
 

Data Fields

 params
 

Static Public Attributes

string meshMethod = "Tetrahedron"
 name of the dynamic method in smeshBuilder.Mesh class More...
 
 algoType = MG_Tetra
 type of algorithm used with helper function in smeshBuilder.Mesh class More...
 
string docHelper = "Creates tetrahedron 3D algorithm"
 doc string of the method in smeshBuilder.Mesh class More...
 

Detailed Description

Tetrahedron MG-Tetra 3D algorithm.

It can be created by calling smeshBuilder.Mesh.Tetrahedron( smeshBuilder.MG_Tetra, geom=0 )

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  mesh,
  geom = 0 
)

Private constructor.

Parameters
meshparent mesh object algorithm is assigned to
geomgeometry (shape/sub-shape) algorithm is assigned to; if it is 0 (default), the algorithm is assigned to the main shape

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.algoType, GHS3D_Optimizer.algoType, and Mesh_Algorithm.Create().

Member Function Documentation

◆ Parameters()

def Parameters (   self)

Defines hypothesis having several parameters.

Returns
hypothesis object

Reimplemented in GHS3D_Optimizer.

References Mesh_Algorithm.Hypothesis(), GHS3D_Algorithm.params, and GHS3D_Optimizer.params.

◆ SetMinSize()

def SetMinSize (   self,
  theMinSize 
)

Set lower boundary of mesh element size Set it to zero to deactivate this option.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetMaxSize()

def SetMaxSize (   self,
  theMaxSize 
)

Set upper boundary of mesh element size Set it to zero to deactivate this option.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetVolumeProximity()

def SetVolumeProximity (   self,
  toUse 
)

Activate/deactivate volume proximity computation.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetNbVolumeProximityLayers()

def SetNbVolumeProximityLayers (   self,
  nbLayers 
)

Set number of surface element layers to be generated due to volume proximity.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetToMeshHoles()

def SetToMeshHoles (   self,
  toMesh 
)

To mesh "holes" in a solid or not.

Default is to mesh.

Parameters
toMesh"mesh holes" flag value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetToMakeGroupsOfDomains()

def SetToMakeGroupsOfDomains (   self,
  toMakeGroups 
)

To make groups of volumes of different domains when mesh is generated from skin.

Default is to make groups. This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true

Parameters
toMakeGroups"Make groups of domains" flag value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetOptimizationLevel()

def SetOptimizationLevel (   self,
  level 
)

Set Optimization level:

Parameters
leveloptimization level, one of the following values
  • None_Optimization
  • Light_Optimization
  • Standard_Optimization
  • StandardPlus_Optimization
  • Strong_Optimization.

Default is Standard_Optimization

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetMaximumMemory()

def SetMaximumMemory (   self,
  MB 
)

Set maximal size of memory to be used by the algorithm (in Megabytes).

Parameters
MBmaximal size of memory

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetInitialMemory()

def SetInitialMemory (   self,
  MB 
)

Set initial size of memory to be used by the algorithm (in Megabytes) in automatic memory adjustment mode.

Parameters
MBinitial size of memory

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetWorkingDirectory()

def SetWorkingDirectory (   self,
  path 
)

Set path to working directory.

Parameters
pathworking directory

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetKeepFiles()

def SetKeepFiles (   self,
  toKeep 
)

To keep working files or remove them.

Parameters
toKeep"keep working files" flag value

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetRemoveLogOnSuccess()

def SetRemoveLogOnSuccess (   self,
  toRemove 
)

Remove or not the log file (if any) in case of successful computation.

The log file remains in case of errors anyway. If the "keep working files" flag is set to true, this option has no effect.

Parameters
toRemove"remove log on success" flag value

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetPrintLogInFile()

def SetPrintLogInFile (   self,
  toPrintLogInFile 
)

Print the the log in a file.

If set to false, the log is printed on the standard output

Parameters
toPrintLogInFile"print log in a file" flag value

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetVerboseLevel()

def SetVerboseLevel (   self,
  level 
)

Set verbosity level [0-10].

Parameters
levelverbosity level
  • 0 - no standard output,
  • 2 - prints the data, quality statistics of the skin and final meshes and indicates when the final mesh is being saved. In addition the software gives indication regarding the CPU time.
  • 10 - same as 2 plus the main steps in the computation, quality statistics histogram of the skin mesh, quality statistics histogram together with the characteristics of the final mesh.

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetToCreateNewNodes()

def SetToCreateNewNodes (   self,
  toCreate 
)

To create new nodes.

Parameters
toCreate"create new nodes" flag value

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetToUseBoundaryRecoveryVersion()

def SetToUseBoundaryRecoveryVersion (   self,
  toUse 
)

To use boundary recovery version which tries to create mesh on a very poor quality surface mesh.

Parameters
toUse"use boundary recovery version" flag value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetFEMCorrection()

def SetFEMCorrection (   self,
  toUseFem 
)

Applies finite-element correction by replacing overconstrained elements where it is possible.

The process is cutting first the overconstrained edges and second the overconstrained facets. This insure that no edges have two boundary vertices and that no facets have three boundary vertices.

Parameters
toUseFem"apply finite-element correction" flag value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetToRemoveCentralPoint()

def SetToRemoveCentralPoint (   self,
  toRemove 
)

To remove initial central point.

Parameters
toRemove"remove initial central point" flag value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetAlgorithm()

def SetAlgorithm (   self,
  algoId 
)

To set the algorithm id.

Parameters
algorithmID 0 MGTetra HPC - 1 MGTetra

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetUseNumOfThreads()

def SetUseNumOfThreads (   self,
  useThreads 
)

To use parallel mode.

Parameters
toUseNumOfThreads"use max number of threads" flag value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetNumOfThreads()

def SetNumOfThreads (   self,
  numThreads 
)

To set the number of threads to be used.

Parameters
numberOfThreadsdefine max_num_threads for MGTetra and MGTetra HPC

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetPthreadMode() [1/2]

def SetPthreadMode (   self,
  pthreadMode 
)

Set SetPthreadMode.

Parameters
pthreadModefor parallel algorithm in MGTetra
  • 0 - none
  • 1 - aggresive
  • 2 - safe

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetPthreadMode() [2/2]

def SetPthreadMode (   self,
  parallelMode 
)

Set SetParallelMode.

Parameters
parallelModefor parallel algorithm in MGTetra HPC
  • 0 - none
  • 1 - reproducible_given_max_number_of_threads
  • 2 - reproducible
  • 3 - aggressive

References GHS3D_Algorithm.Parameters(), GHS3D_Optimizer.Parameters(), and GHS3D_Algorithm.SetPthreadMode().

◆ SetEnforcedVertex()

def SetEnforcedVertex (   self,
  x,
  y,
  z,
  size,
  vertexName = "",
  groupName = "" 
)

To set an enforced vertex.

Parameters
x: x coordinate
y: y coordinate
z: z coordinate
size: size of 1D element around enforced vertex
vertexName: name of the enforced vertex
groupName: name of the group

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetEnforcedVertexGeom()

def SetEnforcedVertexGeom (   self,
  theVertex,
  size,
  groupName = "" 
)

To set an enforced vertex given a GEOM vertex, group or compound.

Parameters
theVertex: GEOM vertex (or group, compound) to be projected on theFace.
size: size of 1D element around enforced vertex
groupName: name of the group

References Mesh_Algorithm.mesh, GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ RemoveEnforcedVertex()

def RemoveEnforcedVertex (   self,
  x,
  y,
  z 
)

To remove an enforced vertex.

Parameters
x: x coordinate
y: y coordinate
z: z coordinate

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ RemoveEnforcedVertexGeom()

def RemoveEnforcedVertexGeom (   self,
  theVertex 
)

To remove an enforced vertex given a GEOM vertex, group or compound.

Parameters
theVertex: GEOM vertex (or group, compound) to be projected on theFace.

References Mesh_Algorithm.mesh, GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetEnforcedMesh()

def SetEnforcedMesh (   self,
  theSource,
  elementType,
  size = -1,
  groupName = "" 
)

To set an enforced mesh with given size and add the enforced elements in the group "groupName".

Parameters
theSource: source mesh which provides constraint elements/nodes
elementType: SMESH.ElementType (NODE, EDGE or FACE)
size: size of elements around enforced elements. Unused if -1.
groupName: group in which enforced elements will be added. Unused if "".

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetOptionValue()

def SetOptionValue (   self,
  optionName,
  optionValue 
)

Set advanced option value.

Parameters
optionNameoption name
optionValueoption value

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetAdvancedOption()

def SetAdvancedOption (   self,
  optionAndValue 
)

Sets command line option as text.

Parameters
optionAndValuecommand line option in a form "option value"

Reimplemented in GHS3D_Optimizer.

References GHS3D_Algorithm.Parameters(), and GHS3D_Optimizer.Parameters().

◆ SetTextOption()

def SetTextOption (   self,
  option 
)

OBSOLETE Sets command line option as text.

Parameters
optioncommand line option

References GHS3D_Algorithm.Parameters(), GHS3D_Optimizer.Parameters(), and GHS3D_Algorithm.SetAdvancedOption().

Field Documentation

◆ meshMethod

string meshMethod = "Tetrahedron"
static

name of the dynamic method in smeshBuilder.Mesh class

◆ algoType

algoType = MG_Tetra
static

type of algorithm used with helper function in smeshBuilder.Mesh class

◆ docHelper

string docHelper = "Creates tetrahedron 3D algorithm"
static

doc string of the method in smeshBuilder.Mesh class

◆ params

params