def test_octa_sphere(n=16): points, cells = meshzoo.octa_sphere(n) # import meshio # meshio.write_points_cells("out.vtk", points, {"triangle": cells}) assert len(points) == 1026 assert _near_equal(numpy.sum(points, axis=0), [0.0, 0.0, 0.0]) assert len(cells) == 2048
def test_octa_sphere(n=16): points, cells = meshzoo.octa_sphere(n) assert len(points) == 1026 assert _near_equal(numpy.sum(points, axis=0), [0.0, 0.0, 0.0]) assert len(cells) == 2048 assert (_compute_cells_normals_dir(points, cells) > 0.0).all() assert numpy.all( numpy.abs(numpy.einsum("ij,ij->i", points, points) - 1.0) < 1.0e-10)
def test_octa_sphere(n=16): points, cells = meshzoo.octa_sphere(n) assert len(points) == 1026 assert _near_equal(numpy.sum(points, axis=0), [0.0, 0.0, 0.0]) assert len(cells) == 2048 assert (_compute_cells_normals_dir(points, cells) > 0.0).all()