本文整理汇总了C++中GEdge::parBounds方法的典型用法代码示例。如果您正苦于以下问题:C++ GEdge::parBounds方法的具体用法?C++ GEdge::parBounds怎么用?C++ GEdge::parBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GEdge
的用法示例。
在下文中一共展示了GEdge::parBounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LC_MVertex_PNTS
// compute the mesh size at a given vertex due to prescribed sizes at
// mesh vertices
static double LC_MVertex_PNTS(GEntity *ge, double U, double V)
{
switch(ge->dim()){
case 0:
{
GVertex *gv = (GVertex *)ge;
double lc = gv->prescribedMeshSizeAtVertex();
// FIXME we might want to remove this to make all lc treatment consistent
if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
return lc;
}
case 1:
{
GEdge *ged = (GEdge *)ge;
GVertex *v1 = ged->getBeginVertex();
GVertex *v2 = ged->getEndVertex();
if (v1 && v2){
Range<double> range = ged->parBounds(0);
double a = (U - range.low()) / (range.high() - range.low());
double lc = (1 - a) * v1->prescribedMeshSizeAtVertex() +
(a) * v2->prescribedMeshSizeAtVertex() ;
// FIXME we might want to remove this to make all lc treatment consistent
if(lc >= MAX_LC) return CTX::instance()->lc / 10.;
return lc;
}
else
return MAX_LC;
}
default:
return MAX_LC;
}
}