Skip to content

Commit 58fa947

Browse files
committed
remove redundant warning and move the note to documentation
1 parent 7c048e1 commit 58fa947

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/api/contact.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Contact
88
Description
99
-----------
1010

11+
.. note::
12+
(CAUTION)
13+
The contact is recommended to be added at last. This is because contact forces often includes
14+
friction that may depend on other normal forces and contraints to be calculated accurately.
15+
Be careful on the order of adding interactions.
16+
1117
.. rubric:: Available Contact Classes
1218

1319
.. autosummary::

elastica/modules/contact.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
logger = logging.getLogger(__name__)
2727

2828

29-
def warnings() -> None:
30-
logger.warning("Contact features should be instantiated lastly.")
29+
3130

3231

3332
class Contact:
@@ -97,8 +96,7 @@ def _finalize_contact(self: ContactedSystemCollectionProtocol) -> None:
9796

9897
self._feature_group_synchronize.add_operators(contact, [func])
9998

100-
if not self._feature_group_synchronize.is_last(contact):
101-
warnings()
99+
102100

103101
self._contacts = []
104102
del self._contacts

0 commit comments

Comments
 (0)