From bdbb1f0d62a49354f1979c9b950f66ec2639e76e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 21 May 2024 16:19:58 -0600 Subject: [PATCH] Minor updates to the IDA documentation and test cases. --- include/deal.II/sundials/ida.h | 8 ++++---- tests/sundials/ida_01.cc | 6 +++--- tests/sundials/ida_02.cc | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/deal.II/sundials/ida.h b/include/deal.II/sundials/ida.h index 0a392906bb..8dc48791aa 100644 --- a/include/deal.II/sundials/ida.h +++ b/include/deal.II/sundials/ida.h @@ -151,10 +151,10 @@ namespace SUNDIALS * \end{matrix} * \f] * - * That is $F(y', y, t) = y' + A y = 0 $ + * That is, $F(y', y, t) = y' + A y = 0 $ * where - * A = * \f[ + * A = * \begin{pmatrix} * 0 & -1 \\ * k^2 &0 @@ -206,8 +206,8 @@ namespace SUNDIALS * { * J = A; * - * J(0,0) = alpha; - * J(1,1) = alpha; + * J(0,0) += alpha; + * J(1,1) += alpha; * * Jinv.invert(J); * }; diff --git a/tests/sundials/ida_01.cc b/tests/sundials/ida_01.cc index afbf867508..1df9c52d70 100644 --- a/tests/sundials/ida_01.cc +++ b/tests/sundials/ida_01.cc @@ -30,7 +30,7 @@ * u (0) = 0 * u'(0) = k * - * write in terms of a first order ode: + * written in terms of a first order ode: * * y[0]' - y[1] = 0 * y[1]' + k^2 y[0] = 0 @@ -89,8 +89,8 @@ public: J = A; - J(0, 0) = alpha; - J(1, 1) = alpha; + J(0, 0) += alpha; + J(1, 1) += alpha; Jinv.invert(J); }; diff --git a/tests/sundials/ida_02.cc b/tests/sundials/ida_02.cc index 0af53390ab..ecc7882dea 100644 --- a/tests/sundials/ida_02.cc +++ b/tests/sundials/ida_02.cc @@ -33,7 +33,7 @@ * u (0) = 0 * u'(0) = k * - * write in terms of a first order ode: + * written in terms of a first order ode: * * y[0]' - y[1] = 0 * y[1]' + k^2 y[0] = 0 @@ -92,8 +92,8 @@ public: J = A; - J(0, 0) = alpha; - J(1, 1) = alpha; + J(0, 0) += alpha; + J(1, 1) += alpha; }; time_stepper.solve_with_jacobian = -- 2.39.5