PyElastica
PyElastica copied to clipboard
Use OperatorGroup for constrain and callback features
resolve #401 resolve #402
Key update
- Previously, only synchronize features used
OperatorGroup
. Now, both callback and constraint features useOperatorGroup
to manage the operations. - Finalize methods is not converted since it is not specifically associated to a features (like
FreeBC
orOneEndFixedBC
), but rather associated to a group (likeConstraints
orForcing
). Hence it does not require more complicated structure to manage the operation.
Minor update
- partially resolve #402:
explicit_steppers
and related features are now moved toexperimental
folder.- This was because
StepType
was being refactored from rest of theOperatorType
, and type-hinting for explicit stepper was causing more issues.
- This was because
-
OperatorType
now specifically meansapply_forces
,apply_torques
,constrain_rates
, etc.-
OperatorType
must taketime
as parameter inputs. -
OperatorCallableType
must taketime
andcurrent_step
as a parameter input.
-
-
StepType
now specifically means callable functions used during the timestepping. - New test: condition to call callback at zero-step
-
Pytest-mock
is added as part of dev-dependency for easier mock-testing.