Merge branch 'master' of geras.asc.tuwien.ac.at:jschoeberl/netgen

This commit is contained in:
Joachim Schöberl 2019-10-04 13:49:32 +02:00
commit 34ef87a706
12 changed files with 208 additions and 117 deletions

View File

@ -65,6 +65,7 @@ test_win:
<<: *win <<: *win
stage: test stage: test
script: script:
- cd tests\pytest
- cd %NETGEN_BUILD_DIR%\netgen - cd %NETGEN_BUILD_DIR%\netgen
- ctest -C Release -V --output-on-failure - ctest -C Release -V --output-on-failure
- cd .. - cd ..

View File

@ -77,8 +77,6 @@ namespace netgen
NgArray<int> tets_in_qualclass;
mutex tcl_todo_mutex; mutex tcl_todo_mutex;
int h_argc = 0; int h_argc = 0;

View File

@ -27,8 +27,6 @@ namespace netgen
// extern DLL_HEADER MeshingParameters mparam; // extern DLL_HEADER MeshingParameters mparam;
DLL_HEADER extern NgArray<int> tets_in_qualclass;
DLL_HEADER extern mutex tcl_todo_mutex; DLL_HEADER extern mutex tcl_todo_mutex;
class DLL_HEADER multithreadt class DLL_HEADER multithreadt

View File

@ -198,7 +198,7 @@ void MeshOptimize3d :: CombineImproveSequential (Mesh & mesh,
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
totalbad = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); totalbad = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << totalbad << endl; (*testout) << "Total badness = " << totalbad << endl;
PrintMessage (5, "Total badness = ", totalbad); PrintMessage (5, "Total badness = ", totalbad);
} }
@ -395,7 +395,7 @@ void MeshOptimize3d :: CombineImproveSequential (Mesh & mesh,
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
totalbad = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); totalbad = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << totalbad << endl; (*testout) << "Total badness = " << totalbad << endl;
int cntill = 0; int cntill = 0;
@ -511,7 +511,7 @@ void MeshOptimize3d :: CombineImprove (Mesh & mesh,
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
totalbad = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); totalbad = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << totalbad << endl; (*testout) << "Total badness = " << totalbad << endl;
} }
@ -565,7 +565,7 @@ void MeshOptimize3d :: CombineImprove (Mesh & mesh,
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
totalbad = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); totalbad = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << totalbad << endl; (*testout) << "Total badness = " << totalbad << endl;
int cntill = 0; int cntill = 0;
@ -642,7 +642,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
} }
@ -864,7 +864,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
int cntill = 0; int cntill = 0;
@ -925,7 +925,7 @@ void MeshOptimize3d :: SwapImproveSequential (Mesh & mesh, OPTIMIZEGOAL goal,
// Calculate total badness // Calculate total badness
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
} }
@ -2420,7 +2420,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
// Calculate total badness // Calculate total badness
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
double bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); double bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
} }
@ -3527,7 +3527,7 @@ void MeshOptimize3d :: SwapImprove2Sequential (Mesh & mesh, OPTIMIZEGOAL goal)
// Calculate total badness // Calculate total badness
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
cout << "tot bad = " << bad1 << endl; cout << "tot bad = " << bad1 << endl;
@ -3582,7 +3582,7 @@ void MeshOptimize3d :: SwapImprove2Sequential (Mesh & mesh, OPTIMIZEGOAL goal)
*/ */
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
(*testout) << "swapimprove2 done" << "\n"; (*testout) << "swapimprove2 done" << "\n";
// (*mycout) << "Vol = " << CalcVolume (points, volelements) << "\n"; // (*mycout) << "Vol = " << CalcVolume (points, volelements) << "\n";
@ -3611,7 +3611,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal)
PrintMessage (3, "SwapImprove2 "); PrintMessage (3, "SwapImprove2 ");
(*testout) << "\n" << "Start SwapImprove2" << "\n"; (*testout) << "\n" << "Start SwapImprove2" << "\n";
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
// find elements on node // find elements on node
@ -3668,7 +3668,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal)
PrintMessage (5, cnt, " swaps performed"); PrintMessage (5, cnt, " swaps performed");
bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
(*testout) << "swapimprove2 done" << "\n"; (*testout) << "swapimprove2 done" << "\n";
} }

View File

@ -3932,6 +3932,44 @@ namespace netgen
return 1; return 1;
} }
double Mesh :: CalcTotalBad (const MeshingParameters & mp )
{
static Timer t("CalcTotalBad"); RegionTimer reg(t);
static constexpr int n_classes = 20;
double sum = 0;
tets_in_qualclass.SetSize(n_classes);
tets_in_qualclass = 0;
ParallelForRange( IntRange(volelements.Size()), [&] (auto myrange)
{
double local_sum = 0.0;
double teterrpow = mp.opterrpow;
std::array<int,n_classes> classes_local{};
for (auto i : myrange)
{
double elbad = pow (max2(CalcBad (points, volelements[i], 0, mp),1e-10), 1/teterrpow);
int qualclass = int (n_classes / elbad + 1);
if (qualclass < 1) qualclass = 1;
if (qualclass > n_classes) qualclass = n_classes;
classes_local[qualclass-1]++;
local_sum += elbad;
}
AtomicAdd(sum, local_sum);
for (auto i : Range(n_classes))
AsAtomic(tets_in_qualclass[i]) += classes_local[i];
});
return sum;
}

View File

