Question on TimeStepping methods

38 views
Skip to first unread message

Praveen C

unread,
Aug 26, 2021, 12:22:47 PM8/26/21
to Deal. II Googlegroup
Dear all

In TimeStepping methods

We have functions taking these arguments

https://www.dealii.org/current/doxygen/deal.II/classTimeStepping_1_1ExplicitRungeKutta.html#ad43855dc35abf17e9c707444c0901790

https://www.dealii.org/current/doxygen/deal.II/classTimeStepping_1_1EmbeddedExplicitRungeKutta.html#a19cc9872a5ae40effe26089403d315de


evolve_one_time_step (const std::function< VectorType(const double, const VectorType &)> & f,
double t,
double delta_t,
VectorType & y
)

ExplicitRungeKutta and EmbeddedExplicitRungeKutta are derived from RungeKutta but there is no virtual function with these arguments in RungeKutta.

Is it possible to declare such a virtual function in the base class ? Seems useful to have this.

Thanks
praveen

Wolfgang Bangerth

unread,
Aug 26, 2021, 12:26:39 PM8/26/21
to dea...@googlegroups.com
On 8/26/21 10:22 AM, Praveen C wrote:
>
> ExplicitRungeKutta and EmbeddedExplicitRungeKutta are derived from RungeKutta but there is no virtual function with these arguments in RungeKutta.
>
> Is it possible to declare such a virtual function in the base class ? Seems useful to have this.

Do all of the other derived classes have similar functions?

Separately, though, my suggestion would be to use the functionality of
the SUNDIALS wrappers. SUNDIALS has better (and, more importantly,
adaptive-timestep) integrators.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Bruno Turcksin

unread,
Aug 27, 2021, 12:04:27 PM8/27/21
to deal.II User Group
Praveen,

On Thursday, August 26, 2021 at 12:22:47 PM UTC-4 Praveen C wrote:
ExplicitRungeKutta and EmbeddedExplicitRungeKutta are derived from RungeKutta but there is no virtual function with these arguments in RungeKutta.

Is it possible to declare such a virtual function in the base class ? Seems useful to have this.
The reason the function is not in the base class is because it cannot be implemented for ImplicitRungeKutta. However this function https://www.dealii.org/current/doxygen/deal.II/classTimeStepping_1_1EmbeddedExplicitRungeKutta.html#accb05cdd9b6519c4d4ffe9ea996cee87 is in the base class and id_minus_tau_J_inverse is ignored when using an explicit method. You  should be able to pass a lambda function that doesn't do anything. Let me know if that doesn't work.

@Wolfgang, the embedded methods are adaptive.

Best,

Bruno

Wolfgang Bangerth

unread,
Aug 27, 2021, 1:03:02 PM8/27/21
to dea...@googlegroups.com
On 8/27/21 10:04 AM, Bruno Turcksin wrote:
>
> @Wolfgang, the embedded methods are adaptive.

Oh, I hadn't realized -- very nice! I learn something new every day and
it provides me with great joy :-)

Praveen C

unread,
Aug 27, 2021, 11:46:58 PM8/27/21
to Deal. II Googlegroup
Thank you, I could pass NULL in place of id_minus_tau_J_inverse and it works.

best
praveen

Praveen C

unread,
Aug 27, 2021, 11:59:15 PM8/27/21
to Deal. II Googlegroup
Maybe this can be added in the documentation for explicit methods.

Also it says the Jacobian J is dJ/dy but it should be df/dy, e.g., see here


Thanks
praveen
Reply all
Reply to author
Forward
0 new messages