mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
Skip SplitImproveEdge if it would insert tets with negative volume
This commit is contained in:
parent
75fbd86a7a
commit
4d04dcd97d
@ -546,6 +546,9 @@ double MeshOptimize3d :: SplitImproveEdge (Table<ElementIndex,PointIndex> & elem
|
|||||||
if (!mesh.LegalTet (oldel)) bad1 += GetLegalPenalty();
|
if (!mesh.LegalTet (oldel)) bad1 += GetLegalPenalty();
|
||||||
if (!mesh.LegalTet (newel1)) bad2 += GetLegalPenalty();
|
if (!mesh.LegalTet (newel1)) bad2 += GetLegalPenalty();
|
||||||
if (!mesh.LegalTet (newel2)) bad2 += GetLegalPenalty();
|
if (!mesh.LegalTet (newel2)) bad2 += GetLegalPenalty();
|
||||||
|
|
||||||
|
if( newel1.Volume(mesh.Points()) < 0.0 || newel2.Volume(mesh.Points()) < 0.0)
|
||||||
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_badness = bad2-bad1;
|
d_badness = bad2-bad1;
|
||||||
|
Loading…
Reference in New Issue
Block a user