The file smoothing2.cpp (class Opti2SurfaceMinFunction) has a check, which if fails, outputs a string "very very bad badness". Trying to analyze the root-cause of this message on a seemingly fine shape I came to a suspicion if the check misses the absolute value. Instead of:
double e1l = e1.Length();
if (Determinant(e1, e2, n) > 1e-8 * e1l * e2.Length())
…
shouldn't it rather use
if (fabs (Determinant(e1, e2, n)) > 1e-8 * e1l * e2.Length())
…
Any thoughts from the experienced users or developer team?
Thanks,
Roman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Joachim!
The reason I'm asking is that this warning is output quite frequently yet the final mesh is fine.
Here is one of the simplest cases I could identify (link) - a planar rectangle 10x10.
When meshing with moderate grading, max size 3.5, there are about a dozen of these warnings in the test.out file (also enclosed). These are visible via using API only and are not visible via Netgen GUI.
Hope this can help you verify what's going on internally (I have not had time to do this myself though).
Thanks again,
Roman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The file smoothing2.cpp (class Opti2SurfaceMinFunction) has a check, which if fails, outputs a string "very very bad badness". Trying to analyze the root-cause of this message on a seemingly fine shape I came to a suspicion if the check misses the absolute value. Instead of:
double e1l = e1.Length();
if (Determinant(e1, e2, n) > 1e-8 * e1l * e2.Length())
…
shouldn't it rather use
if (fabs (Determinant(e1, e2, n)) > 1e-8 * e1l * e2.Length())
…
Any thoughts from the experienced users or developer team?
Thanks,
Roman
It's correct. Elements with negative orientation are considered as elements with very bad shape.
Thanks Joachim!
The reason I'm asking is that this warning is output quite frequently yet the final mesh is fine.
Here is one of the simplest cases I could identify (link) - a planar rectangle 10x10.
When meshing with moderate grading, max size 3.5, there are about a dozen of these warnings in the test.out file (also enclosed). These are visible via using API only and are not visible via Netgen GUI.
Hope this can help you verify what's going on internally (I have not had time to do this myself though).
Thanks again,
Roman