Skip to content
Snippets Groups Projects
Commit bc6a7ec1 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix build without mesh module

parent e65990f6
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,30 @@ double MElement::rhoShapeMeasure()
return 0.;
}
void MElement::scaledJacRange(double &jmin, double &jmax)
{
jmin = jmax = 1.0;
#if defined(HAVE_MESH)
extern double mesh_functional_distorsion(MElement*,double,double);
if (getPolynomialOrder() == 1) return;
const bezierBasis *jac = getJacobianFuncSpace()->bezier;
fullVector<double>Ji(jac->points.size1());
for (int i=0;i<jac->points.size1();i++){
double u = jac->points(i,0);
double v = jac->points(i,1);
if (getType() == TYPE_QUA){
u = -1 + 2*u;
v = -1 + 2*v;
}
Ji(i) = mesh_functional_distorsion(this,u,v);
}
fullVector<double> Bi( jac->matrixLag2Bez.size1() );
jac->matrixLag2Bez.mult(Ji,Bi);
jmin = *std::min_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
jmax = *std::max_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
#endif
}
void MElement::getNode(int num, double &u, double &v, double &w)
{
// only for MElements that don't have a lookup table for this
......
......@@ -39,7 +39,6 @@ double MTriangle::getVolume()
double MTriangle::distoShapeMeasure()
{
#if defined(HAVE_MESH)
//return qmTriangleAngles(this);
return qmDistorsionOfMapping(this);
#else
return 0.;
......
......@@ -325,31 +325,6 @@ double mesh_functional_distorsion_pN(MElement *t)
return *std::min_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
}
void MElement::scaledJacRange(double &jmin, double &jmax)
{
jmin = jmax = 1.0;
if (getPolynomialOrder() == 1) return;
const bezierBasis *jac = getJacobianFuncSpace()->bezier;
fullVector<double>Ji(jac->points.size1());
for (int i=0;i<jac->points.size1();i++){
double u = jac->points(i,0);
double v = jac->points(i,1);
if (getType() == TYPE_QUA){
u = -1 + 2*u;
v = -1 + 2*v;
}
Ji(i) = mesh_functional_distorsion(this,u,v);
}
fullVector<double> Bi( jac->matrixLag2Bez.size1() );
jac->matrixLag2Bez.mult(Ji,Bi);
jmin = *std::min_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
jmax = *std::max_element(Bi.getDataPtr(),Bi.getDataPtr()+Bi.size());
}
double qmDistorsionOfMapping (MTriangle *e)
{
// return 1.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment