add test for csg2d, set maxh

This commit is contained in:
Matthias Hochsteger 2021-01-14 17:37:38 +01:00
parent b21f04ddcb
commit 6f74a1580b

View File

@ -11,7 +11,7 @@ def check_area(geo, area):
g.Add(geo) g.Add(geo)
geo = g geo = g
m = geo.GenerateMesh() m = geo.GenerateMesh(maxh=0.2)
ngs = pytest.importorskip("ngsolve") ngs = pytest.importorskip("ngsolve")
mesh = ngs.Mesh(m) mesh = ngs.Mesh(m)
mesh.Curve(5) mesh.Curve(5)
@ -106,6 +106,7 @@ def test_circle_and_rect():
check_area(c+r, 3/4*pi+1) check_area(c+r, 3/4*pi+1)
check_area(r*c, 1/4*pi) check_area(r*c, 1/4*pi)
check_area(r+c, 3/4*pi+1) check_area(r+c, 3/4*pi+1)
check_area(r-c, 1-1/4*pi)
if __name__ == "__main__": if __name__ == "__main__":