Skip to content

Pass **kwargs through AdaptiveTimeStepper to support options_prefix#189

Merged
pbrubeck merged 3 commits intofiredrakeproject:masterfrom
sghelichkhani:fix-adaptive-options-prefix
Jan 24, 2026
Merged

Pass **kwargs through AdaptiveTimeStepper to support options_prefix#189
pbrubeck merged 3 commits intofiredrakeproject:masterfrom
sghelichkhani:fix-adaptive-options-prefix

Conversation

@sghelichkhani
Copy link
Contributor

@sghelichkhani sghelichkhani commented Jan 23, 2026

Summary

  • Add **kwargs to AdaptiveTimeStepper.__init__ and pass it to the parent class

Problem

AdaptiveTimeStepper did not accept **kwargs, which meant that valid base kwargs like options_prefix could not be passed through to the NonlinearVariationalSolver. This caused a TypeError when users tried to use adaptive timestepping with a custom solver prefix:

TypeError: AdaptiveTimeStepper.__init__() got an unexpected keyword argument 'options_prefix'

Fix

This PR adds **kwargs to AdaptiveTimeStepper.__init__ and passes it to the parent class StageDerivativeTimeStepper, which already accepts and passes through **kwargs. This makes AdaptiveTimeStepper consistent with the non-adaptive timesteppers.

Fixes #188

Test

  • Verified that options_prefix is now correctly passed through to the solver for adaptive timestepping
  • Verified that non-adaptive timestepping still works correctly

AdaptiveTimeStepper.__init__ did not accept **kwargs, which meant that
valid base kwargs like options_prefix could not be passed through to
the NonlinearVariationalSolver. This caused a TypeError when users
tried to use adaptive timestepping with a custom solver prefix.

This fix adds **kwargs to AdaptiveTimeStepper.__init__ and passes it
to the parent class, consistent with StageDerivativeTimeStepper.

Fixes firedrakeproject#188
sghelichkhani added a commit to g-adopt/g-adopt that referenced this pull request Jan 23, 2026
Point to sghelichkhani/Irksome@fix-adaptive-options-prefix which adds
**kwargs support to AdaptiveTimeStepper, allowing options_prefix to be
passed through to the solver for adaptive timestepping.

See: firedrakeproject/Irksome#189
Copy link
Collaborator

@pbrubeck pbrubeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@pbrubeck pbrubeck merged commit a20bafa into firedrakeproject:master Jan 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AdaptiveTimeStepper does not accept options_prefix parameter

2 participants

Comments