Skip to content

Commit

Permalink
remove dev ordering AnisotropicFrictionPlane
Browse files Browse the repository at this point in the history
  • Loading branch information
skim0119 committed May 9, 2024
1 parent 44d836a commit 15ba162
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions elastica/modules/feature_group.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Callable
from elastica.typing import OperatorType

from collection.abc import Iterable
from collections.abc import Iterable

import itertools

Expand All @@ -23,5 +23,5 @@ def append_id(self, feature):
self._operator_collection.append([])

def add_operators(self, feature, operators: list[OperatorType]):
idx = self._operator_idx.index(feature)
idx = self._operator_ids.index(feature)
self._operator_collection[idx].extend(operators)
13 changes: 0 additions & 13 deletions elastica/modules/forcing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
(external point force, muscle torques, etc).
"""
import functools
from elastica.interaction import AnisotropicFrictionalPlane


class Forcing:
Expand Down Expand Up @@ -71,18 +70,6 @@ def _finalize_forcing(self):
ext_force_torque, [apply_forces, apply_torques]
)

# TODO: remove: we decided to let user to fully decide the order of operations
# Find if there are any friction plane forcing, if add them to the end of the list,
# since friction planes uses external forces.
friction_plane_index = []
for idx, ext_force_torque in enumerate(self._ext_forces_torques):
if isinstance(ext_force_torque[1], AnisotropicFrictionalPlane):
friction_plane_index.append(idx)

# Move to the friction forces to the end of the external force and torques list.
for index in friction_plane_index:
self._ext_forces_torques.append(self._ext_forces_torques.pop(index))


class _ExtForceTorque:
"""
Expand Down

0 comments on commit 15ba162

Please sign in to comment.