gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
meshQuadQuasiStructured.h File Reference
#include <vector>
Include dependency graph for meshQuadQuasiStructured.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CppUtils::RestoreValueAtEndOfLife< T >
 
class  QuadqsContextUpdater
 The QuadQuasiStructured meshing mode requires control over various meshing parameters which are stored in the global context. To deal with this without adding conditions everywhere in the other meshing parts, we use this updater which must be created at the beginning of the meshing cycle, and deleted at the end to restore the initial values. More...
 

Namespaces

 CppUtils
 

Functions

int BuildBackgroundMeshAndGuidingField (GModel *gm, bool overwriteGModelMesh=false, bool deleteGModelMeshAfter=false, bool overwriteField=false, int N=4)
 
bool backgroundMeshAndGuidingFieldExists (GModel *gm)
 To check if a compatible background mesh and guiding field already exists. More...
 
int optimizeTopologyWithDiskQuadrangulationRemeshing (GModel *gm)
 Look for non-ideal vertex valences in quad mesh and find a better local remeshing by looking into all disk quadrangulations. Quad quality (SICN) is monitored and the minimum will not decrease. Executes over CAD faces in parallel if multiple threads available. Only faces whose meshing status is GFace::PENDING are processed. More...
 
int transferSeamGEdgesVerticesToGFace (GModel *gm)
 Mesh vertices on seam curves (and isolated corners) are reparametrized on the associated GFace and transfered. The seam curves have empty meshes in the end. More...
 
int optimizeTopologyWithCavityRemeshing (GModel *gm)
 Look for patches of quads with >=3 irregular vertices which can be remeshed with more regular quad meshes. The replacement meshes are subdivisions of a list of predefined patterns. Irregular vertices matching cross field singularities are preserved. Executes over CAD faces in parallel if multiple threads available. Only faces whose meshing status is GFace::PENDING are processed. More...
 
int quadMeshingOfSimpleFacesWithPatterns (GModel *gm, double minimumQualityRequired=0.5)
 Look for simple CAD faces (topological disk, a few corners) which can be remeshed with simple quad patterns. The patterns are the same that are used in cavity remeshing. Executes over CAD faces in parallel if multiple threads available. Only faces whose meshing status is GFace::PENDING are processed. More...
 
int RefineMeshWithBackgroundMeshProjection (GModel *gm)
 Midpoint subdivision of the surface mesh with projections on the CAD surfaces, using the background mesh for faster projections. More...
 
int replaceBadQuadDominantMeshes (GModel *gm)
 The initial unstructured quad-tri mesh may contain very bad configurations (e.g. valence 50+) due to failures in algo pack. This method replaces them by meshes produced with algo meshadapt. More...
 
int optimize1DMeshAtAcuteCorners (GModel *gm)
 Identify face acute corners and set the first curve mesh vertices at same length from corner. More...
 
int optimizeQuadMeshBoundaries (GModel *gm)
 Add one extruded quad layer on curves where the boundary quad valences are not ideal. More...
 
int quadqsCleanup (GModel *gm)
 Delete background meshes and fields that have been used by quadqs meshing/remeshing. More...
 

Function Documentation

◆ backgroundMeshAndGuidingFieldExists()

bool backgroundMeshAndGuidingFieldExists ( GModel gm)

To check if a compatible background mesh and guiding field already exists.

Returns
true if exists

Definition at line 3259 of file meshQuadQuasiStructured.cpp.

Referenced by GenerateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildBackgroundMeshAndGuidingField()

int BuildBackgroundMeshAndGuidingField ( GModel gm,
bool  overwriteGModelMesh = false,
bool  deleteGModelMeshAfter = false,
bool  overwriteField = false,
int  N = 4 
)
Parameters
[in]gmGModel containing the CAD and/or meshes
[in]overwriteGModelMeshdelete existing mesh, rebuild from CAD
[in]deleteGModelMeshAfterafter background mesh creation, delete the GModel mesh
[in]overwriteFieldoverwrite existing background field
[in]Nthe N-symmetry field invariance. N=4 for cross and N=6 for asterisk fields
Returns
0 if success

Definition at line 3251 of file meshQuadQuasiStructured.cpp.

Referenced by GenerateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optimize1DMeshAtAcuteCorners()

int optimize1DMeshAtAcuteCorners ( GModel gm)

Identify face acute corners and set the first curve mesh vertices at same length from corner.

Parameters
gmThe model containing the curve meshes
Returns
0 if success

Definition at line 3562 of file meshQuadQuasiStructured.cpp.

Here is the call graph for this function:

◆ optimizeQuadMeshBoundaries()

int optimizeQuadMeshBoundaries ( GModel gm)

Add one extruded quad layer on curves where the boundary quad valences are not ideal.

Parameters
gmThe model containing the surface meshes
Returns
0 if success

Definition at line 3296 of file meshQuadQuasiStructured.cpp.

Here is the call graph for this function:

◆ optimizeTopologyWithCavityRemeshing()

int optimizeTopologyWithCavityRemeshing ( GModel gm)

Look for patches of quads with >=3 irregular vertices which can be remeshed with more regular quad meshes. The replacement meshes are subdivisions of a list of predefined patterns. Irregular vertices matching cross field singularities are preserved. Executes over CAD faces in parallel if multiple threads available. Only faces whose meshing status is GFace::PENDING are processed.

Parameters
gmThe model containing the face quad meshes.
Returns
0 if success

Definition at line 3271 of file meshQuadQuasiStructured.cpp.

Referenced by OptimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optimizeTopologyWithDiskQuadrangulationRemeshing()

int optimizeTopologyWithDiskQuadrangulationRemeshing ( GModel gm)

Look for non-ideal vertex valences in quad mesh and find a better local remeshing by looking into all disk quadrangulations. Quad quality (SICN) is monitored and the minimum will not decrease. Executes over CAD faces in parallel if multiple threads available. Only faces whose meshing status is GFace::PENDING are processed.

Parameters
gmThe model containing the face quad meshes.
Returns
0 if success

Definition at line 3265 of file meshQuadQuasiStructured.cpp.

Referenced by OptimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ quadMeshingOfSimpleFacesWithPatterns()

int quadMeshingOfSimpleFacesWithPatterns ( GModel gm,
double  minimumQualityRequired = 0.5 
)

Look for simple CAD faces (topological disk, a few corners) which can be remeshed with simple quad patterns. The patterns are the same that are used in cavity remeshing. Executes over CAD faces in parallel if multiple threads available. Only faces whose meshing status is GFace::PENDING are processed.

Parameters
gmThe model containing the face quad meshes.
minimumQualityRequiredMinimum quality (SICN) required to accept a new quad mesh
Returns
0 if success

Definition at line 3277 of file meshQuadQuasiStructured.cpp.

Referenced by OptimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ quadqsCleanup()

int quadqsCleanup ( GModel gm)

Delete background meshes and fields that have been used by quadqs meshing/remeshing.

Parameters
gmThe model containing the surface meshes
Returns
0 if success

Definition at line 3507 of file meshQuadQuasiStructured.cpp.

Here is the call graph for this function:

◆ RefineMeshWithBackgroundMeshProjection()

int RefineMeshWithBackgroundMeshProjection ( GModel gm)

Midpoint subdivision of the surface mesh with projections on the CAD surfaces, using the background mesh for faster projections.

Parameters
gmThe model containing the surface meshes
Returns
0 if success

Definition at line 3284 of file meshQuadQuasiStructured.cpp.

Referenced by Mesh2D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ replaceBadQuadDominantMeshes()

int replaceBadQuadDominantMeshes ( GModel gm)

The initial unstructured quad-tri mesh may contain very bad configurations (e.g. valence 50+) due to failures in algo pack. This method replaces them by meshes produced with algo meshadapt.

Parameters
gmThe model containing the surface meshes
Returns
0 if success

Definition at line 3290 of file meshQuadQuasiStructured.cpp.

Referenced by Mesh2D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transferSeamGEdgesVerticesToGFace()

int transferSeamGEdgesVerticesToGFace ( GModel gm)

Mesh vertices on seam curves (and isolated corners) are reparametrized on the associated GFace and transfered. The seam curves have empty meshes in the end.

Parameters
gmThe model containing the meshes
Returns
0 if success

Definition at line 3306 of file meshQuadQuasiStructured.cpp.

Referenced by OptimizeMesh().

Here is the call graph for this function:
Here is the caller graph for this function: