speed up voxelization tests for higher-order polynomials
This commit is contained in:
parent
c1442960b2
commit
675d1b2aef
1 changed files with 4 additions and 1 deletions
|
|
@ -16,10 +16,13 @@ from .utils import build_rand_tetrahedron, gen_plane_through_centroid, plane_gen
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def test_voxelization(poly_order, grid_resolution=250):
|
||||
def test_voxelization(poly_order, grid_resolution=None):
|
||||
"""
|
||||
Test that the voxelized moments sum to those of the original input
|
||||
"""
|
||||
if grid_resolution is None:
|
||||
grid_resolution = 250 if poly_order == 0 else 50
|
||||
|
||||
verts = 1.5 * (numpy.array(rand_tetrahedron_vertices()) + 1)
|
||||
poly = adze.build_tetrahedron(verts)
|
||||
moments = adze.get_moments(poly, poly_order)
|
||||
|
|
|
|||
Loading…
Reference in a new issue