gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
19 auto it =
faces.begin();
20 while(it !=
faces.end()) {
22 double cc = (*it)->curvatureMax(par);
23 val = std::max(cc, val);
32 std::vector<GEdge *>
const &l_edges = gv->
edges();
33 for(
auto ite = l_edges.begin(); ite != l_edges.end(); ++ite) {
34 GEdge *_myGEdge = *ite;
39 val = std::max(std::max(val, EC), FC);
69 Msg::Warning(
"Invalid number of elements per 2*pi curvature %g", ne);
72 double lc = Crv > 0 ? 2 * M_PI / Crv / ne :
MAX_LC;
82 Msg::Warning(
"Invalid number of elements per 2*pi curvature %g", ne);
85 double l_t = (2 * M_PI) / (fabs(ge->
curvature(u)) * ne);
95 auto it =
faces.begin();
99 while(it !=
faces.end()) {
128 Msg::Error(
"Curvature control impossible to compute for a volume");
158 double a = (U - range.
low()) / (range.
high() - range.
low());
159 return (1 - a) * lc1 + (a)*lc2;
171 if(l_t == 0.0)
return SMetric3(1.e-22);
173 if(fabs(t(0)) <= fabs(t(1)) && fabs(t(0)) <= fabs(t(2))) {
176 else if(fabs(t(1)) <= fabs(t(0)) && fabs(t(1)) <= fabs(t(2))) {
187 SMetric3 Metric(1. / (l_t * l_t), 1. / (l_n * l_n), 1. / (l_n * l_n), t, b,
195 double l_t2,
double l_n)
206 SMetric3 Metric(1. / (l_t1 * l_t1), 1. / (l_t2 * l_t2), 1. / (l_n * l_n), t1,
230 if(
f) l3 = (*f)(X, Y, Z, ge);
237 double l5 = (ge && ge->
dim() == 1) ?
238 ((
GEdge *)ge)->prescribedMeshSizeAtParam(U) :
242 double lc = std::min(std::min(std::min(std::min(l1, l2), l3), l4), l5);
246 int dim = (ge ? ge->
dim() : -1);
247 int tag = (ge ? ge->
tag() : -1);
258 if(!ge)
Msg::Warning(
"No entity in background mesh size evaluation");
271 Msg::Error(
"Wrong mesh element size lc = %g (lcmin = %g, lcmax = %g)", lc,
302 Msg::Error(
"Wrong mesh element size lc = %g (lcmin = %g, lcmax = %g)", lc,
317 if(!
f->isotropic()) { (*f)(X, Y, Z, l4, ge); }
319 const double L = (*f)(X, Y, Z, ge);
342 return (val > 0 || val == -2);
348 return (val > 0 || val == -3);
354 std::vector<GEdge *>
const &l_edges = gv->
edges();
355 for(
auto ite = l_edges.begin(); ite != l_edges.end(); ++ite) {
356 GEdge *_myGEdge = *ite;
361 Msg::Warning(
"Invalid number of elements per 2*pi curvature %g", ne);
367 double l_t = 2 * M_PI / (fabs(_myGEdge->
curvature(range.
low())) * ne);
374 double l_t = 2 * M_PI / (fabs(_myGEdge->
curvature(range.
high())) * ne);
384 bool surface_isotropic,
386 double d_tangent_max)
392 if(cmin == 0) cmin = 1.e-12;
393 if(cmax == 0) cmax = 1.e-12;
396 Msg::Warning(
"Invalid number of elements per 2*pi curvature %g", ne);
399 double lambda1 = 2 * M_PI / (fabs(cmin) * ne);
400 double lambda2 = 2 * M_PI / (fabs(cmax) * ne);
402 if(surface_isotropic) lambda2 = lambda1 = std::min(lambda2, lambda1);
410 double lambda3 = std::min(d_normal,
CTX::instance()->mesh.lcMax);
412 lambda1 = std::min(lambda1, d_tangent_max);
413 lambda2 = std::min(lambda2, d_tangent_max);
415 SMetric3 curvMetric(1. / (lambda1 * lambda1), 1. / (lambda2 * lambda2),
416 1. / (lambda3 * lambda3), dirMin, dirMax, Z);
SVector3 crossprod(const SVector3 &a, const SVector3 &b)
int getMeshSizeFromBoundary() const
virtual SPoint2 reparamOnFace(const GFace *face, double epar, int dir) const
virtual double getMeshSize() const
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
std::function< double(int, int, double, double, double, double)> lcCallback
static void Warning(const char *fmt,...)
static void Error(const char *fmt,...)
void f(int n, double u, double *val)
SMetric3 intersection(const SMetric3 &m1, const SMetric3 &m2)
virtual std::vector< GEdge * > const & edges() const
virtual SVector3 firstDer(double par) const =0
virtual double prescribedMeshSizeAtVertex() const
virtual GVertex * getBeginVertex() const
virtual GeomType geomType() const
FieldManager * getFields()
virtual std::vector< GFace * > faces() const
virtual double curvature(double par) const
virtual Range< double > parBounds(int i) const =0
virtual double curvatureMax(const SPoint2 ¶m) const
virtual double getMeshSizeFactor() const
virtual GVertex * getEndVertex() const
SMetric3 intersection_conserveM1(const SMetric3 &m1, const SMetric3 &m2)
virtual double curvatures(const SPoint2 ¶m, SVector3 &dirMax, SVector3 &dirMin, double &curvMax, double &curvMin) const
static GModel * current(int index=-1)