gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
meshGFacePack.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <queue>
#include <map>
#include <vector>
#include "gmsh.h"
#include "SPoint2.h"
#include "SVector3.h"
#include "meshTriangulation.h"
#include "robustPredicates.h"
Include dependency graph for meshGFacePack.cpp:

Go to the source code of this file.

Functions

static void analyze2dMetric (std::vector< double > &val, double &C, double &S, double &h1, double &h2)
 
double bestParabola (double x0, double y0, double x1, double y1, double &xmid, double &ymid, int VIEW_TAG)
 
double objectiveFunction_L (double x0, double y0, double xt, double yt, double x1, double y1, int VIEW_TAG)
 
static double maxDir (double &c, double &s, double &h, const double &C, const double &S, const double &H1, const double &H2)
 
static int check_triangle_validity_2d (double *xa, double *xb, double *xc)
 
static double interpolateTriangleP2 (double xi, double eta, double v0, double v1, double v2, double v3, double v4, double v5)
 
static void derivativeP2 (double u, double v, double dfdu[6], double dfdv[6])
 
static void jac_corners_p2 (double *xa, double *xb, double *xc, double *xab, double *xbc, double *xca, double J[6])
 
static void jac_points_p2 (double *xa, double *xb, double *xc, double *xab, double *xbc, double *xca, double *xis, double *etas, double detJ[6], double J[6][4])
 
static double validity_p2triangle_formula (double *xa, double *xb, double *xc, double *xab, double *xbc, double *xca)
 
static double closest (double t, double u)
 
static double p2triangle_alignment_quality_measure (double *xa, double *xb, double *xc, double *xab, double *xbc, double *xca, int VIEW_TAG)
 
static double p1triangle_quality_metric (int VIEW_TAG, PolyMesh::Vertex *v0, PolyMesh::Vertex *v1, PolyMesh::Vertex *v2)
 
int lengthPathInMetricField (double lagrangianPoints[3][2], double *lengthInMetricField, int VIEW_TAG)
 
double objectiveFunction (double x0, double y0, double x1, double y1, double x2, double y2, int VIEW_TAG)
 
double goldenSection (double x0, double y0, double &xt, double &yt, double x1, double y1, double astart, double bstart, double &gamma1, double direction[2], int VIEW_TAG)
 
int shortestParabola (double *xstart, double *xend, int VIEW_TAG, double *xmid, double *lengthGeodesicsTwoPoints)
 
static double smallestLengthParabola (int VIEW_TAG, SPoint2 &p1, SPoint2 &p2, SPoint2 &p3)
 
static double closestPoint (int VIEW_TAG, std::vector< SPoint2 > &_points, SPoint2 &p, SPoint2 &c)
 
static bool computeNeighbor (int VIEW_TAG, const SPoint2 &p, int DIR, double adimensionalLength, SPoint2 &n)
 
static int delaunayEdgeCriterionAnIsotropic (PolyMesh::HalfEdge *he, int VIEW_TAG)
 
double triangleValidityP2 (PolyMesh::HalfEdge *hea, std::map< PolyMesh::HalfEdge *, SPoint2 > *midPoints=nullptr)
 
double triangleQualityP2 (int VIEW_TAG, PolyMesh::HalfEdge *hea, std::map< PolyMesh::HalfEdge *, SPoint2 > *midPoints=nullptr)
 
double triangleValidityP1 (PolyMesh::HalfEdge *hea)
 
double LENGTH (PolyMesh::HalfEdge *he, std::map< PolyMesh::HalfEdge *, SPoint2 > &midPoints, int VIEW_TAG, bool straight=false)
 
static double bestParabola (PolyMesh::HalfEdge *he, int VIEW_TAG, std::map< PolyMesh::HalfEdge *, SPoint2 > &midPoints, double ximax=.2)
 
static double bestParabola (PolyMesh::HalfEdge *he, std::map< PolyMesh::HalfEdge *, SPoint2 > &midPoints, double er(double *, double *, double *, double *, double *, double *), double ximax=0.2)
 
int computePointsUsingScaledCrossFieldPlanarP2 (const char *modelForMetric, const char *modelForMesh, int VIEW_TAG, int faceTag, std::vector< double > &pts, double er(double *, double *, double *, double *, double *, double *))
 

Variables

FILE * FF = NULL
 
static double _LIMIT = 0.7
 

Function Documentation

◆ analyze2dMetric()

static void analyze2dMetric ( std::vector< double > &  val,
double &  C,
double &  S,
double &  h1,
double &  h2 
)
static

Definition at line 17 of file meshGFacePack.cpp.

