mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Skip SplitImproveEdge if it would insert tets with negative volume
This commit is contained in:
parent
67a67a453d
commit
73c75240f8
@ -81,11 +81,20 @@ test_win:
|
|||||||
script:
|
script:
|
||||||
- pip install pytest-check
|
- pip install pytest-check
|
||||||
- cd tests\pytest
|
- cd tests\pytest
|
||||||
- REM python test_tutorials.py new_results.json
|
|
||||||
- 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 ..
|
||||||
needs: ["build_win"]
|
needs: ["build_win"]
|
||||||
|
|
||||||
|
generate_results:
|
||||||
|
<<: *win
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- pip install pytest-check
|
||||||
|
- cd tests\pytest
|
||||||
|
- python test_tutorials.py new_results.json
|
||||||
|
needs: ["build_win"]
|
||||||
|
when: manual
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- tests/pytest/new_results.json
|
- tests/pytest/new_results.json
|
||||||
|
@ -564,9 +564,6 @@ double MeshOptimize3d :: SplitImproveEdge (Table<ElementIndex,PointIndex> & elem
|
|||||||
Element newel1 = oldel;
|
Element newel1 = oldel;
|
||||||
Element newel2 = oldel;
|
Element newel2 = oldel;
|
||||||
|
|
||||||
oldel.Touch();
|
|
||||||
oldel.Delete();
|
|
||||||
|
|
||||||
newel1.Touch();
|
newel1.Touch();
|
||||||
newel2.Touch();
|
newel2.Touch();
|
||||||
|
|
||||||
@ -576,6 +573,12 @@ double MeshOptimize3d :: SplitImproveEdge (Table<ElementIndex,PointIndex> & elem
|
|||||||
if (newel2[l] == pi1) newel2[l] = pinew;
|
if (newel2[l] == pi1) newel2[l] = pinew;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( newel1.Volume(mesh.Points()) < 0.0 || newel2.Volume(mesh.Points()) < 0.0)
|
||||||
|
return 0.0;
|
||||||
|
|
||||||
|
oldel.Touch();
|
||||||
|
oldel.Delete();
|
||||||
|
|
||||||
mesh.AddVolumeElement (newel1);
|
mesh.AddVolumeElement (newel1);
|
||||||
mesh.AddVolumeElement (newel2);
|
mesh.AddVolumeElement (newel2);
|
||||||
}
|
}
|
||||||
|
@ -827,98 +827,6 @@
|
|||||||
"total_badness": 100414.60403
|
"total_badness": 100414.60403
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"cylinder.geo": [
|
|
||||||
{
|
|
||||||
"angles_tet": [
|
|
||||||
19.071,
|
|
||||||
144.66
|
|
||||||
],
|
|
||||||
"angles_trig": [
|
|
||||||
22.881,
|
|
||||||
111.85
|
|
||||||
],
|
|
||||||
"ne1d": 52,
|
|
||||||
"ne2d": 286,
|
|
||||||
"ne3d": 394,
|
|
||||||
"quality_histogram": "[0, 0, 0, 0, 0, 0, 0, 2, 2, 6, 18, 38, 45, 53, 70, 51, 48, 40, 12, 9]",
|
|
||||||
"total_badness": 562.09628542
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"angles_tet": [
|
|
||||||
22.85,
|
|
||||||
151.98
|
|
||||||
],
|
|
||||||
"angles_trig": [
|
|
||||||
25.237,
|
|
||||||
118.13
|
|
||||||
],
|
|
||||||
"ne1d": 24,
|
|
||||||
"ne2d": 66,
|
|
||||||
"ne3d": 69,
|
|
||||||
"quality_histogram": "[0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 3, 5, 0, 4, 2, 2, 9, 26, 3, 7]",
|
|
||||||
"total_badness": 95.643757297
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"angles_tet": [
|
|
||||||
14.788,
|
|
||||||
156.92
|
|
||||||
],
|
|
||||||
"angles_trig": [
|
|
||||||
11.549,
|
|
||||||
134.56
|
|
||||||
],
|
|
||||||
"ne1d": 36,
|
|
||||||
"ne2d": 152,
|
|
||||||
"ne3d": 548,
|
|
||||||
"quality_histogram": "[0, 0, 0, 0, 1, 7, 24, 35, 41, 59, 44, 55, 57, 51, 39, 38, 48, 26, 19, 4]",
|
|
||||||
"total_badness": 980.19781779
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"angles_tet": [
|
|
||||||
19.062,
|
|
||||||
144.68
|
|
||||||
],
|
|
||||||
"angles_trig": [
|
|
||||||
22.836,
|
|
||||||
111.85
|
|
||||||
],
|
|
||||||
"ne1d": 52,
|
|
||||||
"ne2d": 286,
|
|
||||||
"ne3d": 394,
|
|
||||||
"quality_histogram": "[0, 0, 0, 0, 0, 0, 0, 2, 2, 6, 18, 38, 45, 52, 71, 52, 46, 41, 12, 9]",
|
|
||||||
"total_badness": 562.08196742
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"angles_tet": [
|
|
||||||
23.602,
|
|
||||||
139.69
|
|
||||||
],
|
|
||||||
"angles_trig": [
|
|
||||||
23.844,
|
|
||||||
118.54
|
|
||||||
],
|
|
||||||
"ne1d": 76,
|
|
||||||
"ne2d": 636,
|
|
||||||
"ne3d": 1056,
|
|
||||||
"quality_histogram": "[0, 0, 0, 0, 0, 0, 0, 0, 2, 16, 35, 78, 108, 109, 163, 185, 154, 105, 81, 20]",
|
|
||||||
"total_badness": 1453.0463737
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"angles_tet": [
|
|
||||||
24.173,
|
|
||||||
139.41
|
|
||||||
],
|
|
||||||
"angles_trig": [
|
|
||||||
26.472,
|
|
||||||
120.11
|
|
||||||
],
|
|
||||||
"ne1d": 124,
|
|
||||||
"ne2d": 1666,
|
|
||||||
"ne3d": 6448,
|
|
||||||
"quality_histogram": "[0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 17, 44, 136, 282, 586, 944, 1320, 1470, 1240, 401]",
|
|
||||||
"total_badness": 7815.6380623
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cylsphere.geo": [
|
"cylsphere.geo": [
|
||||||
{
|
{
|
||||||
"angles_tet": [
|
"angles_tet": [
|
||||||
@ -3422,4 +3330,4 @@
|
|||||||
"total_badness": 12938.174838
|
"total_badness": 12938.174838
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user