File: test_large.py

package info (click to toggle)
python-dmsh 0.2.19-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 480 kB
  • sloc: python: 1,893; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from helpers import assert_norm_equality

import dmsh


def test_large(show=False):
    # https://github.com/nschloe/dmsh/issues/11
    r = dmsh.Rectangle(-10.0, +20.0, -10.0, +20.0)
    c = dmsh.Circle([0.0, 0.0], 3)
    geo = dmsh.Difference(r, c)

    X, cells = dmsh.generate(geo, 2.0, tol=1.0e-5, max_steps=100, show=show)

    ref_norms = [4.6292581642363657e03, 2.4187329297982635e02, 2.0000000000000000e01]
    assert_norm_equality(X.flatten(), ref_norms, 1.0e-4)


if __name__ == "__main__":
    test_large(show=True)