Hide menu
Loading...
Searching...
No Matches
cadex::MeshAlgo_NetgenFactory::Parameters Struct Reference

Defines parameters used by the Netgen meshing algorithm. More...

Public Types

enum  Granularity {
  VeryCoarse , Coarse , Moderate , Fine ,
  VeryFine , Custom
}
 Defines the policy of mesh element construction. More...
 

Public Member Functions

 Parameters ()
 Constructor.
 
void SetGranularity (Granularity theVal)
 Sets mesh granularity policy.
 

Public Attributes

double myGlobAbsMaxSize
 Absolute value of the global maximum size of element edge.
 
double myGlobRelMaxSize
 Relative value of the global maximum size of element edge.
 
double myLocRelMaxSize
 Relative value of the local maximum size of element edge.
 
double myGlobAbsMinSize
 Absolute value of the global minimum size of element edge.
 
double myGlobRelMinSize
 Relative value of the global minimum size of element edge.
 
Granularity myGranularity
 Pre-defined or custom granularity of the element construction.
 
double myGrading
 Element size growth.
 
unsigned int mySegPerEdge
 Segments per original Edge.
 
double myCrv
 Segments per original Edge's curvature.
 
unsigned int myOptSteps
 Number of steps in surface mesh optimization.
 
bool myIsVolumeMesh
 Specifies if 3D volume mesh should be generated after generating 2D surface mesh.
 
unsigned int myVolumeOptSteps
 Number of steps in volume mesh optimization.
 

Detailed Description

Defines parameters used by the Netgen meshing algorithm.

Warning
This class is a part of Advanced Meshers add-on, which is licensed separately from the base CAD Exchanger SDK.

Contains the following parameters:

  • Maximum element size (length of its segment). It can be set using absolute and/or relative values. If respective value is negative then it is ignored. Relative values must be within a (0., 1.] range. At least absolute or one relative value must be defined. The maximum value will not exceed the lowest one specified via absolute or relative values.
  • Minimum element size. The same conditions (as to maximum value) apply. Respectively, the minimum value will be greater than one specified via absolute or relative values.
  • Mesh granularity (policy of computing mesh element - e.g. size growth, minimum number of segments per original Edge, coefficient to amplify Edge's curvature).
  • Number of optimization steps after the mesh has been computed. If the value is 0 then no optimization is performed.

Parameters can be set using direct access to data members. Some parameters can be set to pre-defined values with SetGranularity() called with value different from Custom.

The the following parameters set in CAD Exchanger GUI can be programmatically set as demonstrated below:

td
td
td
aP.SetGranularity (MeshAlgo_NetgenFactory::Parameters::Custom);
aP.myGrading = 1.;
aP.mySegPerEdge = 1;
aP.myCrv = 1.5;
aP.myOptSteps = 3;
aMF.SetParameters (aP);
Creates a meshing algorithm based on the Netgen library.
Definition: MeshAlgo_NetgenFactory.hxx:28
void SetParameters(const Parameters &theParam)
Sets parameters to be used by the factory.
Definition: MeshAlgo_NetgenFactory.cxx:263
Defines parameters used by the Netgen meshing algorithm.
Definition: MeshAlgo_NetgenFactory.hxx:30
double myCrv
Segments per original Edge's curvature.
Definition: MeshAlgo_NetgenFactory.hxx:73
double myGrading
Element size growth.
Definition: MeshAlgo_NetgenFactory.hxx:71
unsigned int myOptSteps
Number of steps in surface mesh optimization.
Definition: MeshAlgo_NetgenFactory.hxx:75
double myGlobRelMaxSize
Relative value of the global maximum size of element edge.
Definition: MeshAlgo_NetgenFactory.hxx:64
double myGlobRelMinSize
Relative value of the global minimum size of element edge.
Definition: MeshAlgo_NetgenFactory.hxx:68
double myLocRelMaxSize
Relative value of the local maximum size of element edge.
Definition: MeshAlgo_NetgenFactory.hxx:65
double myGlobAbsMaxSize
Absolute value of the global maximum size of element edge.
Definition: MeshAlgo_NetgenFactory.hxx:63
void SetGranularity(Granularity theVal)
Sets mesh granularity policy.
Definition: MeshAlgo_NetgenFactory.hxx:50
unsigned int mySegPerEdge
Segments per original Edge.
Definition: MeshAlgo_NetgenFactory.hxx:72
double myGlobAbsMinSize
Absolute value of the global minimum size of element edge.
Definition: MeshAlgo_NetgenFactory.hxx:67
See also
sdk_meshing_advalgos.
Examples
meshing/netgen/Program.cs, and meshing/netgen/main.cxx.

Member Enumeration Documentation

◆ Granularity

Defines the policy of mesh element construction.

Provides pre-defined value for Parameters::myGrading, Parameters::mySegPerEdge, Parameters::myCrv. See Parameters::SetGranularity().

Constructor & Destructor Documentation

◆ Parameters()

cadex::MeshAlgo_NetgenFactory::Parameters::Parameters ( )
inline

Constructor.

Constructs parameters with myGlobAbsMaxSize as -1., myGlobRelMaxSize as -1., myLocRelMaxSize as 10% (1./10.) of the corresponding bounding box diagonal, myGlobAbsMinSize as -1., myGlobRelMinSize as 1% (1./100.), myOptSteps as 3. myGranularity as Moderate, myIsVolumeMesh as false, myVolumeOptSteps as 2.

Member Function Documentation

◆ SetGranularity()

void cadex::MeshAlgo_NetgenFactory::Parameters::SetGranularity ( Granularity  theVal)
inline

Sets mesh granularity policy.

Sets the values as follows:

  VeryCoarse Coarse Moderate Fine VeryFine
myGrading 0.7 0.5 0.3 0.2 0.1
mySegPerEdge 1 1 1 2 3
myCrv 1.0 1.5 2.0 3.0 5.0

If theVal is Custom then does nothing.

Examples
meshing/netgen/Program.cs, and meshing/netgen/main.cxx.

Member Data Documentation

◆ myCrv

cadex::MeshAlgo_NetgenFactory::Parameters::myCrv

Segments per original Edge's curvature.

Coefficient to be multiplied by the local curvature of the original Edge. For instance, 1.5 would mean that if the original Edge's curve has a local curvature value of 1.6 then at least 3 segments will be created (1.6 * 1.5 rounded to 3).

Must be positive. Automatically set to a pre-defined value when calling SetGranularity() with a value different from Custom.

◆ myGlobAbsMaxSize

cadex::MeshAlgo_NetgenFactory::Parameters::myGlobAbsMaxSize

Absolute value of the global maximum size of element edge.

Value specified in the length units of CAD Exchanger, i.e. millimeters (see Measurement Units).

Ignored, if negative.

◆ myGlobAbsMinSize

cadex::MeshAlgo_NetgenFactory::Parameters::myGlobAbsMinSize

Absolute value of the global minimum size of element edge.

Value specified in the length units of CAD Exchanger, i.e. millimeters (see Measurement Units).

Ignored, if negative.

◆ myGlobRelMaxSize

cadex::MeshAlgo_NetgenFactory::Parameters::myGlobRelMaxSize

Relative value of the global maximum size of element edge.

Coefficient which is multiplied by the value by the diagonal of the bounding box of the parent shape (Shell or Solid). If there is no parent Shell or Solid (i.e. there is free Face only) then is equivalent to myLocAbsMaxSize and is applied to the Face.

Must be within a (0., 1.] range. Ignored, if negative.

◆ myGlobRelMinSize

cadex::MeshAlgo_NetgenFactory::Parameters::myGlobRelMinSize

Relative value of the global minimum size of element edge.

Coefficient which is multiplied by the value by the diagonal of the bounding box of the smallest Face in parent Shell or Solid. If there is no parent Shell or Solid (i.e. there is free Face only) then is applied to the Face.

Must be within a (0., 1.] range. Ignored, if negative.

◆ myGrading

cadex::MeshAlgo_NetgenFactory::Parameters::myGrading

Element size growth.

Relative maximum change of the element size comparing to its neighbors. For instance, 0.5 would mean that the element size should be not greater than 1.5 times the neighbor element size.

Must be positive. Automatically set to a pre-defined value when calling SetGranularity() with a value different from Custom.

◆ myGranularity

cadex::MeshAlgo_NetgenFactory::Parameters::myGranularity

Pre-defined or custom granularity of the element construction.

Affects the maximum mesh edge element size depending on original (geometrical) Edge and neighbor elements.

See also
SetGranularity(), myGrading, mySegPerEdge, myCrv.

◆ myIsVolumeMesh

cadex::MeshAlgo_NetgenFactory::Parameters::myIsVolumeMesh

Specifies if 3D volume mesh should be generated after generating 2D surface mesh.

Default is false.

See also
myVolumeOptSteps.

◆ myLocRelMaxSize

cadex::MeshAlgo_NetgenFactory::Parameters::myLocRelMaxSize

Relative value of the local maximum size of element edge.

Coefficient which is multiplied by the value by the diagonal of the bounding box of the parent Face.

Must be within a (0., 1.] range. Ignored, if negative.

◆ myOptSteps

cadex::MeshAlgo_NetgenFactory::Parameters::myOptSteps

Number of steps in surface mesh optimization.

Must be non-negative. Default is 3. If set to 0 then no optimization is performed.

◆ mySegPerEdge

cadex::MeshAlgo_NetgenFactory::Parameters::mySegPerEdge

Segments per original Edge.

Minimum number of mesh segments to be created for each original Edge. For instance, 2 would mean that at least 2 segments will be created for each Edge.

Must be positive. Automatically set to a pre-defined value when calling SetGranularity() with a value different from Custom.

◆ myVolumeOptSteps

cadex::MeshAlgo_NetgenFactory::Parameters::myVolumeOptSteps

Number of steps in volume mesh optimization.

Must be non-negative. Default is 2. If set to 0 then no optimization is performed. Only used if myIsVolumeMesh is true.