Skip to content

Oscillator: Add higher-order time stepping schemes.#388

Merged
BenjaminRodenberg merged 8 commits intoprecice:developfrom
BenjaminRodenberg:add-higher-order-time-stepping-schemes
Jan 26, 2024
Merged

Oscillator: Add higher-order time stepping schemes.#388
BenjaminRodenberg merged 8 commits intoprecice:developfrom
BenjaminRodenberg:add-higher-order-time-stepping-schemes

Conversation

@BenjaminRodenberg
Copy link
Copy Markdown
Contributor

  • Add Runge Kutta 4 and Radau IIA scheme
  • Use subcycling to achieve higher order

Moved some features from my research repository https://github.com/BenjaminRodenberg/oscillator-example over here. Question is similar to #30: Do we want to have these more advanced settings here or rather keep this PR until we have a proper solution?

* Add Runge Kutta 4 and Radau IIA scheme
* Use subcycling to achieve higher order
BenjaminRodenberg added a commit to BenjaminRodenberg/oscillator-example that referenced this pull request Nov 4, 2023
@BenjaminRodenberg BenjaminRodenberg changed the title Add higher-order time stepping schemes. Oscillator: Add higher-order time stepping schemes. Nov 8, 2023
def rhs_eval_points(self, dt) -> List[float]:
return np.linspace(0, dt, 5) # will create an interpolant from this later

def do_step(self, u, v, a, f, dt) -> Tuple[float, float, float]:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Instead of f being an array of rhs values at the rhs evaluation points, we could also request a lambda function f. This makes oscillator.py slightly more complicated, but also allows us to skip the interpolation below by just wrapping precice.read_data

Copy link
Copy Markdown
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

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

Looks like a meaningful addition to me. For me, the oscillator is anyway more a numerical testcase for things in preCICE than a case that users copy to learn an adapter etc. So, having higher-order time integrators here is beneficial also in the long run.
Shouldn't we add something in the README about the choices?

@BenjaminRodenberg BenjaminRodenberg merged commit edd58e0 into precice:develop Jan 26, 2024
@BenjaminRodenberg BenjaminRodenberg deleted the add-higher-order-time-stepping-schemes branch January 26, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants