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

if toleranceEdgeLength==0 and curve is zero-length, force N=1

JF - we should really clean up the degenerated cases
parent 1fe1e485
No related branches found
No related tags found
No related merge requests found
...@@ -286,18 +286,18 @@ void meshGEdge::operator() (GEdge *ge) ...@@ -286,18 +286,18 @@ void meshGEdge::operator() (GEdge *ge)
ge->setLength(length); ge->setLength(length);
Points.clear(); Points.clear();
if(length == 0. && CTX::instance()->mesh.toleranceEdgeLength == 0.)
Msg::Error("Curve %d has a zero length", ge->tag());
else if (length == 0.)
Msg::Debug("Curve %d has a zero length", ge->tag());
if(length < CTX::instance()->mesh.toleranceEdgeLength) if(length < CTX::instance()->mesh.toleranceEdgeLength)
ge->setTooSmall(true); ge->setTooSmall(true);
// Integrate detJ/lc du // Integrate detJ/lc du
double a; double a;
int N; int N;
if (ge->degenerate(0)){ if(length == 0. && CTX::instance()->mesh.toleranceEdgeLength == 0.){
Msg::Error("Curve %d has a zero length", ge->tag());
a = 0;
N = 1;
}
else if(ge->degenerate(0)){
a = 0.; a = 0.;
N = 1; N = 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment