gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
17 #if defined(HAVE_MESH)
31 std::vector<GEdge *>
const &eds =
edges();
32 int numNonDegenerate = 0;
34 if(!ge->degenerate(0)) numNonDegenerate++;
36 return numNonDegenerate <= 1;
46 std::vector<GEdge *> eds;
47 std::vector<int> nums;
54 nums.push_back(
c->Num);
71 std::vector<GEdge *> l_wire;
72 l_wire.reserve(eds.size());
75 for(std::size_t i = 0; i < eds.size(); i++) {
80 if(!first) first = start;
89 l_dirs.push_back((num > 0) ? 1 : -1);
124 Msg::Error(
"Unknown point %d in transfinite attributes", corn->
Num);
155 double v[3] = {pt.
x(), pt.
y(), pt.
z()};
156 int NP = 10, tries = 0;
166 for(
int j = 0; j < N; j++) {
167 double u1 = (double)j / (
double)N;
168 double u2 = (double)(j + 1) / (double)N;
176 if(fabs(
angle) < 0.5) {
179 "Could not compute normal of surface %d - retrying with %d points",
189 return SVector3(-n[0], -n[1], -n[2]);
197 double x, y,
z, VX[3], VY[3];
230 double pp[2] = {par1, par2};
232 double x, y,
z, VX[3], VY[3];
234 return GPoint(x + VX[0] * par1 + VY[0] * par2,
235 y + VX[1] * par1 + VY[1] * par2,
236 z + VX[2] * par1 + VY[2] * par2,
this, pp);
245 const double initialGuess[2])
const
247 #if defined(HAVE_ALGLIB)
254 double VX[3], VY[3], x, y,
z;
256 double M[3][2] = {{VX[0], VY[0]}, {VX[1], VY[1]}, {VX[2], VY[2]}};
258 double B[3] = {XP - x, YP - y, ZP -
z};
260 for(
int i = 0; i < 2; i++) {
262 for(
int k = 0; k < 3; k++) { BN[i] += B[k] * M[k][i]; }
264 for(
int i = 0; i < 2; i++) {
265 for(
int j = 0; j < 2; j++) {
267 for(
int k = 0; k < 3; k++) { MN[i][j] += M[k][i] * M[k][j]; }
271 return GPoint(XP, YP, ZP,
this, UV);
278 double u[2] = {initialGuess[0], initialGuess[1]};
280 if(!result)
return GPoint(-1.e22, -1.e22, -1.e22,
nullptr, u);
285 bool convTestXYZ)
const
288 double x, y,
z, VX[3], VY[3];
290 double const vec[3] = {qp.
x() - x, qp.
y() - y, qp.
z() -
z};
291 double const u =
prosca(vec, VX);
292 double const v =
prosca(vec, VY);
329 double v[3] = {pt.
x(), pt.
y(), pt.
z()};
334 for(
int j = 0; j < N; j++) {
335 double u1 = (double)j / (
double)N;
336 double u2 = (double)(j + 1) / (double)N;
345 if(fabs(
angle) > 2 * M_PI - 0.5 && fabs(
angle) < 2 * M_PI + 0.5)
virtual Range< double > parBounds(int i) const
virtual std::vector< GEdge * > const & edges() const
virtual GEntity::GeomType geomType() const
#define MSH_SURF_BND_LAYER
double angle(const SVector3 &a, const SVector3 &b)
static void Debug(const char *fmt,...)
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
static void Warning(const char *fmt,...)
static void Error(const char *fmt,...)
int List_Nbr(List_T *liste)
struct GFace::@18 meshAttributes
virtual double getMetricEigenvalue(const SPoint2 &)
GEdge * getEdgeByTag(int n) const
void resetNativePtr(Surface *s)
virtual GPoint closestPoint(const SPoint3 &queryPoint, const double initialGuess[2]) const
std::vector< int > l_dirs
Vertex InterpolateCurve(Curve *c, double u, int const derivee)
bool ProjectPointOnSurface(Surface *s, Vertex &p, double uv[2])
virtual Pair< SVector3, SVector3 > firstDer(const SPoint2 ¶m) const
std::vector< GEdgeLoop > edgeLoops
double angle_plan(double v[3], double p1[3], double p2[3], double n[3])
virtual void resetMeshAttributes()
virtual double getMetricEigenvalue(const SPoint2 &)
void getMeanPlaneData(double VX[3], double VY[3], double &x, double &y, double &z) const
virtual GVertex * getBeginVertex() const
Vertex InterpolateSurface(Surface *s, double u, double v, int derivee, int u_v)
virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface=true, bool convTestXYZ=false) const
#define MSH_SURF_DISCRETE
virtual GPoint closestPoint(const SPoint3 &queryPoint, const double initialGuess[2]) const
struct GEdge::@16 meshAttributes
virtual bool haveParametrization()
double prosca(double const a[3], double const b[3])
List_T * GeneratricesByTag
virtual void secondDer(const SPoint2 &, SVector3 &, SVector3 &, SVector3 &) const
virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface=true, bool convTestXYZ=false) const
int sys2x2(double mat[2][2], double b[2], double res[2])
virtual GPoint point(double par1, double par2) const
virtual bool containsPoint(const SPoint3 &pt) const
virtual GVertex * getEndVertex() const
virtual SVector3 normal(const SPoint2 ¶m) const
bool degenerate(int dim) const
double norme(double a[3])
std::vector< GEdge * > l_edges
GVertex * getVertexByTag(int n) const
gmshFace(GModel *m, Surface *s)
void List_Read(List_T *liste, int index, void *data)