Geom Software - C++ Programming and Geometry Libraries
Fade2D Documentation pages v1.52
GEOM_FADE2D::MeshGenParams Class Reference

Parameters for the mesh generator. More...

#include <MeshGenParams.h>

Public Member Functions

 MeshGenParams (Zone2 *pZone_)
 
virtual double getMaxTriangleArea (Triangle2 *pT)
 getMaxTriangleArea(Triangle2* pT) More...
 
virtual double getMaxEdgeLength (Triangle2 *pT)
 getMaxEdgeLength(Triangle2* pT) More...
 

Public Attributes

Zone2pZone
 Zone to be meshed.
 
double minAngleDegree
 Minimum interior triangle angle. More...
 
double minEdgeLength
 Minimum edge length. More...
 
double maxEdgeLength
 Maximum edge length. More...
 
double maxTriangleArea
 maxTriangleArea More...
 
bool bAllowConstraintSplitting
 bAllowConstraintSplitting More...
 
double growFactor
 growFactor More...
 
double growFactorMinArea
 growFactorMinArea More...
 
double capAspectLimit
 capAspectLimit More...
 
Vector2 gridVector
 gridVector More...
 
double gridLength
 gridLength More...
 
int command
 Command. More...
 

Detailed Description

This class serves as container for mesh generator parameters. Client code can provide a class which derives from MeshGenParams an which provides custom implementations of the getMaxTriangleArea(Triangle* pT) method or the getMaxEdgeLength(Triangle* pT) method in order to gain control over the local density of the generated mesh. When the meshing algorithm decides if a certain triangle T must be refined, then it calls these functions.

Member Function Documentation

virtual double GEOM_FADE2D::MeshGenParams::getMaxEdgeLength ( Triangle2 pT)
inlinevirtual
Parameters
pTis a triangle for which the meshing algorithm checks if it must be refined.

The default implementation of the present class returns the value maxEdgeLength (which is DBL_MAX if not changed by the user). This method can be overridden by the client software in order to control the local mesh density.

mesh-generator-customParameters.png
User Controlled Mesh Density, Edge Length
virtual double GEOM_FADE2D::MeshGenParams::getMaxTriangleArea ( Triangle2 pT)
inlinevirtual
Parameters
pTis a triangle for which the meshing algorithm checks if it must be refined.

The default implementation of the present class returns the value maxTriangleArea (which is the default value DBL_MAX if not changed by the user). This method can be overridden by the client software in order to control the local mesh density.

mesh-generator-customParameters.png
User Controlled Mesh Density, Area

Member Data Documentation

bool GEOM_FADE2D::MeshGenParams::bAllowConstraintSplitting

Defines if constraint segments can be splitted. Default: yes

double GEOM_FADE2D::MeshGenParams::capAspectLimit

Limits the quotient edgeLength / height. Default value: 10.0

int GEOM_FADE2D::MeshGenParams::command

A command for development, not for public use. Will vanish soon.

double GEOM_FADE2D::MeshGenParams::gridLength

Set gridLength > 0 to mesh large enough areas with grid points. Border areas and narrow stripes where a grid does not fit are automatically meshed using classic Delaunay methods. By default gridLength=0 (off).

Note
The length of the diagonals in the grid is sqrt(2)*gridLength and the algorithm may automatically adapt the gridLength a bit such that the grid fits better into the shape.
grid-mesh.png
Grid Meshing axis aligned
Vector2 GEOM_FADE2D::MeshGenParams::gridVector

When pre-meshing with grid points is used then the grid will be aligned along this vector. By default gridVector is axis aligned.

grid-mesh-angle.png
Grid Meshing along Vector2(1.0,0.3)
double GEOM_FADE2D::MeshGenParams::growFactor

Limits the growth of adjacent triangles. The mesh is constructed such that for any two adjacent triangles t0 and t1 (where t0 is the larger one) area(t0)/area(t1) < growFactor. Recommendation: growFactor>5.0, Default: growFactor=DBL_MAX

double GEOM_FADE2D::MeshGenParams::growFactorMinArea

The growFactor value is ignored for triangles with a smaller area than growFactorMinArea. This value prevents generation of hundreds of tiny triangles around one that is unusually small. Default: 0.001

double GEOM_FADE2D::MeshGenParams::maxEdgeLength

This value is returned by the default implementation of getMaxEdgeLength(Triangle* pT). Larger edges are automatically subdivided. If a custom implementation of getMaxEdgeLength(Triangle* pT) is provided then this value is ignored. Default value: DBL_MAX.

double GEOM_FADE2D::MeshGenParams::maxTriangleArea

This value is returned by the default implementation of getMaxTriangleArea(Triangle* pT). Larger triangles are automatically subdivided. If a custom implementation of getMaxTriangleArea(Triangle* pT) is provided then this value is ignored. Default value: DBL_MAX.

double GEOM_FADE2D::MeshGenParams::minAngleDegree

Minimum interior angle: Default: 20.0, maximum: 30.0

double GEOM_FADE2D::MeshGenParams::minEdgeLength

Edges below the minimum length are not subdivided. This parameter is useful to avoid tiny triangles. Default: 0.001


The documentation for this class was generated from the following file: