gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
#include "meshQuadQuasiStructured.h"
#include <array>
#include <queue>
#include "GmshConfig.h"
#include "GmshMessage.h"
#include "Numeric.h"
#include "Context.h"
#include "OS.h"
#include "GModel.h"
#include "meshGEdge.h"
#include "meshGFace.h"
#include "meshGFaceOptimize.h"
#include "meshGRegion.h"
#include "BackgroundMesh.h"
#include "Generator.h"
#include "Field.h"
#include "MElement.h"
#include "MTriangle.h"
#include "MQuadrangle.h"
#include "MLine.h"
#include "gmsh.h"
#include "meshRefine.h"
#include "meshOctreeLibOL.h"
#include "robin_hood.h"
Go to the source code of this file.
Functions | |
int | BuildBackgroundMeshAndGuidingField (GModel *gm, bool overwriteGModelMesh, bool deleteGModelMeshAfter, bool overwriteField, int N) |
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 | 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) |
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 | optimizeQuadMeshBoundaries (GModel *gm) |
Add one extruded quad layer on curves where the boundary quad valences are not ideal. 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 | quadqsCleanup (GModel *gm) |
Delete background meshes and fields that have been used by quadqs meshing/remeshing. More... | |
void | getAcuteCorners (GFace *gf, std::unordered_map< MVertex *, std::vector< MVertex * > > ´Corners, double angle_threshold_rad) |
int | optimize1DMeshAtAcuteCorners (GModel *gm) |
Identify face acute corners and set the first curve mesh vertices at same length from corner. More... | |
bool backgroundMeshAndGuidingFieldExists | ( | GModel * | gm | ) |
To check if a compatible background mesh and guiding field already exists.
Definition at line 3259 of file meshQuadQuasiStructured.cpp.
Referenced by GenerateMesh().
int BuildBackgroundMeshAndGuidingField | ( | GModel * | gm, |
bool | overwriteGModelMesh = false , |
||
bool | deleteGModelMeshAfter = false , |
||
bool | overwriteField = false , |
||
int | N = 4 |
||
) |
[in] | gm | GModel containing the CAD and/or meshes |
[in] | overwriteGModelMesh | delete existing mesh, rebuild from CAD |
[in] | deleteGModelMeshAfter | after background mesh creation, delete the GModel mesh |
[in] | overwriteField | overwrite existing background field |
[in] | N | the N-symmetry field invariance. N=4 for cross and N=6 for asterisk fields |
Definition at line 3251 of file meshQuadQuasiStructured.cpp.
Referenced by GenerateMesh().
void getAcuteCorners | ( | GFace * | gf, |
std::unordered_map< MVertex *, std::vector< MVertex * > > & | acuteCorners, | ||
double | angle_threshold_rad | ||
) |
Definition at line 3530 of file meshQuadQuasiStructured.cpp.
Referenced by optimize1DMeshAtAcuteCorners().
int optimize1DMeshAtAcuteCorners | ( | GModel * | gm | ) |
Identify face acute corners and set the first curve mesh vertices at same length from corner.
gm | The model containing the curve meshes |
Definition at line 3562 of file meshQuadQuasiStructured.cpp.
int optimizeQuadMeshBoundaries | ( | GModel * | gm | ) |
Add one extruded quad layer on curves where the boundary quad valences are not ideal.
gm | The model containing the surface meshes |
Definition at line 3296 of file meshQuadQuasiStructured.cpp.
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.
gm | The model containing the face quad meshes. |
Definition at line 3271 of file meshQuadQuasiStructured.cpp.
Referenced by OptimizeMesh().
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.
gm | The model containing the face quad meshes. |
Definition at line 3265 of file meshQuadQuasiStructured.cpp.
Referenced by OptimizeMesh().
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.
gm | The model containing the face quad meshes. |
minimumQualityRequired | Minimum quality (SICN) required to accept a new quad mesh |
Definition at line 3277 of file meshQuadQuasiStructured.cpp.
Referenced by OptimizeMesh().
int quadqsCleanup | ( | GModel * | gm | ) |
Delete background meshes and fields that have been used by quadqs meshing/remeshing.
gm | The model containing the surface meshes |
Definition at line 3507 of file meshQuadQuasiStructured.cpp.
int RefineMeshWithBackgroundMeshProjection | ( | GModel * | gm | ) |
Midpoint subdivision of the surface mesh with projections on the CAD surfaces, using the background mesh for faster projections.
gm | The model containing the surface meshes |
Definition at line 3284 of file meshQuadQuasiStructured.cpp.
Referenced by Mesh2D().
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.
gm | The model containing the surface meshes |
Definition at line 3290 of file meshQuadQuasiStructured.cpp.
Referenced by Mesh2D().
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.
gm | The model containing the meshes |
Definition at line 3306 of file meshQuadQuasiStructured.cpp.
Referenced by OptimizeMesh().