Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_rotation():
s0 = pygalmesh.Rotate(
pygalmesh.Cuboid([0, 0, 0], [1, 2, 3]), [1.0, 0.0, 0.0], numpy.pi / 12.0
)
mesh = pygalmesh.generate_mesh(s0, cell_size=0.1, edge_size=0.1, verbose=False)
tol = 1.0e-2
vol = sum(helpers.compute_volumes(mesh.points, mesh.cells["tetra"]))
assert abs(vol - 6.0) < tol
return