Referenced by computeNeighbor(), and p2triangle_alignment_quality_measure().

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

◆ bestParabola() [1/3]

double bestParabola ( double  x0,
double  y0,
double  x1,
double  y1,
double &  xmid,
double &  ymid,
int  VIEW_TAG 
)

Definition at line 764 of file meshGFacePack.cpp.

Referenced by computePointsUsingScaledCrossFieldPlanarP2().

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

◆ bestParabola() [2/3]

static double bestParabola ( PolyMesh::HalfEdge he,
int  VIEW_TAG,
std::map< PolyMesh::HalfEdge *, SPoint2 > &  midPoints,
double  ximax = .2 
)
static

Definition at line 651 of file meshGFacePack.cpp.

Here is the call graph for this function:

◆ bestParabola() [3/3]

static double bestParabola ( PolyMesh::HalfEdge he,
std::map< PolyMesh::HalfEdge *, SPoint2 > &  midPoints,
double   erdouble *, double *, double *, double *, double *, double *,
double  ximax = 0.2 
)
static

Definition at line 695 of file meshGFacePack.cpp.

Here is the call graph for this function:

◆ check_triangle_validity_2d()

static int check_triangle_validity_2d ( double *  xa,
double *  xb,
double *  xc 
)
static

Definition at line 71 of file meshGFacePack.cpp.

Referenced by delaunayEdgeCriterionAnIsotropic().

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

◆ closest()

static double closest ( double  t,
double  u 
)
static

Definition at line 177 of file meshGFacePack.cpp.

Referenced by closestPoint(), GMSH_DiscretizationErrorPlugin::execute(), and p2triangle_alignment_quality_measure().

Here is the caller graph for this function:

◆ closestPoint()

static double closestPoint ( int  VIEW_TAG,
std::vector< SPoint2 > &  _points,
SPoint2 p,
SPoint2 c 
)
static

Definition at line 478 of file meshGFacePack.cpp.

Referenced by computePointsUsingScaledCrossFieldPlanarP2().

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

◆ computeNeighbor()

static bool computeNeighbor ( int  VIEW_TAG,
const SPoint2 p,
int  DIR,
double  adimensionalLength,
SPoint2 n 
)
static

Definition at line 494 of file meshGFacePack.cpp.

Referenced by computePointsUsingScaledCrossFieldPlanarP2().

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

◆ computePointsUsingScaledCrossFieldPlanarP2()

int computePointsUsingScaledCrossFieldPlanarP2 ( const char *  modelForMetric,
const char *  modelForMesh,
int  VIEW_TAG,
int  faceTag,
std::vector< double > &  pts,
double   erdouble *, double *, double *, double *, double *, double * 
)

Definition at line 803 of file meshGFacePack.cpp.

Here is the call graph for this function:

◆ delaunayEdgeCriterionAnIsotropic()

static int delaunayEdgeCriterionAnIsotropic ( PolyMesh::HalfEdge he,
int  VIEW_TAG 
)
static

Definition at line 534 of file meshGFacePack.cpp.

Referenced by computePointsUsingScaledCrossFieldPlanarP2().

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

◆ derivativeP2()

static void derivativeP2 ( double  u,
double  v,
double  dfdu[6],
double  dfdv[6] 
)
static

Definition at line 89 of file meshGFacePack.cpp.

Referenced by jac_corners_p2(), and jac_points_p2().

Here is the caller graph for this function:

◆ goldenSection()

double goldenSection ( double  x0,
double  y0,
double &  xt,
double &  yt,
double  x1,
double  y1,
double  astart,
double  bstart,
double &  gamma1,
double  direction[2],
int  VIEW_TAG 
)

Definition at line 355 of file meshGFacePack.cpp.

Here is the call graph for this function:

◆ interpolateTriangleP2()

static double interpolateTriangleP2 ( double  xi,
double  eta,
double  v0,
double  v1,
double  v2,
double  v3,
double  v4,
double  v5 
)
static

Definition at line 76 of file meshGFacePack.cpp.

Referenced by p2triangle_alignment_quality_measure().

Here is the caller graph for this function:

◆ jac_corners_p2()

static void jac_corners_p2 ( double *  xa,
double *  xb,
double *  xc,
double *  xab,
double *  xbc,
double *  xca,
double  J[6] 
)
static

Definition at line 113 of file meshGFacePack.cpp.

Referenced by validity_p2triangle_formula().

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

◆ jac_points_p2()

static void jac_points_p2 ( double *  xa,
double *  xb,
double *  xc,
double *  xab,
double *  xbc,
double *  xca,
double *  xis,
double *  etas,
double  detJ[6],
double  J[6][4] 
)
static

