-
Notifications
You must be signed in to change notification settings - Fork 112
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
Explicit operation order determined by user definition #379
Merged
Conversation
This file contains 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
skim0119
force-pushed
the
feature/order-operation
branch
from
May 9, 2024 08:07
f6d4b97
to
ca83da1
Compare
skim0119
force-pushed
the
feature/order-operation
branch
3 times, most recently
from
May 9, 2024 08:16
e5fa496
to
00d6caa
Compare
…der of the specification
skim0119
force-pushed
the
feature/order-operation
branch
from
May 9, 2024 08:18
00d6caa
to
44d836a
Compare
skim0119
force-pushed
the
feature/order-operation
branch
from
May 9, 2024 17:30
8151230
to
239fb0c
Compare
skim0119
changed the title
Fix: Make operation order fully determined by user definition
Explicit operation order determined at user definition
May 9, 2024
skim0119
changed the title
Explicit operation order determined at user definition
Explicit operation order determined by user definition
May 9, 2024
armantekinalp
requested changes
May 9, 2024
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.
skim0119
force-pushed
the
feature/order-operation
branch
from
May 10, 2024 06:05
c4ad237
to
5a68fc6
Compare
armantekinalp
approved these changes
May 11, 2024
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
skim0119
force-pushed
the
feature/order-operation
branch
from
May 11, 2024 02:26
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,contact
andfriction
must be calculated after all other boundary conditions are in place, and strictlycontact
must be computed beforefriction
sincefriction
depends 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
, andconnection
as of now.Some remaining TODOs:
contact
andfriction
modules