Version: 9.12.0
Home
HYBRID_Algorithm Class Reference

MG-Hybrid 3D algorithm. More...

Inheritance diagram for HYBRID_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 SetLayersOnAllWrap (self, toMesh)
 To mesh layers on all wrap. More...
 
def SetFacesWithLayers (self, faceIDs)
 To mesh layers on given faces. More...
 
def SetFacesWithImprinting (self, faceIDs)
 To imprint the layers on given faces. More...
 
def SetFacesWithSnapping (self, faceIDs)
 To snap the layers on given surface (use existing surface layers as base for volume layers). More...
 
def SetCollisionMode (self, mode)
 Set Collision Mode: More...
 
def SetBoundaryLayersGrowth (self, mode)
 To mesh Boundary Layers growing inward or outward. More...
 
def SetElementGeneration (self, mode)
 To mesh with element type Tetra Dominant or hexa Dominant in the remaining volume (outside layers). More...
 
def SetAddMultinormals (self, addMultinormals)
 To mesh adding extra normals at opening ridges and corners. More...
 
def SetSmoothNormals (self, smoothNormals)
 To mesh smoothing normals at closed ridges and corners. More...
 
def SetHeightFirstLayer (self, heightFirstLayer)
 To set height of the first layer. More...
 
def SetHeightIsRelative (self, isRelative)
 Sizes of boundary layers are relative to the surface size. More...
 
def SetBoundaryLayersProgression (self, boundaryLayersProgression)
 To set boundary layers coefficient of geometric progression. More...
 
def SetCoreSize (self, CoreSize)
 Set core elements size. More...
 
def SetMultinormalsAngle (self, multinormalsAngle)
 To set multinormals angle threshold at opening ridges. More...
 
def SetNbOfBoundaryLayers (self, nbOfBoundaryLayers)
 To set number of boundary layers. More...
 
def SetBoundaryLayersMaxElemAngle (self, angle)
 Set maximum internal angles of boundary elements (in degree) 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 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)
 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_Hybrid
 type of algorithm used with helper function in smeshBuilder.Mesh class More...
 
string docHelper = "Creates tetrahedron 3D algorithm for volumes"
 doc string of the method in smeshBuilder.Mesh class More...
 

Detailed Description

MG-Hybrid 3D algorithm.