@ -62,6 +62,8 @@ namespace netgen
/// open segmenets for surface meshing /// open segmenets for surface meshing
NgArray<Segment> opensegments; NgArray<Segment> opensegments;
Array<int> tets_in_qualclass;
/** /**
@ -559,6 +561,10 @@ namespace netgen
*/ */
void FreeOpenElementsEnvironment (int layers); void FreeOpenElementsEnvironment (int layers);
DLL_HEADER double CalcTotalBad (const MeshingParameters & mp);
FlatArray<int> GetQualityHistogram() { return tets_in_qualclass; }
/// ///
bool LegalTet (Element & el) const bool LegalTet (Element & el) const
{ {

View File

@ -983,6 +983,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
res["tet"] = py::make_tuple( values[2], values[3] ); res["tet"] = py::make_tuple( values[2], values[3] );
return res; return res;
}, py::arg("badelement_limit")=175.0) }, py::arg("badelement_limit")=175.0)
.def ("CalcTotalBadness", &Mesh::CalcTotalBad)
.def ("GetQualityHistogram", &Mesh::GetQualityHistogram)
; ;
m.def("ImportMesh", [](const string& filename) m.def("ImportMesh", [](const string& filename)

View File

@ -930,46 +930,6 @@ double Opti3EdgeMinFunction :: FuncGrad (const Vector & x, Vector & grad) const
double CalcTotalBad (const Mesh::T_POINTS & points,
const Array<Element> & elements,
const MeshingParameters & mp)
{
static Timer t("CalcTotalBad"); RegionTimer reg(t);
static constexpr int n_classes = 20;
double sum = 0;
tets_in_qualclass.SetSize(n_classes);
tets_in_qualclass = 0;
ParallelForRange( IntRange(elements.Size()), [&] (auto myrange) {
double local_sum = 0.0;
double teterrpow = mp.opterrpow;
std::array<int,n_classes> classes_local{};
for (auto i : myrange)
{
double elbad = pow (max2(CalcBad (points, elements[i], 0, mp),1e-10),
1/teterrpow);
int qualclass = int (n_classes / elbad + 1);
if (qualclass < 1) qualclass = 1;
if (qualclass > n_classes) qualclass = n_classes;
classes_local[qualclass-1]++;
local_sum += elbad;
}
AtomicAdd(sum, local_sum);
for (auto i : Range(n_classes))
AsAtomic(tets_in_qualclass[i]) += classes_local[i];
});
return sum;
}
int WrongOrientation (const Mesh::T_POINTS & points, const Element & el) int WrongOrientation (const Mesh::T_POINTS & points, const Element & el)
{ {
const Point3d & p1 = points[el.PNum(1)]; const Point3d & p1 = points[el.PNum(1)];
@ -1383,7 +1343,7 @@ void Mesh :: ImproveMeshSequential (const MeshingParameters & mp, OPTIMIZEGOAL g
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
double bad1 = CalcTotalBad (points, volelements, mp); double bad1 = CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
PrintMessage (5, "Total badness = ", bad1); PrintMessage (5, "Total badness = ", bad1);
} }
@ -1485,7 +1445,7 @@ void Mesh :: ImproveMeshSequential (const MeshingParameters & mp, OPTIMIZEGOAL g
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
double bad1 = CalcTotalBad (points, volelements, mp); double bad1 = CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
PrintMessage (5, "Total badness = ", bad1); PrintMessage (5, "Total badness = ", bad1);
} }
@ -1536,7 +1496,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
double bad1 = CalcTotalBad (points, volelements, mp); double bad1 = CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
PrintMessage (5, "Total badness = ", bad1); PrintMessage (5, "Total badness = ", bad1);
} }
@ -1631,7 +1591,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
if (goal == OPT_QUALITY) if (goal == OPT_QUALITY)
{ {
double bad1 = CalcTotalBad (points, volelements, mp); double bad1 = CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl; (*testout) << "Total badness = " << bad1 << endl;
PrintMessage (5, "Total badness = ", bad1); PrintMessage (5, "Total badness = ", bad1);
} }

View File

@ -73,7 +73,6 @@
#include "ShapeUpgrade_ShellSewing.hxx" #include "ShapeUpgrade_ShellSewing.hxx"
#include "ShapeFix_Shape.hxx" #include "ShapeFix_Shape.hxx"
#include "ShapeFix_Wireframe.hxx" #include "ShapeFix_Wireframe.hxx"
#include "BRepMesh.hxx"
#include "BRepMesh_IncrementalMesh.hxx" #include "BRepMesh_IncrementalMesh.hxx"
#include "BRepBndLib.hxx" #include "BRepBndLib.hxx"
#include "Bnd_Box.hxx" #include "Bnd_Box.hxx"

View File

