Version 2 of controlled_runge_kutta::try_step for FSAL steppers does not compile

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start in include/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp at line 685 and inspect the FSAL try_step overloads used by controlled_runge_kutta with runge_kutta_dopri5. Check whether passing m_dxdt.m_v as dxdt_out compiles and preserves behavior across repeated stepping, not just a single step. Done means the overload compiles and repeated stepping produces correct results without unwanted state changes.

Written by the indexing model from the issue text.

Description

Hi!
I want to use controlled_runge_kutta with runge_kutta_dopri5 and get the output of try_step regardless of its success, but version 2 of try_step does not compile. The error seems to be a missing argument here, since in the FSAL version there is no try_step method that takes six arguments.

I think the intention was to call version 4 here, so a possible fix would be to use m_dxdt also as dxdt_out, i.e. change the line (controlled_runge_kutta.hpp:685) to

return try_step( system , in , m_dxdt.m_v , t , out , m_dxdt.m_v , dt );

This does compile, and it produces correct results for single steps. However, I did not check if overwriting m_dxdt.m_v has any unwanted side effects for repeated stepping.

Dominant language
C++
Stars
55
Forks
59
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/odeint

All issues in boostorg/odeint

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.