gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
meshGFaceTransfinite.cpp File Reference
#include <map>
#include <queue>
#include <array>
#include "meshGFace.h"
#include "meshGEdge.h"
#include "GVertex.h"
#include "GEdge.h"
#include "GFace.h"
#include "MVertex.h"
#include "MTriangle.h"
#include "MQuadrangle.h"
#include "Context.h"
#include "GmshMessage.h"
#include "Numeric.h"
Include dependency graph for meshGFaceTransfinite.cpp:

Go to the source code of this file.

Macros

#define TRAN_QUA(c1, c2, c3, c4, s1, s2, s3, s4, u, v)
 
#define TRAN_TRI(c1, c2, c3, s1, s2, s3, u, v)   u * c2 + (1. - v) * c1 + v * c3 - (u * (1. - v) * s2 + u * v * s3)
 

Functions

void findTransfiniteCorners (GFace *gf, std::vector< MVertex * > &corners)
 
static void computeEdgeLoops (const GFace *gf, std::vector< MVertex * > &all_mvertices, std::vector< int > &indices)
 
double maxDistParam (const std::vector< double > &U, const std::vector< double > &V)
 
int MeshTransfiniteSurface (GFace *gf)
 
bool id_loop_from_closed_pairs (const std::vector< std::array< int, 2 > > &pairs, std::vector< int > &loop)
 
bool faceIsValidQuad (GFace *gf, double angle_threshold_rad)
 
GEdgequad_face_opposite_edge (GFace *face, GEdge *edge)
 
void build_chords (const std::set< GFace * > &faces, std::vector< std::set< GEdge * > > &chords, double maxDiffRel, bool ignoreEmbedded=false)
 
bool MeshSetTransfiniteFacesAutomatic (std::set< GFace * > &candidate_faces, double cornerAngle, bool setRecombine, double maxDiffRel, bool ignoreEmbedded)
 Automatically set transfinite constraints on curves and faces in the candidate_faces if possible. Curves on opposide sides of rectangular faces are constrained to reiceive the same number of points. More...
 

Macro Definition Documentation

◆ TRAN_QUA

#define TRAN_QUA (   c1,
  c2,
  c3,
  c4,
  s1,
  s2,
  s3,
  s4,
  u,
 
)
Value:
(1. - u) * c4 + u * c2 + (1. - v) * c1 + v * c3 - \
((1. - u) * (1. - v) * s1 + u * (1. - v) * s2 + u * v * s3 + \
(1. - u) * v * s4)

Definition at line 37 of file meshGFaceTransfinite.cpp.

◆ TRAN_TRI

#define TRAN_TRI (   c1,
  c2,
  c3,
  s1,
  s2,
  s3,
  u,
 
)    u * c2 + (1. - v) * c1 + v * c3 - (u * (1. - v) * s2 + u * v * s3)

Definition at line 44 of file meshGFaceTransfinite.cpp.

Function Documentation

◆ build_chords()

void build_chords ( const std::set< GFace * > &  faces,
std::vector< std::set< GEdge * > > &  chords,
double  maxDiffRel,
bool  ignoreEmbedded = false 
)

Definition at line 768 of file meshGFaceTransfinite.cpp.

Referenced by MeshSetTransfiniteFacesAutomatic().

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

◆ computeEdgeLoops()

static void computeEdgeLoops ( const GFace gf,
std::vector< MVertex * > &  all_mvertices,
std::vector< int > &  indices 
)
static

Definition at line 90 of file meshGFaceTransfinite.cpp.

Referenced by MeshTransfiniteSurface().

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

◆ faceIsValidQuad()

bool faceIsValidQuad ( GFace gf,
double  angle_threshold_rad 
)

Definition at line 681 of file meshGFaceTransfinite.cpp.

Referenced by MeshSetTransfiniteFacesAutomatic().

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

◆ findTransfiniteCorners()

void findTransfiniteCorners ( GFace gf,
std::vector< MVertex * > &  corners 
)

Definition at line 46 of file meshGFaceTransfinite.cpp.

Referenced by MeshTransfiniteSurface().

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

◆ id_loop_from_closed_pairs()

bool id_loop_from_closed_pairs ( const std::vector< std::array< int, 2 > > &  pairs,
std::vector< int > &  loop 
)

Definition at line 642 of file meshGFaceTransfinite.cpp.

Referenced by faceIsValidQuad().

Here is the caller graph for this function:

◆ maxDistParam()

double maxDistParam ( const std::vector< double > &  U,
const std::vector< double > &  V 
)

Definition at line 155 of file meshGFaceTransfinite.cpp.

Referenced by MeshTransfiniteSurface().

Here is the caller graph for this function:

◆ MeshSetTransfiniteFacesAutomatic()

bool MeshSetTransfiniteFacesAutomatic ( std::set< GFace * > &  candidate_faces,
double  cornerAngle = 2.35,
bool  setRecombine = true,
double  maxDiffRel = 1.,
bool  ignoreEmbedded = false 
)

Automatically set transfinite constraints on curves and faces in the candidate_faces if possible. Curves on opposide sides of rectangular faces are constrained to reiceive the same number of points.

Parameters
candidate_facesThe faces which are candidate for transfinite
cornerAngleThreshold on the angle (viewed from face) at corners
setRecombineIf true, quads will be built instead of triangles when meshing
maxDiffRelReject transfinite constraints if the relative difference on the initial number of lines (from sizing constraints) on opposite sides is larger than the maxDiffRel
ignoreEmbeddedIf true, ignore embedded edges and vertices in faces
Returns
true if success

Definition at line 817 of file meshGFaceTransfinite.cpp.

Referenced by GenerateMesh().

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

◆ MeshTransfiniteSurface()

int MeshTransfiniteSurface ( GFace gf)

Definition at line 166 of file meshGFaceTransfinite.cpp.

Referenced by meshGFace::operator()().

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

◆ quad_face_opposite_edge()

GEdge* quad_face_opposite_edge ( GFace face,
GEdge edge 
)

Definition at line 743 of file meshGFaceTransfinite.cpp.

Referenced by build_chords().

Here is the call graph for this function:
Here is the caller graph for this function:
c1
const double c1
Definition: GaussQuadratureHex.cpp:16