Skip to content
Snippets Groups Projects
Commit c1f805f9 authored by Malte Nyhuis's avatar Malte Nyhuis
Browse files

more tests

parent 98f5cc69
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,6 @@ import numpy as np ...@@ -2,7 +2,6 @@ import numpy as np
import pyvista as pv import pyvista as pv
def test_absVec(): def test_absVec():
from ntrfc.utils.math.vectorcalc import vecAbs from ntrfc.utils.math.vectorcalc import vecAbs
a = np.array([1,1]) a = np.array([1,1])
...@@ -23,3 +22,9 @@ def test_ellipsoidVol(): ...@@ -23,3 +22,9 @@ def test_ellipsoidVol():
ellipsoid = pv.ParametricEllipsoid(*sigma) ellipsoid = pv.ParametricEllipsoid(*sigma)
calcVol = ellipsoidVol(sigma) calcVol = ellipsoidVol(sigma)
assert np.isclose(calcVol, ellipsoid.volume, rtol=1e-03, atol=1e-03) assert np.isclose(calcVol, ellipsoid.volume, rtol=1e-03, atol=1e-03)
def test_randomUnitVec():
from ntrfc.utils.math.vectorcalc import randomUnitVec, vecAbs
rvec = randomUnitVec()
assert vecAbs(rvec)==1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment