Skip to content

Commit

Permalink
Merge pull request #20 from GazzolaLab/bugfix_rotate_numba
Browse files Browse the repository at this point in the history
Bugfix rotate numba
  • Loading branch information
armantekinalp committed Sep 14, 2021
2 parents 0f5502b + 8b27de4 commit 2fcbd7a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion elastica/_elastica_numba/_joint.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _calculate_contact_forces(

@numba.njit(cache=True)
def _aabbs_not_intersecting(aabb_one, aabb_two):
""" Returns true if not intersecting else false"""
"""Returns true if not intersecting else false"""
if (aabb_one[0, 1] < aabb_two[0, 0]) | (aabb_one[0, 0] > aabb_two[0, 1]):
return 1
if (aabb_one[1, 1] < aabb_two[1, 0]) | (aabb_one[1, 0] > aabb_two[1, 1]):
Expand Down
1 change: 1 addition & 0 deletions elastica/_elastica_numba/_rotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def _get_rotation_matrix(scale: float, axis_collection):
return rot_mat


@njit(cache=True)
def _rotate(director_collection, scale: float, axis_collection):
"""
Does alibi rotations
Expand Down
2 changes: 1 addition & 1 deletion examples/Visualization/_povmacros.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def __init__(self, pre_scripts="", post_scripts=""):
self._light_assign = defaultdict(list)

def add_camera(self, name, **kwargs):
""" Add camera (viewpoint) """
"""Add camera (viewpoint)"""
self.cameras.append(self.Camera(name=name, **kwargs))

def add_light(self, camera_id=-1, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_elastica_numba/test_rod_nb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self):
# https://docs.pytest.org/en/latest/fixture.html
@pytest.fixture(scope="module", params=[15, 31])
def load_data_for_bootstrapping_state(request):
""" Yield states for bootstrapping """
"""Yield states for bootstrapping"""
n_elem = request.param
n_nodes = n_elem + 1
dim = 3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_elastica_numba/test_timestepper_nb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


class TestExtendStepperInterface:
""" TODO add documentation """
"""TODO add documentation"""

class MockSymplecticStepper:
Tag = SymplecticStepperTag()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_elastica_numpy/test_rod_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self):
# https://docs.pytest.org/en/latest/fixture.html
@pytest.fixture(scope="module", params=[15, 31])
def load_data_for_bootstrapping_state(request):
""" Yield states for bootstrapping """
"""Yield states for bootstrapping"""
n_elem = request.param
n_nodes = n_elem + 1
dim = 3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_elastica_numpy/test_timestepper_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


class TestExtendStepperInterface:
""" TODO add documentation """
"""TODO add documentation"""

class MockSymplecticStepper:
Tag = SymplecticStepperTag()
Expand Down

0 comments on commit 2fcbd7a

Please sign in to comment.