@ -687,12 +687,24 @@ namespace netgen
Tcl_SetVar (interp, "::status_ne", buf, 0); Tcl_SetVar (interp, "::status_ne", buf, 0);
sprintf (buf, "%u", unsigned(mesh->GetNSE())); sprintf (buf, "%u", unsigned(mesh->GetNSE()));
Tcl_SetVar (interp, "::status_nse", buf, 0); Tcl_SetVar (interp, "::status_nse", buf, 0);
auto tets_in_qualclass = mesh->GetQualityHistogram();
lstring[0] = 0;
for (int i = 0; i < tets_in_qualclass.Size(); i++)
{
sprintf (buf, " %d", tets_in_qualclass[i]);
strcat (lstring, buf);
}
for (int i = tets_in_qualclass.Size(); i < 20; i++)
strcat (lstring, " 0");
Tcl_SetVar (interp, "::status_tetqualclasses", lstring, 0);
} }
else else
{ {
Tcl_SetVar (interp, "::status_np", "0", 0); Tcl_SetVar (interp, "::status_np", "0", 0);
Tcl_SetVar (interp, "::status_ne", "0", 0); Tcl_SetVar (interp, "::status_ne", "0", 0);
Tcl_SetVar (interp, "::status_nse", "0", 0); Tcl_SetVar (interp, "::status_nse", "0", 0);
Tcl_SetVar (interp, "::status_tetqualclasses", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", 0);
} }
if (multithread.running) if (multithread.running)
@ -704,16 +716,6 @@ namespace netgen
sprintf (buf, "%lf", multithread.percent); sprintf (buf, "%lf", multithread.percent);
Tcl_SetVar (interp, "::status_percent", buf, 0); Tcl_SetVar (interp, "::status_percent", buf, 0);
lstring[0] = 0;
for (int i = 1; i <= tets_in_qualclass.Size(); i++)
{
sprintf (buf, " %d", tets_in_qualclass.Get(i));
strcat (lstring, buf);
}
for (int i = tets_in_qualclass.Size()+1; i <= 20; i++)
strcat (lstring, " 0");
Tcl_SetVar (interp, "::status_tetqualclasses", lstring, 0);
{ {
lock_guard<mutex> guard(tcl_todo_mutex); lock_guard<mutex> guard(tcl_todo_mutex);
if (multithread.tcl_todo->length()) if (multithread.tcl_todo->length())

View File

@ -1,36 +1,108 @@
number_elements = {} number_elements = {}
number_elements['cylsphere.geo'] = (706,231,490,706,2797,17554) total_badness = {}
number_elements['cubeandspheres.geo'] = (98,100,98,98,366,1078) quality_histogram = {}
number_elements['ellipsoid.geo'] = (1271,551,595,1268,5607,38173) number_elements['boundarycondition.geo'] = (50,22,22,50,165,507)
number_elements['manyholes2.geo'] = (128244) total_badness['boundarycondition.geo'] = (74.77455382627932,35.1615287684931,35.09828878797806,74.77454941022566,228.72078637426984,661.0081780927665)
number_elements['sculpture.geo'] = (477,140,260,477,1330,6769) quality_histogram['boundarycondition.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 5, 8, 13, 3, 9, 5, 0, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 4, 0, 0, 8, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 4, 0, 0, 8, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 5, 8, 13, 3, 9, 5, 0, 1, 1],[0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 5, 13, 13, 25, 31, 25, 20, 17, 12, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9, 20, 35, 56, 56, 81, 90, 83, 59, 15])
number_elements['ortho.geo'] = (6,6,6,6,34,180) number_elements['boxcyl.geo'] = (858,158,384,850,3761,18969)
number_elements['ellipticcone.geo'] = (4973,573,1765,4918,13410,70483) total_badness['boxcyl.geo'] = (1232.0426735126875,247.68310335779472,598.9983304416592,1214.2298930472489,4693.120852548444,23072.83352747196)
number_elements['cube.geo'] = (6,6,6,6,28,178) quality_histogram['boxcyl.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 2, 31, 91, 73, 79, 87, 106, 114, 102, 89, 66, 18],[0, 0, 0, 0, 0, 1, 1, 7, 10, 16, 5, 8, 15, 13, 17, 13, 9, 25, 7, 11],[0, 0, 1, 0, 3, 3, 3, 6, 11, 17, 21, 28, 34, 44, 68, 64, 49, 19, 11, 2],[0, 0, 0, 0, 0, 0, 0, 0, 2, 29, 87, 73, 75, 86, 106, 97, 112, 87, 75, 21],[0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 20, 59, 118, 250, 456, 628, 751, 755, 564, 153],[0, 0, 0, 0, 0, 0, 0, 5, 8, 15, 43, 130, 353, 876, 1713, 3018, 4122, 4317, 3271, 1098])
number_elements['twobricks.geo'] = (42,22,22,42,177,595) number_elements['circle_on_cube.geo'] = (646,46,182,621,2054,11988)
number_elements['revolution.geo'] = (8310,1249,3856,8269,33078,202941) total_badness['circle_on_cube.geo'] = (859.4388188262326,97.32623111178621,258.40643290234414,804.6856206512356,2526.4427939235775,14608.275961981739)
number_elements['circle_on_cube.geo'] = (636,39,189,631,2035,12237) quality_histogram['circle_on_cube.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 10, 23, 48, 81, 117, 100, 123, 86, 43, 10],[0, 0, 0, 0, 0, 2, 2, 4, 8, 8, 6, 7, 5, 1, 2, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 14, 21, 35, 35, 33, 19, 9, 8, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 11, 45, 59, 93, 114, 121, 104, 53, 14],[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 15, 57, 129, 210, 330, 426, 450, 321, 109],[0, 0, 0, 0, 0, 0, 0, 1, 2, 17, 33, 82, 226, 556, 1140, 1929, 2512, 2801, 2061, 628])
number_elements['sphereincube.geo'] = (508,173,339,515,1652,13829) number_elements['cone.geo'] = (1231,753,755,1208,4423,27126)
number_elements['twocubes.geo'] = (42,22,22,42,177,595) total_badness['cone.geo'] = (1853.3096959109166,2038.8171749591982,2283.6586444340996,1783.4859473632036,5769.994684811694,33434.66391104773)
number_elements['boundarycondition.geo'] = (39,22,22,39,165,508) quality_histogram['cone.geo'] = ([0, 0, 0, 0, 0, 1, 8, 22, 29, 50, 88, 118, 123, 158, 175, 140, 137, 111, 52, 19],[0, 1, 28, 40, 63, 54, 61, 53, 61, 59, 67, 47, 38, 52, 39, 23, 27, 21, 16, 3],[1, 33, 42, 29, 32, 26, 29, 27, 64, 81, 73, 80, 67, 48, 55, 18, 23, 16, 11, 0],[0, 0, 0, 0, 0, 1, 2, 15, 22, 47, 81, 110, 131, 144, 172, 150, 145, 112, 62, 14],[0, 0, 0, 0, 0, 0, 0, 1, 4, 35, 88, 158, 276, 400, 584, 726, 802, 735, 464, 150],[0, 0, 0, 0, 0, 0, 0, 3, 13, 31, 83, 303, 735, 1519, 2944, 4316, 5668, 5807, 4355, 1349])
number_elements['ellipticcyl.geo'] = (2202,324,1106,2190,8245,55199) number_elements['cube.geo'] = (6,6,6,6,57,184)
number_elements['trafo.geo'] = (5154,1358,2389,5141,17948,92850) total_badness['cube.geo'] = (9.140127286902135,9.140127286902135,9.140127286902135,9.140127286902137,84.41688347277622,241.24676971944592)
number_elements['boxcyl.geo'] = (843,146,364,843,3700,18677) quality_histogram['cube.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 12, 14, 4, 12, 2, 2, 3, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 10, 7, 19, 18, 37, 33, 33, 14, 6])
number_elements['sphere.geo'] = (126,56,80,126,347,2342) number_elements['cubeandring.geo'] = (2188,252,613,2054,7752,38282)
number_elements['torus.geo'] = (5520,2171,2739,5510,25402,177967) total_badness['cubeandring.geo'] = (4412.194135842449,365.81827351160507,897.5465886947072,3795.4750392740707,9761.706516470002,46825.77798326433)
number_elements['shaft.geo'] = (2609,808,1666,2594,11226,64172) quality_histogram['cubeandring.geo'] = ([1, 9, 25, 36, 90, 100, 108, 114, 90, 73, 63, 100, 149, 190, 251, 264, 241, 168, 96, 20],[0, 0, 0, 0, 0, 1, 1, 2, 1, 3, 8, 24, 28, 49, 38, 41, 29, 19, 7, 1],[0, 0, 0, 0, 2, 0, 0, 4, 3, 17, 49, 47, 61, 93, 110, 82, 52, 60, 28, 5],[0, 3, 12, 28, 61, 84, 109, 97, 80, 55, 48, 68, 112, 166, 245, 277, 249, 212, 116, 32],[0, 0, 0, 0, 0, 2, 1, 9, 13, 27, 56, 136, 281, 548, 921, 1256, 1534, 1557, 1091, 320],[0, 0, 0, 0, 0, 0, 0, 3, 10, 28, 117, 334, 795, 2026, 3889, 5942, 8057, 8537, 6447, 2097])
number_elements['cone.geo'] = (1215,447,678,1211,4404,27336) number_elements['cubeandspheres.geo'] = (98,100,98,98,365,1080)
number_elements['cubeandring.geo'] = (2014,231,612,1988,7671,38095) total_badness['cubeandspheres.geo'] = (145.83375109036504,146.64686099828145,145.14580661611535,145.83375109036504,553.0336207649647,1684.1500639342994)
number_elements['manyholes.geo'] = (176503,28896,70408) quality_histogram['cubeandspheres.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 3, 4, 18, 19, 13, 20, 2, 9, 1, 0],[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 10, 16, 18, 15, 17, 6, 5, 4, 0],[0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 6, 19, 21, 12, 18, 5, 4, 4, 0],[0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 3, 4, 18, 19, 13, 20, 2, 9, 1, 0],[0, 0, 0, 0, 0, 0, 0, 2, 6, 24, 31, 43, 39, 53, 35, 44, 51, 28, 9, 0],[0, 0, 0, 0, 0, 1, 2, 19, 59, 37, 100, 136, 100, 123, 162, 160, 66, 65, 28, 22])
number_elements['period.geo'] = (3263,574,1349,3236,11645,68523) number_elements['cubemcyl.geo'] = (20940,3203,8421,19608,88843,521218)
number_elements['lshape3d.geo'] = (18,12,12,18,93,335) total_badness['cubemcyl.geo'] = (29036.424266882583,4539.317490840601,11848.69595029201,25605.226152652813,109927.85825761271,633985.7169497084)
number_elements['cubemsphere.geo'] = (4708,773,1460,4667,17655,114554) quality_histogram['cubemcyl.geo'] = ([0, 0, 0, 0, 0, 0, 22, 78, 213, 367, 738, 1237, 1875, 2588, 3120, 3314, 3117, 2521, 1385, 365],[0, 0, 0, 0, 0, 0, 3, 12, 17, 66, 128, 250, 364, 425, 515, 512, 463, 282, 137, 29],[0, 0, 0, 0, 0, 0, 7, 30, 87, 181, 362, 596, 792, 1120, 1271, 1262, 1165, 892, 516, 140],[0, 0, 0, 0, 0, 0, 2, 6, 40, 75, 246, 608, 1243, 2030, 2896, 3459, 3612, 2986, 1887, 518],[0, 0, 0, 0, 0, 0, 0, 0, 23, 113, 364, 946, 2450, 5445, 10022, 14690, 18368, 18746, 13521, 4155],[0, 0, 0, 0, 0, 0, 1, 25, 119, 374, 1224, 3269, 9296, 24328, 50521, 82283, 109285, 119759, 91721, 29013])
number_elements['twocyl.geo'] = (578,147,403,578,1887,13537) number_elements['cubemsphere.geo'] = (4877,783,1571,4583,17783,113522)
number_elements['cubemcyl.geo'] = (19712,3225,8153,19438,89202,524684) total_badness['cubemsphere.geo'] = (6790.976698979519,1271.4564508216417,2230.3744520291,5995.40689674042,22085.583903145787,138835.89330335165)
number_elements['matrix.geo'] = (5207,1888,2790,5149,16205,101146) quality_histogram['cubemsphere.geo'] = ([0, 0, 0, 0, 0, 1, 6, 28, 55, 96, 194, 261, 445, 559, 740, 798, 698, 576, 333, 87],[0, 0, 0, 0, 1, 2, 6, 19, 38, 61, 70, 94, 100, 91, 104, 76, 58, 38, 24, 1],[0, 0, 0, 0, 0, 0, 1, 5, 12, 20, 68, 134, 170, 243, 246, 237, 214, 145, 59, 17],[0, 0, 0, 0, 0, 0, 0, 4, 9, 25, 77, 128, 251, 516, 657, 826, 857, 685, 432, 116],[0, 0, 0, 0, 0, 0, 0, 3, 11, 31, 90, 203, 496, 1110, 1957, 3109, 3695, 3723, 2641, 714],[0, 0, 0, 0, 0, 0, 1, 9, 35, 117, 341, 885, 2307, 5764, 11384, 18322, 23667, 25754, 19043, 5893])
number_elements['fichera.geo'] = (35,18,18,35,209,496) number_elements['cylinder.geo'] = (413,103,437,411,1155,8102)
number_elements['cylinder.geo'] = (404,101,256,404,1161,8076) total_badness['cylinder.geo'] = (584.636409084562,127.27629078004027,1146.6341650071872,574.3453767078119,1536.3995031371464,9877.101056586194)
number_elements['part1.stl'] = (1228,620,727,1216,1548,3498) quality_histogram['cylinder.geo'] = ([0, 0, 0, 0, 0, 0, 0, 1, 2, 10, 18, 31, 43, 56, 76, 61, 45, 47, 18, 5],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 14, 21, 32, 10, 1],[0, 0, 14, 22, 37, 32, 30, 36, 31, 29, 34, 25, 27, 28, 22, 16, 33, 9, 9, 3],[0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 15, 29, 37, 61, 76, 59, 48, 52, 21, 3],[0, 0, 0, 0, 0, 0, 0, 1, 3, 10, 16, 50, 99, 120, 164, 206, 224, 139, 105, 18],[0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 13, 53, 167, 414, 787, 1233, 1788, 1856, 1334, 453])
number_elements['hinge.stl'] = (1995,1399,1532,1987,2881,4621) number_elements['cylsphere.geo'] = (711,225,665,709,2865,17765)
number_elements['frame.step'] = (195213,30333,58955) total_badness['cylsphere.geo'] = (1105.79919259997,584.4242683103591,1528.697375188064,1092.2233628961833,3710.2873989997815,21668.18084327247)
number_elements['screw.step'] = (2021,7011,23730) quality_histogram['cylsphere.geo'] = ([0, 0, 0, 0, 0, 0, 3, 10, 16, 35, 64, 89, 107, 102, 100, 57, 59, 50, 17, 2],[0, 0, 1, 13, 20, 34, 20, 21, 7, 6, 2, 8, 13, 18, 10, 23, 13, 7, 9, 0],[0, 1, 9, 14, 21, 37, 57, 76, 63, 57, 53, 60, 32, 54, 23, 35, 39, 16, 13, 5],[0, 0, 0, 0, 0, 0, 3, 6, 15, 27, 62, 89, 110, 109, 90, 68, 66, 45, 15, 4],[0, 0, 0, 0, 0, 0, 0, 3, 3, 28, 44, 88, 157, 276, 340, 471, 505, 493, 358, 99],[0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 48, 129, 362, 859, 1699, 2843, 3786, 4041, 3023, 954])
number_elements['ellipsoid.geo'] = (1262,942,598,1256,5592,41345)
total_badness['ellipsoid.geo'] = (1984.8094938967738,5747.520443762867,903.6523661521342,1908.0512059728062,7199.786784319063,56476.64849160909)
quality_histogram['ellipsoid.geo'] = ([0, 0, 0, 0, 1, 0, 8, 26, 39, 86, 118, 127, 178, 146, 148, 147, 107, 76, 43, 12],[22, 148, 137, 126, 91, 56, 81, 69, 47, 36, 29, 32, 23, 13, 12, 9, 5, 5, 1, 0],[0, 0, 0, 0, 0, 0, 1, 5, 15, 17, 44, 69, 81, 100, 91, 53, 54, 39, 20, 9],[0, 0, 0, 0, 0, 0, 0, 18, 35, 52, 103, 128, 169, 173, 155, 154, 121, 81, 49, 18],[0, 0, 0, 0, 0, 0, 0, 0, 3, 22, 74, 178, 307, 491, 711, 944, 1067, 921, 675, 199],[0, 0, 0, 0, 3, 20, 108, 266, 403, 644, 1110, 1904, 2921, 4621, 6100, 6869, 6568, 5527, 3324, 957])
number_elements['ellipticcone.geo'] = (5213,587,1780,4971,13441,69596)
total_badness['ellipticcone.geo'] = (6957.997335964581,853.7762583986572,2537.0484181636543,6359.4493283262245,17201.441953759855,85930.2271725273)
quality_histogram['ellipticcone.geo'] = ([0, 0, 0, 0, 0, 0, 1, 7, 26, 47, 141, 216, 357, 555, 760, 902, 879, 712, 459, 151],[0, 0, 0, 0, 0, 0, 3, 8, 8, 14, 33, 55, 67, 67, 76, 85, 69, 56, 32, 14],[0, 0, 0, 1, 3, 4, 12, 22, 34, 43, 79, 96, 136, 191, 227, 251, 258, 253, 129, 41],[0, 0, 0, 0, 0, 0, 0, 1, 3, 17, 53, 107, 248, 431, 665, 897, 978, 791, 593, 187],[0, 0, 0, 0, 0, 0, 1, 8, 29, 62, 198, 341, 643, 1044, 1682, 2259, 2506, 2486, 1671, 511],[0, 0, 0, 0, 0, 0, 1, 5, 40, 121, 306, 826, 1862, 3802, 7575, 11204, 14503, 14913, 11126, 3312])
number_elements['ellipticcyl.geo'] = (2275,325,1114,2199,8225,55078)
total_badness['ellipticcyl.geo'] = (3156.3970604957917,459.390405230032,1483.3007517785577,2944.2434449093485,10297.19192531407,66822.93034041145)
quality_histogram['ellipticcyl.geo'] = ([0, 0, 0, 0, 0, 0, 1, 10, 26, 44, 84, 125, 208, 263, 341, 376, 326, 261, 175, 35],[0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 18, 28, 26, 37, 71, 54, 46, 27, 10, 2],[0, 0, 0, 0, 0, 0, 0, 0, 3, 10, 17, 41, 80, 144, 172, 205, 165, 155, 97, 25],[0, 0, 0, 0, 0, 0, 1, 2, 8, 35, 43, 95, 163, 238, 314, 377, 378, 307, 193, 45],[0, 0, 0, 0, 0, 0, 0, 3, 5, 9, 46, 106, 269, 605, 988, 1459, 1629, 1655, 1138, 313],[0, 0, 0, 0, 0, 0, 0, 1, 10, 28, 97, 356, 939, 2483, 5114, 8528, 11618, 12908, 9908, 3088])
number_elements['fichera.geo'] = (40,18,18,40,208,514)
total_badness['fichera.geo'] = (62.36199688281094,26.546480074510768,26.546480074510768,62.361996882810935,266.19865609610633,666.6750726869872)
quality_histogram['fichera.geo'] = ([0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 2, 4, 3, 5, 7, 8, 2, 1, 0, 2],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 6, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 6, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 2, 4, 3, 5, 7, 8, 2, 1, 0, 2],[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 6, 10, 16, 24, 36, 33, 41, 30, 6],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 14, 32, 55, 87, 97, 91, 71, 52, 13])
number_elements['frame.step'] = (220900,30129,85945)
total_badness['frame.step'] = (300459.83411975694,44750.50972353135,118266.27326084932)
quality_histogram['frame.step'] = ([2, 7, 7, 9, 9, 30, 241, 749, 1682, 3420, 6081, 10465, 17172, 25221, 31864, 35916, 35505, 29651, 18174, 4695],[4, 4, 5, 11, 20, 39, 120, 287, 625, 1025, 1680, 2536, 3358, 4124, 4521, 4195, 3479, 2399, 1359, 338],[1, 6, 3, 11, 7, 34, 76, 195, 480, 1081, 2528, 4819, 7807, 11027, 13498, 14054, 12911, 10078, 5893, 1436])
number_elements['hinge.stl'] = (1990,1389,1530,1988,2903,4609)
total_badness['hinge.stl'] = (2772.615463550591,2178.566325869092,2364.3186940730393,2747.7705529808827,3701.663382426159,5628.251412240825)
quality_histogram['hinge.stl'] = ([0, 0, 0, 0, 1, 2, 3, 9, 21, 47, 69, 116, 164, 237, 326, 280, 298, 225, 151, 41],[0, 0, 0, 0, 2, 5, 18, 35, 47, 74, 111, 126, 131, 179, 189, 185, 134, 93, 46, 14],[0, 0, 0, 0, 0, 7, 14, 43, 46, 79, 94, 164, 155, 163, 212, 180, 180, 118, 61, 14],[0, 0, 0, 0, 0, 2, 2, 5, 19, 39, 62, 112, 177, 236, 314, 304, 295, 236, 140, 45],[0, 0, 0, 0, 0, 0, 0, 3, 4, 13, 31, 64, 136, 221, 397, 484, 533, 504, 399, 114],[0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 14, 45, 103, 220, 448, 693, 963, 1055, 803, 257])
number_elements['lshape3d.geo'] = (18,12,12,18,88,331)
total_badness['lshape3d.geo'] = (27.289065400982963,18.9614815145502,18.9614815145502,27.289065400982963,121.12718489787706,443.95235946678145)
quality_histogram['lshape3d.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 12, 0, 3, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 6, 1, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 6, 1, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 12, 0, 3, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 10, 9, 21, 23, 7, 6, 1, 4],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 21, 26, 41, 39, 61, 57, 46, 24, 7])
number_elements['manyholes.geo'] = (179405,29184,70789)
total_badness['manyholes.geo'] = (238774.1757941998,42098.72126770701,100213.31675908854)
quality_histogram['manyholes.geo'] = ([0, 0, 2, 1, 8, 27, 65, 207, 559, 1418, 3370, 7627, 12710, 20134, 27407, 30177, 29994, 24813, 16843, 4043],[0, 0, 0, 1, 5, 26, 45, 181, 387, 817, 1524, 2280, 3331, 4394, 4120, 3700, 3202, 2567, 1880, 724],[0, 0, 0, 2, 30, 78, 189, 443, 837, 1706, 2919, 4402, 7061, 9455, 10197, 10269, 9498, 7395, 4474, 1834])
number_elements['manyholes2.geo'] = (128088)
total_badness['manyholes2.geo'] = (176960.0270623914)
quality_histogram['manyholes2.geo'] = ([0, 0, 0, 0, 7, 30, 95, 288, 823, 2105, 4573, 7847, 11840, 18008, 18739, 18350, 16782, 14747, 10264, 3590])
number_elements['matrix.geo'] = (5295,2001,2783,5105,16255,100388)
total_badness['matrix.geo'] = (9761.595421063283,4865.580334425541,5980.102256692753,9068.007640805426,21663.043544618693,124129.9526659235)
quality_histogram['matrix.geo'] = ([0, 0, 32, 147, 135, 100, 130, 147, 177, 237, 361, 409, 554, 617, 583, 555, 457, 385, 212, 57],[0, 3, 20, 65, 122, 160, 137, 169, 184, 189, 172, 190, 184, 137, 89, 53, 45, 54, 20, 8],[0, 0, 13, 51, 108, 146, 173, 161, 225, 265, 333, 287, 211, 205, 173, 161, 117, 93, 45, 16],[0, 0, 20, 134, 116, 78, 117, 149, 152, 188, 285, 371, 498, 547, 578, 611, 503, 441, 254, 63],[0, 0, 0, 0, 0, 5, 24, 75, 128, 202, 346, 678, 1062, 1517, 2149, 2515, 2754, 2540, 1722, 538],[0, 0, 0, 0, 0, 1, 6, 24, 71, 195, 503, 1186, 2824, 5989, 10497, 16251, 20497, 21258, 16049, 5037])
number_elements['ortho.geo'] = (6,6,6,6,57,180)
total_badness['ortho.geo'] = (9.140127286902135,9.140127286902135,9.140127286902135,9.140127286902135,83.06080967252274,233.34798934128858)
quality_histogram['ortho.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 8, 9, 8, 14, 5, 3, 1, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 14, 9, 27, 39, 31, 30, 17, 5])
number_elements['part1.stl'] = (1228,629,758,1180,1516,3545)
total_badness['part1.stl'] = (1672.637935798938,1030.3136744801673,1097.0227587874047,1563.838689712767,1957.4591373369915,4425.483014010064)
quality_histogram['part1.stl'] = ([0, 0, 0, 0, 0, 0, 1, 5, 5, 20, 38, 51, 111, 128, 195, 211, 190, 152, 90, 31],[0, 0, 0, 0, 1, 4, 13, 14, 23, 44, 56, 74, 86, 82, 70, 72, 36, 38, 10, 6],[0, 0, 0, 0, 0, 0, 0, 3, 10, 24, 33, 62, 90, 103, 138, 113, 90, 60, 22, 10],[0, 0, 0, 0, 0, 0, 0, 3, 4, 12, 16, 43, 89, 116, 178, 208, 222, 153, 99, 37],[0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 20, 50, 73, 141, 210, 280, 272, 238, 170, 55],[0, 0, 0, 0, 0, 0, 0, 2, 6, 12, 20, 44, 109, 246, 424, 580, 665, 742, 515, 180])
number_elements['period.geo'] = (3294,659,1593,3209,11824,68383)
total_badness['period.geo'] = (4918.043403462622,1346.7559431607624,3241.6735554559423,4660.401219394114,15109.078091558415,84181.20294002682)
quality_histogram['period.geo'] = ([0, 0, 0, 0, 0, 11, 22, 35, 81, 112, 210, 253, 402, 409, 494, 439, 371, 274, 135, 46],[0, 4, 8, 11, 15, 22, 23, 30, 40, 58, 66, 57, 66, 59, 57, 36, 43, 42, 16, 6],[0, 0, 21, 30, 45, 47, 61, 92, 104, 145, 141, 138, 146, 148, 134, 114, 107, 63, 46, 11],[0, 0, 0, 0, 0, 4, 19, 29, 56, 85, 162, 229, 352, 413, 479, 468, 390, 320, 156, 47],[0, 0, 0, 0, 0, 0, 1, 2, 15, 44, 152, 298, 546, 944, 1504, 2045, 2229, 2105, 1531, 408],[0, 0, 0, 0, 0, 0, 2, 12, 37, 108, 252, 694, 1708, 3917, 7031, 11058, 14173, 14782, 11158, 3451])
number_elements['revolution.geo'] = (8493,1275,4263,8289,32879,201709)
total_badness['revolution.geo'] = (12348.498749170572,2301.5119080238096,7266.901425264716,11619.248926348993,41520.35801256831,246377.26478687205)
quality_histogram['revolution.geo'] = ([0, 0, 0, 0, 0, 1, 14, 37, 141, 292, 516, 761, 908, 1113, 1149, 1153, 1021, 809, 454, 124],[0, 0, 0, 0, 1, 13, 46, 79, 104, 128, 151, 162, 143, 122, 97, 67, 79, 44, 33, 6],[0, 0, 0, 1, 24, 48, 98, 178, 257, 329, 374, 485, 464, 451, 424, 377, 341, 236, 134, 42],[0, 0, 0, 0, 0, 2, 6, 11, 68, 186, 384, 601, 825, 1052, 1157, 1179, 1159, 966, 521, 172],[0, 0, 0, 0, 0, 0, 1, 4, 12, 84, 271, 645, 1296, 2517, 4137, 5621, 6316, 6268, 4405, 1302],[0, 0, 0, 0, 0, 0, 0, 11, 55, 165, 539, 1581, 4149, 10238, 19945, 31707, 42528, 45753, 34593, 10445])
number_elements['screw.step'] = (2398,7837,31514)
total_badness['screw.step'] = (3755.370545837308,10345.591252904502,38907.12266445083)
quality_histogram['screw.step'] = ([0, 0, 0, 0, 0, 1, 13, 88, 80, 176, 187, 220, 248, 278, 289, 245, 252, 182, 114, 25],[0, 0, 0, 0, 1, 1, 5, 12, 27, 70, 147, 275, 499, 797, 1087, 1289, 1486, 1215, 709, 217],[0, 0, 0, 0, 0, 0, 3, 2, 20, 64, 145, 345, 846, 1782, 3209, 5128, 6751, 6771, 4886, 1562])
number_elements['sculpture.geo'] = (474,138,259,473,1342,6759)
total_badness['sculpture.geo'] = (694.325017071973,172.9965580254268,337.75654539384095,690.0100728765408,2068.421172379042,8628.81341055162)
quality_histogram['sculpture.geo'] = ([0, 0, 0, 0, 0, 1, 1, 1, 4, 16, 22, 41, 56, 66, 94, 93, 45, 22, 10, 2],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 11, 22, 22, 30, 28, 19, 1],[0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 7, 14, 25, 29, 47, 50, 46, 25, 7],[0, 0, 0, 0, 0, 0, 1, 1, 3, 16, 22, 41, 56, 67, 94, 93, 45, 22, 10, 2],[0, 0, 0, 0, 1, 0, 8, 25, 55, 76, 126, 141, 130, 145, 122, 136, 146, 128, 84, 19],[0, 0, 0, 0, 3, 7, 8, 20, 26, 48, 63, 134, 286, 497, 697, 1121, 1313, 1288, 944, 304])
number_elements['shaft.geo'] = (2758,951,2088,2749,11186,63583)
total_badness['shaft.geo'] = (5318.02970416672,1354.4698006500785,6181.8600404314575,4725.048512973088,14442.588211795146,77700.72253850821)
quality_histogram['shaft.geo'] = ([5, 19, 22, 27, 27, 37, 60, 74, 82, 160, 296, 372, 295, 251, 231, 278, 234, 181, 86, 21],[0, 0, 0, 0, 0, 0, 1, 6, 17, 32, 42, 65, 90, 111, 140, 137, 132, 103, 58, 17],[20, 46, 76, 95, 111, 105, 97, 134, 91, 101, 96, 141, 150, 177, 193, 168, 177, 56, 41, 13],[0, 2, 15, 16, 32, 30, 44, 71, 72, 143, 302, 400, 289, 259, 236, 273, 259, 196, 88, 22],[0, 0, 0, 0, 0, 0, 1, 3, 30, 80, 154, 350, 602, 945, 1409, 1830, 2160, 1870, 1352, 400],[0, 0, 0, 0, 0, 0, 0, 1, 16, 57, 199, 505, 1317, 3246, 6239, 10147, 13375, 14218, 10750, 3513])
number_elements['sphere.geo'] = (126,56,80,126,365,2315)
total_badness['sphere.geo'] = (237.49105851849373,68.82375901522019,114.85441614445755,237.49105851849373,557.7238546173342,2861.2824595084517)
quality_histogram['sphere.geo'] = ([0, 0, 0, 0, 0, 0, 0, 0, 6, 28, 46, 29, 15, 0, 2, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 14, 24, 11, 2, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 12, 28, 24, 10, 4, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 6, 28, 46, 29, 15, 0, 2, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 8, 21, 36, 47, 55, 52, 32, 40, 28, 22, 15, 9],[0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 30, 51, 141, 273, 396, 472, 471, 361, 111])
number_elements['sphereincube.geo'] = (495,187,352,501,1711,13950)
total_badness['sphereincube.geo'] = (1405.0779325461885,493.44997215033766,970.1271691161155,1303.49186301379,2380.2313828272604,17374.576935292873)
quality_histogram['sphereincube.geo'] = ([0, 0, 7, 60, 37, 29, 46, 41, 57, 46, 44, 16, 23, 10, 15, 12, 12, 24, 11, 5],[0, 0, 4, 11, 14, 25, 27, 14, 4, 2, 2, 3, 7, 13, 19, 16, 11, 6, 6, 3],[0, 0, 7, 15, 30, 48, 31, 27, 35, 44, 27, 19, 22, 15, 9, 8, 6, 6, 3, 0],[0, 0, 4, 44, 27, 20, 51, 40, 68, 51, 51, 21, 20, 17, 17, 16, 15, 23, 11, 5],[0, 0, 0, 0, 2, 3, 7, 15, 23, 28, 56, 85, 135, 188, 256, 270, 252, 194, 131, 66],[0, 0, 0, 0, 0, 0, 2, 2, 8, 27, 100, 220, 499, 870, 1449, 2270, 2791, 2947, 2086, 679])
number_elements['torus.geo'] = (5567,3145,2727,5419,25297,175540)
total_badness['torus.geo'] = (8384.304881325788,25137.501541465608,3909.4618457982724,7868.841003540981,31635.159094988307,212959.87194011256)
quality_histogram['torus.geo'] = ([0, 0, 0, 0, 0, 1, 24, 44, 120, 251, 427, 577, 708, 736, 700, 671, 555, 393, 274, 86],[195, 700, 454, 360, 340, 221, 170, 157, 140, 91, 96, 60, 44, 31, 33, 26, 12, 7, 6, 2],[0, 0, 0, 0, 0, 0, 2, 5, 12, 62, 161, 219, 352, 418, 401, 380, 266, 239, 155, 55],[0, 0, 0, 0, 0, 0, 4, 19, 42, 209, 332, 508, 665, 720, 748, 656, 613, 495, 305, 103],[0, 0, 0, 0, 0, 0, 0, 4, 6, 57, 140, 381, 917, 1672, 2967, 4341, 5051, 5114, 3588, 1059],[0, 0, 0, 0, 0, 0, 0, 2, 23, 105, 378, 1086, 3067, 7730, 16270, 26910, 37673, 40911, 31553, 9832])
number_elements['trafo.geo'] = (5207,1348,2390,5136,17915,84569)
total_badness['trafo.geo'] = (7609.297722974407,2770.7952645933756,3971.12751286376,7387.3184405933,23360.27008887893,108711.84635488936)
quality_histogram['trafo.geo'] = ([0, 1, 2, 0, 8, 23, 26, 43, 130, 209, 256, 376, 434, 574, 672, 714, 598, 554, 460, 127],[0, 2, 3, 17, 13, 39, 77, 130, 126, 139, 162, 128, 136, 115, 80, 88, 48, 32, 11, 2],[0, 0, 2, 1, 11, 17, 45, 82, 116, 145, 178, 211, 303, 386, 349, 231, 147, 96, 45, 25],[0, 0, 0, 0, 3, 14, 20, 37, 122, 193, 254, 362, 416, 558, 664, 720, 625, 547, 463, 138],[0, 0, 0, 0, 0, 0, 6, 26, 41, 68, 180, 504, 1428, 2170, 2266, 2730, 2780, 2666, 2365, 685],[0, 0, 0, 0, 3, 8, 60, 1414, 732, 421, 765, 1392, 2637, 5659, 9077, 13242, 16177, 16531, 12448, 4003])
number_elements['twobricks.geo'] = (41,22,22,41,171,594)
total_badness['twobricks.geo'] = (68.92997913151194,35.05041803583789,35.04132026480671,68.92997913151194,228.18972949546867,771.140091711599)
quality_histogram['twobricks.geo'] = ([0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 1, 7, 3, 15, 4, 4, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 4, 0, 0, 8, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 4, 0, 0, 8, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 1, 7, 3, 15, 4, 4, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 7, 10, 12, 40, 34, 23, 22, 13, 3],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 22, 29, 70, 88, 100, 109, 115, 43, 14])
number_elements['twocubes.geo'] = (41,22,22,41,171,594)
total_badness['twocubes.geo'] = (68.92997913151194,35.05041803583789,35.04132026480671,68.92997913151194,228.18972949546867,771.140091711599)
quality_histogram['twocubes.geo'] = ([0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 1, 7, 3, 15, 4, 4, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 4, 0, 0, 8, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 4, 0, 0, 8, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 1, 7, 3, 15, 4, 4, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 7, 10, 12, 40, 34, 23, 22, 13, 3],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 22, 29, 70, 88, 100, 109, 115, 43, 14])
number_elements['twocyl.geo'] = (572,209,551,568,1894,13452)
total_badness['twocyl.geo'] = (851.3592397192452,357.1550235646191,1900.9270599861966,824.3004337537227,2477.4306123873607,16367.35839189883)
quality_histogram['twocyl.geo'] = ([0, 0, 0, 0, 0, 1, 2, 7, 7, 17, 34, 51, 57, 89, 111, 75, 73, 35, 12, 1],[0, 0, 0, 1, 3, 6, 11, 2, 8, 5, 15, 18, 12, 28, 28, 27, 24, 17, 3, 1],[0, 29, 41, 30, 31, 36, 49, 40, 55, 27, 38, 32, 26, 26, 20, 13, 37, 16, 4, 1],[0, 0, 0, 0, 0, 0, 0, 3, 7, 16, 23, 51, 53, 95, 117, 69, 73, 43, 14, 4],[0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 20, 72, 118, 190, 292, 365, 352, 262, 179, 40],[0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 25, 83, 244, 626, 1288, 2202, 2860, 3100, 2290, 728])

View File

@ -3,6 +3,7 @@ import os, pytest
from netgen.meshing import meshsize, MeshingParameters, SetMessageImportance from netgen.meshing import meshsize, MeshingParameters, SetMessageImportance
import netgen.csg as csg import netgen.csg as csg
import netgen.stl as stl import netgen.stl as stl
from pyngcore import TaskManager
try: try:
import netgen.occ as occ import netgen.occ as occ
has_occ = True has_occ = True
@ -18,21 +19,27 @@ def getFiles(fileEnding):
def getCheckFunc(filename): def getCheckFunc(filename):
def func(mesh,i): def func(mesh,mp,i):
if filename in number_elements: if filename in number_elements:
# number of elements should be in 2% range of expected value # number of elements should be in 2% range of expected value
assert mesh.ne == pytest.approx(number_elements[filename][i], rel=0.02) assert mesh.ne == number_elements[filename][i]
return func badness = mesh.CalcTotalBadness(mp)
qual_classes = list(mesh.GetQualityHistogram())
assert badness == pytest.approx(total_badness[filename][i], rel=1e-6)
assert qual_classes == quality_histogram[filename][i]
return func
def getResultFunc(filename): def getResultFunc(filename):
def resultFunc(mesh): def resultFunc(mesh, mp):
results = {} results = {}
results["number_elements"] = mesh.ne results["number_elements"] = mesh.ne
results["total_badness"] = mesh.CalcTotalBadness(mp)
results["quality_histogram"] = list(mesh.GetQualityHistogram())
return results return results
return resultFunc return resultFunc
def getMeshingparameters(filename): def getMeshingparameters(filename):
standard = [{}] + [{ "mp" : ms } for ms in (meshsize.very_coarse, meshsize.coarse, meshsize.moderate, meshsize.fine, meshsize.very_fine)] standard = [MeshingParameters()] + [MeshingParameters(ms) for ms in (meshsize.very_coarse, meshsize.coarse, meshsize.moderate, meshsize.fine, meshsize.very_fine)]
if filename == "shell.geo": if filename == "shell.geo":
return [] # do not test this example cause it needs so long... return [] # do not test this example cause it needs so long...
if filename == "extrusion.geo": if filename == "extrusion.geo":
@ -49,6 +56,8 @@ _geofiles = [f for f in getFiles(".geo")] + [f for f in getFiles(".stl")]
if has_occ: if has_occ:
_geofiles += [f for f in getFiles(".step")] _geofiles += [f for f in getFiles(".step")]
_geofiles.sort()
def generateMesh(filename, mp): def generateMesh(filename, mp):
if filename.endswith(".geo"): if filename.endswith(".geo"):
geo = csg.CSGeometry(os.path.join("..","..","tutorials", filename)) geo = csg.CSGeometry(os.path.join("..","..","tutorials", filename))
@ -56,7 +65,7 @@ def generateMesh(filename, mp):
geo = stl.STLGeometry(os.path.join("..","..","tutorials", filename)) geo = stl.STLGeometry(os.path.join("..","..","tutorials", filename))
elif filename.endswith(".step"): elif filename.endswith(".step"):
geo = occ.OCCGeometry(os.path.join("..","..","tutorials", filename)) geo = occ.OCCGeometry(os.path.join("..","..","tutorials", filename))
return geo.GenerateMesh(**mp) return geo.GenerateMesh(mp)
def isSlowTest(filename): def isSlowTest(filename):
return filename in ["cubemcyl.geo", "frame.step", "revolution.geo", "manyholes.geo", "torus.geo", return filename in ["cubemcyl.geo", "frame.step", "revolution.geo", "manyholes.geo", "torus.geo",
@ -70,15 +79,16 @@ def getParamForTest(filename):
@pytest.mark.parametrize(("filename, checkFunc"), [getParamForTest(f) for f in _geofiles]) @pytest.mark.parametrize(("filename, checkFunc"), [getParamForTest(f) for f in _geofiles])
def test_geoFiles(filename, checkFunc): def test_geoFiles(filename, checkFunc):
import filecmp, pyngcore import filecmp
for i, mp in enumerate(getMeshingparameters(filename)): for i, mp_ in enumerate(getMeshingparameters(filename)):
print("load geo", filename) print("load geo", filename)
mp = MeshingParameters(mp_, parallel_meshing=False)
mesh = generateMesh(filename, mp) mesh = generateMesh(filename, mp)
if checkFunc is not None: if checkFunc is not None:
checkFunc(mesh,i) checkFunc(mesh,mp,i)
mesh.Save(filename+'_seq.vol.gz') mesh.Save(filename+'_seq.vol.gz')
with pyngcore.TaskManager(): with TaskManager():
mesh_par = generateMesh(filename, mp) mesh_par = generateMesh(filename, mp)
mesh_par.Save(filename+'_par.vol.gz') mesh_par.Save(filename+'_par.vol.gz')
@ -86,16 +96,21 @@ def test_geoFiles(filename, checkFunc):
import time import time
def generateResultFile(): def generateResultFile():
with TaskManager():
with open("results.py", "w") as f: with open("results.py", "w") as f:
print("number_elements = {}", file=f) print("number_elements = {}", file=f)
print("total_badness = {}", file=f)
print("quality_histogram = {}", file=f)
for _file, _func in ((gf, getResultFunc(gf)) for gf in _geofiles): for _file, _func in ((gf, getResultFunc(gf)) for gf in _geofiles):
start = time.time() start = time.time()
print("write", _file) print("write", _file)
mps = getMeshingparameters(_file) mps = getMeshingparameters(_file)
if not mps: if not mps:
continue continue
results = [_func(generateMesh(_file, mp)) for mp in mps] results = [_func(generateMesh(_file, mp), mp) for mp in mps]
print("number_elements['{}'] = {}".format(_file, "(" + ",".join((str(r["number_elements"]) for r in results)) + ")"), file=f) print("number_elements['{}'] = {}".format(_file, "(" + ",".join((str(r["number_elements"]) for r in results)) + ")"), file=f)
print("total_badness['{}'] = {}".format(_file, "(" + ",".join((str(r["total_badness"]) for r in results)) + ")"), file=f)
print("quality_histogram['{}'] = {}".format(_file, "(" + ",".join((str(r["quality_histogram"]) for r in results)) + ")"), file=f)
print("needed", time.time() - start, "seconds") print("needed", time.time() - start, "seconds")