-
Notifications
You must be signed in to change notification settings - Fork 131
Explicit operation order determined by user definition #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f6d4b97 to
ca83da1
Compare
e5fa496 to
00d6caa
Compare
…der of the specification
00d6caa to
44d836a
Compare
8151230 to
239fb0c
Compare
armantekinalp
requested changes
May 9, 2024
Contributor
armantekinalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions. But overall looks good.
c4ad237 to
5a68fc6
Compare
armantekinalp
approved these changes
May 11, 2024
Contributor
armantekinalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…t operation feature
e71e547 to
2a6ddfa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explicit operation order
Description
Previous implementation has ambiguity in determining the order of operation for different boundary conditions:
forcing,contact,friction,connection, etc. For example,contactandfrictionmust be calculated after all other boundary conditions are in place, and strictlycontactmust be computed beforefrictionsincefrictiondepends oncontact. In various place in the code, we tried to rearange the order without explicitly letting user know:PyElastica/elastica/modules/base_system.py
Lines 173 to 182 in 87a2e74
PyElastica/elastica/modules/forcing.py
Lines 72 to 81 in 87a2e74
This cause ambiguity on user, especially when user wants to define their own boundary condition.
Solution
As long as we let users to write their own boundary conditions, we cannot anticipate every possible cases of operation dependencies. We are shifting to the policy that user must be aware of the boundary operation order.
This PR removes any "back-end" sorting the operation order. Operation order is now strictly defined by the order of user inserting any boundary condition with
.using. This applies toforcing,contact, andconnectionas of now.Some remaining TODOs:
contactandfrictionmodules