Definition at line 134 of file meshGFacePack.cpp.

Referenced by p2triangle_alignment_quality_measure().

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

◆ LENGTH()

double LENGTH ( PolyMesh::HalfEdge he,
std::map< PolyMesh::HalfEdge *, SPoint2 > &  midPoints,
int  VIEW_TAG,
bool  straight = false 
)

Definition at line 638 of file meshGFacePack.cpp.

Referenced by computePointsUsingScaledCrossFieldPlanarP2().

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

◆ lengthPathInMetricField()

int lengthPathInMetricField ( double  lagrangianPoints[3][2],
double *  lengthInMetricField,
int  VIEW_TAG 
)

Definition at line 282 of file meshGFacePack.cpp.

Referenced by objectiveFunction_L().

Here is the caller graph for this function:

◆ maxDir()

static double maxDir ( double &  c,
double &  s,
double &  h,
const double &  C,
const double &  S,
const double &  H1,
const double &  H2 
)
static

Definition at line 38 of file meshGFacePack.cpp.

Referenced by computeNeighbor().

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

◆ objectiveFunction()

double objectiveFunction ( double  x0,
double  y0,
double  x1,
double  y1,
double  x2,
double  y2,
int  VIEW_TAG 
)

Definition at line 349 of file meshGFacePack.cpp.

Referenced by goldenSection().

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

◆ objectiveFunction_L()

double objectiveFunction_L ( double  x0,
double  y0,
double  xt,
double  yt,
double  x1,
double  y1,
int  VIEW_TAG 
)

Definition at line 333 of file meshGFacePack.cpp.

Referenced by bestParabola(), goldenSection(), LENGTH(), objectiveFunction(), and shortestParabola().

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

◆ p1triangle_quality_metric()

static double p1triangle_quality_metric ( int  VIEW_TAG,
PolyMesh::Vertex v0,
PolyMesh::Vertex v1,
PolyMesh::Vertex v2 
)
static

Definition at line 246 of file meshGFacePack.cpp.

Referenced by delaunayEdgeCriterionAnIsotropic().

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

◆ p2triangle_alignment_quality_measure()

static double p2triangle_alignment_quality_measure ( double *  xa,
double *  xb,
double *  xc,
double *  xab,
double *  xbc,
double *  xca,
int  VIEW_TAG 
)
static

Definition at line 192 of file meshGFacePack.cpp.

Referenced by bestParabola(), and triangleQualityP2().

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

◆ shortestParabola()

int shortestParabola ( double *  xstart,
double *  xend,
int  VIEW_TAG,
double *  xmid,
double *  lengthGeodesicsTwoPoints 
)

Definition at line 421 of file meshGFacePack.cpp.

Referenced by smallestLengthParabola().

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

◆ smallestLengthParabola()

static double smallestLengthParabola ( int  VIEW_TAG,
SPoint2 p1,
SPoint2 p2,
SPoint2 p3 
)
static

Definition at line 468 of file meshGFacePack.cpp.

Referenced by closestPoint().

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

◆ triangleQualityP2()

double triangleQualityP2 ( int  VIEW_TAG,
PolyMesh::HalfEdge hea,
std::map< PolyMesh::HalfEdge *, SPoint2 > *  midPoints = nullptr 
)

Definition at line 583 of file meshGFacePack.cpp.

Referenced by bestParabola(), and computePointsUsingScaledCrossFieldPlanarP2().

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

◆ triangleValidityP1()

double triangleValidityP1 ( PolyMesh::HalfEdge hea)

Definition at line 630 of file meshGFacePack.cpp.

Here is the call graph for this function:

◆ triangleValidityP2()

double triangleValidityP2 ( PolyMesh::HalfEdge hea,
std::map< PolyMesh::HalfEdge *, SPoint2 > *  midPoints = nullptr 
)

Definition at line 562 of file meshGFacePack.cpp.

Referenced by bestParabola(), and triangleQualityP2().

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

◆ validity_p2triangle_formula()

static double validity_p2triangle_formula ( double *  xa,
double *  xb,
double *  xc,
double *  xab,
double *  xbc,
double *  xca 
)
static

Definition at line 159 of file meshGFacePack.cpp.

Referenced by triangleValidityP2().

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

Variable Documentation

◆ _LIMIT

double _LIMIT = 0.7
static

Definition at line 477 of file meshGFacePack.cpp.

Referenced by closestPoint(), and computePointsUsingScaledCrossFieldPlanarP2().

◆ FF