Skip to content

Commit

Permalink
Fix CubeVoid derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
markriegler committed Oct 9, 2024
1 parent c38a2e0 commit 61b3846
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion splinepy/microstructure/tiles/cube_void.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _rotation_matrix_y(self, angle):

def _rotation_matrix_y_deriv(self, angle):
cc, ss = _np.cos(angle), _np.sin(angle)
return _np.array([[-ss, 0, -cc], [0, 1, 0], [cc, 0, -ss]])
return _np.array([[-ss, 0, -cc], [0, 0, 0], [cc, 0, -ss]])

def create_tile(
self,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_microstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_tile_closure():
check_control_points(tile_patches)


def test_tile_derivatives(np_rng, heps=1e-8, n_test_points=4):
def test_tile_derivatives(np_rng, heps=1e-7, n_test_points=10):
"""Testing the correctness of the tile derivatives using Finite Differences.
This includes every closure and no closure, every parameter and every patch
by evaluating at random points and for random parameters.
Expand All @@ -188,8 +188,8 @@ def test_tile_derivatives(np_rng, heps=1e-8, n_test_points=4):
n_test_points: int
Number of testing points in the parametric domain
"""
# TODO: right now EllipsVoid, CubeVoid and InverseCross show wrong derivatives
skip_classes = [ms.tiles.EllipsVoid, ms.tiles.CubeVoid]
# TODO: right now EllipsVoid shows wrong derivatives
skip_classes = [ms.tiles.EllipsVoid]

for tile_class in all_tile_classes:
# TODO: right now skip classes with faultily implemented derivatives
Expand Down

0 comments on commit 61b3846

Please sign in to comment.