misc fixes (mostly imports)
This commit is contained in:
parent
b957ac7abe
commit
07a7c37eab
3 changed files with 11 additions and 8 deletions
|
|
@ -3,7 +3,6 @@ import warnings
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from pytest import approx
|
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
from numpy.typing import NDArray
|
from numpy.typing import NDArray
|
||||||
|
|
@ -46,8 +45,8 @@ def test_manual_tetrahedron(poly_order: int) -> None:
|
||||||
ml = adze.get_moments(p_left, 0)
|
ml = adze.get_moments(p_left, 0)
|
||||||
mr = adze.get_moments(p_right, 0)
|
mr = adze.get_moments(p_right, 0)
|
||||||
|
|
||||||
logger.debug(f'0th moments: tot {m0}, left {ml}, right {mr}')
|
logger.debug(f'0th moments: tot {m0[0]}, left {ml[0]}, right {mr[0]}')
|
||||||
assert m0 == approx(volume, abs=TOL_FAIL)
|
assert m0 == pytest.approx(volume, abs=TOL_FAIL)
|
||||||
check_split_moments(tet, p_left, p_right, poly_order)
|
check_split_moments(tet, p_left, p_right, poly_order)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import logging
|
||||||
import warnings
|
import warnings
|
||||||
from time import perf_counter
|
from time import perf_counter
|
||||||
|
|
||||||
import pytest
|
|
||||||
import numpy
|
import numpy
|
||||||
from numpy.typing import NDArray
|
from numpy.typing import NDArray
|
||||||
from numpy.testing import assert_allclose
|
from numpy.testing import assert_allclose
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
from typing import cast
|
from typing import cast
|
||||||
|
import random
|
||||||
import numpy
|
import numpy
|
||||||
from numpy.typing import NDArray
|
from numpy.typing import NDArray
|
||||||
from numpy import pi, cos, sin, floating
|
from numpy import pi, cos, sin, floating
|
||||||
from numpy.linalg import norm
|
from numpy.linalg import norm
|
||||||
import random
|
|
||||||
|
|
||||||
import adze
|
import adze
|
||||||
|
|
||||||
|
|
@ -196,7 +196,12 @@ def gen_plane_through_points(
|
||||||
return n, d
|
return n, d
|
||||||
|
|
||||||
|
|
||||||
plane_generators = [gen_plane_through_centroid, gen_plane_from_face,
|
plane_generators = [
|
||||||
gen_plane_through_centroid_and_edge, gen_plane_through_edge,
|
gen_plane_through_centroid,
|
||||||
gen_plane_through_centroid_and_vertex, gen_plane_through_vertex]
|
gen_plane_from_face,
|
||||||
|
gen_plane_through_centroid_and_edge,
|
||||||
|
gen_plane_through_edge,
|
||||||
|
gen_plane_through_centroid_and_vertex,
|
||||||
|
gen_plane_through_vertex,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue