From: Wolfgang Bangerth Date: Mon, 3 Jun 2024 02:55:29 +0000 (-0600) Subject: Update a testcase for IDA. X-Git-Tag: v9.6.0-rc1~195^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf6495129d143a31f00b14c74705a3b9ba589530;p=dealii.git Update a testcase for IDA. --- diff --git a/tests/sundials/ida_01.cc b/tests/sundials/ida_01.cc index 1df9c52d70..779be869d1 100644 --- a/tests/sundials/ida_01.cc +++ b/tests/sundials/ida_01.cc @@ -53,6 +53,9 @@ * * J = alpha I + A */ + +unsigned int n_rhs_evaluations = 0; + class HarmonicOscillator { public: @@ -78,6 +81,7 @@ public: VectorType &res) { res = y_dot; A.vmult_add(res, y); + ++n_rhs_evaluations; }; time_stepper.setup_jacobian = [&](const double, @@ -112,10 +116,14 @@ public: void run() { - y[1] = kappa; - y_dot[0] = kappa; - time_stepper.solve_dae(y, y_dot); + y[1] = kappa; + y_dot[0] = kappa; + const unsigned int n_timesteps = time_stepper.solve_dae(y, y_dot); + + deallog << "n_rhs_evaluations=" << n_rhs_evaluations << std::endl; + deallog << "n_timesteps=" << n_timesteps << std::endl; } + SUNDIALS::IDA> time_stepper; private: diff --git a/tests/sundials/ida_01.output b/tests/sundials/ida_01.output index bb8726d8d1..d376f9c05c 100644 --- a/tests/sundials/ida_01.output +++ b/tests/sundials/ida_01.output @@ -32,3 +32,5 @@ DEAL::5.800000000 -0.4646021729 0.8855195059 0.8855195072 0.4646021708 DEAL::6.000000000 -0.2794154939 0.9601702741 0.9601702747 0.2794154923 DEAL::6.200000000 -0.08308940102 0.9965420835 0.9965420838 0.08308939852 DEAL::6.300000000 0.01681390092 0.9998586225 0.9998586225 -0.01681390017 +DEAL::n_rhs_evaluations=325 +DEAL::n_timesteps=305