It can be created by calling smeshBuilder.Mesh.Tetrahedron( smeshBuilder.HYBRID, 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

References HYBRID_Algorithm.algoType, and Mesh_Algorithm.Create().

Member Function Documentation

◆ Parameters()

def Parameters (   self)

Defines hypothesis having several parameters.

Returns
hypothesis object

References Mesh_Algorithm.Hypothesis(), and HYBRID_Algorithm.params.

◆ SetLayersOnAllWrap()

def SetLayersOnAllWrap (   self,
  toMesh 
)

To mesh layers on all wrap.

Default is to mesh.

Parameters
toMesh"mesh layers on all wrap" flag value

References HYBRID_Algorithm.Parameters().

◆ SetFacesWithLayers()

def SetFacesWithLayers (   self,
  faceIDs 
)

To mesh layers on given faces.

Parameters
faceIDsfaces or face IDs to construct boundary layers on

References Mesh_Algorithm.mesh, HYBRID_Algorithm.Parameters(), and HYBRID_Algorithm.SetLayersOnAllWrap().

◆ SetFacesWithImprinting()

def SetFacesWithImprinting (   self,
  faceIDs 
)

To imprint the layers on given faces.

Parameters
faceIDsfaces or face IDs to imprint the boundary layers on

References Mesh_Algorithm.mesh, HYBRID_Algorithm.Parameters(), and HYBRID_Algorithm.SetLayersOnAllWrap().

◆ SetFacesWithSnapping()

def SetFacesWithSnapping (   self,
  faceIDs 
)

To snap the layers on given surface (use existing surface layers as base for volume layers).

Parameters
faceIDsfaces or face IDs that already have surface layers

References Mesh_Algorithm.mesh, HYBRID_Algorithm.Parameters(), and HYBRID_Algorithm.SetLayersOnAllWrap().

◆ SetCollisionMode()

def SetCollisionMode (   self,
  mode 
)

Set Collision Mode:

Parameters
modeCollision Mode, one of the following values
  • Decrease_Collision_Mode
  • Stop_Collision_Mode

Default is Decrease_Collision_Mode

References HYBRID_Algorithm.Parameters().

◆ SetBoundaryLayersGrowth()

def SetBoundaryLayersGrowth (   self,
  mode 
)

To mesh Boundary Layers growing inward or outward.

Parameters
mode,oneof the following values
  • Layer_Growth_Inward
  • Layer_Growth_Outward

Default is Layer_Growth_Inward

References HYBRID_Algorithm.Parameters().

◆ SetElementGeneration()

def SetElementGeneration (   self,
  mode 
)

To mesh with element type Tetra Dominant or hexa Dominant in the remaining volume (outside layers).

Parameters
mode,oneof the following values
  • Generation_Tetra_Dominant
  • Generation_Hexa_Dominant
  • Generation_Cartesian_Core

Default is Generation_Tetra_Dominant

References HYBRID_Algorithm.Parameters().

◆ SetAddMultinormals()

def SetAddMultinormals (   self,
  addMultinormals 
)

To mesh adding extra normals at opening ridges and corners.

Default is no.

Parameters
addMultinormalsboolean value

References HYBRID_Algorithm.Parameters().

◆ SetSmoothNormals()

def SetSmoothNormals (   self,
  smoothNormals 
)

To mesh smoothing normals at closed ridges and corners.

Default is no.

Parameters
smoothNormalsboolean value

References HYBRID_Algorithm.Parameters().

◆ SetHeightFirstLayer()

def SetHeightFirstLayer (   self,
  heightFirstLayer 
)

To set height of the first layer.

Default is 0.0

Parameters
heightFirstLayerdouble value

References HYBRID_Algorithm.Parameters().

◆ SetHeightIsRelative()

def SetHeightIsRelative (   self,
  isRelative 
)

Sizes of boundary layers are relative to the surface size.

Default no

Parameters
isRelativeboolean flag

References HYBRID_Algorithm.Parameters().

◆ SetBoundaryLayersProgression()

def SetBoundaryLayersProgression (   self,
  boundaryLayersProgression 
)

To set boundary layers coefficient of geometric progression.

Default is 1.0

Parameters
boundaryLayersProgressiondouble value

References HYBRID_Algorithm.Parameters().

◆ SetCoreSize()

def SetCoreSize (   self,
  CoreSize 
)

Set core elements size.

Default is 0.0

Parameters
CoreSizedouble value

References HYBRID_Algorithm.Parameters().

◆ SetMultinormalsAngle()

def SetMultinormalsAngle (   self,
  multinormalsAngle 
)

To set multinormals angle threshold at opening ridges.

Default is 30.0

Parameters
multinormalsAngledouble value

References HYBRID_Algorithm.Parameters().

◆ SetNbOfBoundaryLayers()

def SetNbOfBoundaryLayers (   self,
  nbOfBoundaryLayers 
)

To set number of boundary layers.

Default is 1

Parameters
nbOfBoundaryLayersint value

References HYBRID_Algorithm.Parameters().

◆ SetBoundaryLayersMaxElemAngle()

def SetBoundaryLayersMaxElemAngle (   self,
  angle 
)

Set maximum internal angles of boundary elements (in degree)

Parameters
angleangle in degree

References HYBRID_Algorithm.Parameters().

◆ SetWorkingDirectory()

def SetWorkingDirectory (   self,
  path 
)

Set path to working directory.

Parameters
pathworking directory

References HYBRID_Algorithm.Parameters().

◆ SetKeepFiles()

def SetKeepFiles (   self,
  toKeep 
)

To keep working files or remove them.

Parameters
toKeep"keep working files" flag value

References HYBRID_Algorithm.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

References HYBRID_Algorithm.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

References HYBRID_Algorithm.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.

References HYBRID_Algorithm.Parameters().

◆ SetToCreateNewNodes()

def SetToCreateNewNodes (   self,
  toCreate 
)

To create new nodes.

Parameters
toCreate"create new nodes" flag value

References HYBRID_Algorithm.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 HYBRID_Algorithm.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 HYBRID_Algorithm.Parameters().

◆ SetToRemoveCentralPoint()

def SetToRemoveCentralPoint (   self,
  toRemove 
)

To remove initial central point.

Parameters
toRemove"remove initial central point" flag value

References HYBRID_Algorithm.Parameters().

◆ 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 HYBRID_Algorithm.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, and HYBRID_Algorithm.Parameters().

◆ RemoveEnforcedVertex()

def RemoveEnforcedVertex (   self,
  x,
  y,
  z 
)

To remove an enforced vertex.

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

References HYBRID_Algorithm.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, and HYBRID_Algorithm.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 HYBRID_Algorithm.Parameters().

◆ SetOptionValue()

def SetOptionValue (   self,
  optionName,
  optionValue 
)

Set advanced option value.

Parameters
optionNameoption name
optionValueoption value

References HYBRID_Algorithm.Parameters().

◆ SetAdvancedOption()

def SetAdvancedOption (   self,
  optionAndValue 
)

Sets command line option as text.

Parameters
optionAndValuecommand line option in a form "option value"

References HYBRID_Algorithm.Parameters().

◆ SetTextOption()

def SetTextOption (   self,
  option 
)

Sets command line option as text.

OBSOLETE. Use SetAdvancedOption()

Parameters
optioncommand line option

References HYBRID_Algorithm.Parameters(), and HYBRID_Algorithm.SetAdvancedOption().

Field Documentation

◆ meshMethod

string meshMethod = "Tetrahedron"
static

name of the dynamic method in smeshBuilder.Mesh class

◆ algoType

algoType = MG_Hybrid
static

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

◆ docHelper

string docHelper = "Creates tetrahedron 3D algorithm for volumes"
static

doc string of the method in smeshBuilder.Mesh class

◆ params

params