PyElastica icon indicating copy to clipboard operation
PyElastica copied to clipboard

Use OperatorGroup for constrain and callback features

Open skim0119 opened this issue 7 months ago • 1 comments

resolve #401 resolve #402

Key update

  • Previously, only synchronize features used OperatorGroup. Now, both callback and constraint features use OperatorGroup to manage the operations.
  • Finalize methods is not converted since it is not specifically associated to a features (like FreeBC or OneEndFixedBC), but rather associated to a group (like Constraints or Forcing). 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 to experimental folder.
    • This was because StepType was being refactored from rest of the OperatorType, and type-hinting for explicit stepper was causing more issues.
  • OperatorType now specifically means apply_forces, apply_torques, constrain_rates, etc.
    • OperatorType must take time as parameter inputs.
    • OperatorCallableType must take time and current_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.

skim0119 avatar Jun 29 '24 06:06 skim0119