From 65d1f36f664bff280fa916a5ba223fdbed319e1b Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 13 Jun 2023 08:20:35 -0400 Subject: [PATCH] Revert changes to petsc_ts_03/04 --- tests/petsc/petsc_ts_03.cc | 2 + tests/petsc/petsc_ts_03.output | 84 ++++++++++++++++++++++++++++++++++ tests/petsc/petsc_ts_04.cc | 3 ++ tests/petsc/petsc_ts_04.output | 16 +++++++ 4 files changed, 105 insertions(+) diff --git a/tests/petsc/petsc_ts_03.cc b/tests/petsc/petsc_ts_03.cc index 116c940aa6..0f6722101b 100644 --- a/tests/petsc/petsc_ts_03.cc +++ b/tests/petsc/petsc_ts_03.cc @@ -136,6 +136,7 @@ public: // solver is used. time_stepper.explicit_function = [&](const real_type t, const VectorType &y, VectorType &res) -> void { + deallog << "Evaluating explicit function at t=" << t << std::endl; res(0) = -kappa * y(0); res.compress(VectorOperation::insert); }; @@ -150,6 +151,7 @@ public: const VectorType &y, MatrixType & A, MatrixType & P) -> void { + deallog << "Evaluating explicit Jacobian at t=" << t << std::endl; P.set(0, 0, -kappa); P.compress(VectorOperation::insert); }; diff --git a/tests/petsc/petsc_ts_03.output b/tests/petsc/petsc_ts_03.output index e63ac89b61..d6ba3e381c 100644 --- a/tests/petsc/petsc_ts_03.output +++ b/tests/petsc/petsc_ts_03.output @@ -39,36 +39,84 @@ DEAL::# Test explicit interface (J 0) DEAL::Intermediate output: DEAL:: t =0.00000 DEAL:: y =1.00000 (exact: 1.00000) +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 DEAL::Intermediate output: DEAL:: t =0.200000 DEAL:: y =0.823864 (exact: 0.818731) +DEAL::Evaluating explicit function at t=0.400000 +DEAL::Evaluating explicit function at t=0.400000 +DEAL::Evaluating explicit function at t=0.400000 +DEAL::Evaluating explicit function at t=0.400000 DEAL::Intermediate output: DEAL:: t =0.400000 DEAL:: y =0.675134 (exact: 0.670320) +DEAL::Evaluating explicit function at t=0.600000 +DEAL::Evaluating explicit function at t=0.600000 +DEAL::Evaluating explicit function at t=0.600000 +DEAL::Evaluating explicit function at t=0.600000 DEAL::Intermediate output: DEAL:: t =0.600000 DEAL:: y =0.551962 (exact: 0.548812) +DEAL::Evaluating explicit function at t=0.800000 +DEAL::Evaluating explicit function at t=0.800000 +DEAL::Evaluating explicit function at t=0.800000 +DEAL::Evaluating explicit function at t=0.800000 DEAL::Intermediate output: DEAL:: t =0.800000 DEAL:: y =0.450798 (exact: 0.449329) +DEAL::Evaluating explicit function at t=1.00000 +DEAL::Evaluating explicit function at t=1.00000 +DEAL::Evaluating explicit function at t=1.00000 +DEAL::Evaluating explicit function at t=1.00000 DEAL::Intermediate output: DEAL:: t =1.00000 DEAL:: y =0.368009 (exact: 0.367879) +DEAL::Evaluating explicit function at t=1.20000 +DEAL::Evaluating explicit function at t=1.20000 +DEAL::Evaluating explicit function at t=1.20000 +DEAL::Evaluating explicit function at t=1.20000 DEAL::Intermediate output: DEAL:: t =1.20000 DEAL:: y =0.300364 (exact: 0.301194) +DEAL::Evaluating explicit function at t=1.40000 +DEAL::Evaluating explicit function at t=1.40000 +DEAL::Evaluating explicit function at t=1.40000 +DEAL::Evaluating explicit function at t=1.40000 DEAL::Intermediate output: DEAL:: t =1.40000 DEAL:: y =0.245132 (exact: 0.246597) +DEAL::Evaluating explicit function at t=1.60000 +DEAL::Evaluating explicit function at t=1.60000 +DEAL::Evaluating explicit function at t=1.60000 +DEAL::Evaluating explicit function at t=1.60000 DEAL::Intermediate output: DEAL:: t =1.60000 DEAL:: y =0.200048 (exact: 0.201897) +DEAL::Evaluating explicit function at t=1.80000 +DEAL::Evaluating explicit function at t=1.80000 +DEAL::Evaluating explicit function at t=1.80000 +DEAL::Evaluating explicit function at t=1.80000 DEAL::Intermediate output: DEAL:: t =1.80000 DEAL:: y =0.163253 (exact: 0.165299) +DEAL::Evaluating explicit function at t=2.00000 +DEAL::Evaluating explicit function at t=2.00000 +DEAL::Evaluating explicit function at t=2.00000 +DEAL::Evaluating explicit function at t=2.00000 DEAL::Intermediate output: DEAL:: t =2.00000 DEAL:: y =0.133225 (exact: 0.135335) +DEAL::Evaluating explicit function at t=2.20000 +DEAL::Evaluating explicit function at t=2.20000 +DEAL::Evaluating explicit function at t=2.20000 +DEAL::Evaluating explicit function at t=2.20000 DEAL::Intermediate output: DEAL:: t =2.20000 DEAL:: y =0.108719 (exact: 0.110803) @@ -163,36 +211,72 @@ DEAL::# Test explicit interface (J 1) DEAL::Intermediate output: DEAL:: t =0.00000 DEAL:: y =1.00000 (exact: 1.00000) +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit Jacobian at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit Jacobian at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 DEAL::Intermediate output: DEAL:: t =0.200000 DEAL:: y =0.823864 (exact: 0.818731) +DEAL::Evaluating explicit function at t=0.400000 +DEAL::Evaluating explicit Jacobian at t=0.400000 +DEAL::Evaluating explicit function at t=0.400000 DEAL::Intermediate output: DEAL:: t =0.400000 DEAL:: y =0.675134 (exact: 0.670320) +DEAL::Evaluating explicit function at t=0.600000 +DEAL::Evaluating explicit Jacobian at t=0.600000 +DEAL::Evaluating explicit function at t=0.600000 DEAL::Intermediate output: DEAL:: t =0.600000 DEAL:: y =0.551962 (exact: 0.548812) +DEAL::Evaluating explicit function at t=0.800000 +DEAL::Evaluating explicit Jacobian at t=0.800000 +DEAL::Evaluating explicit function at t=0.800000 DEAL::Intermediate output: DEAL:: t =0.800000 DEAL:: y =0.450798 (exact: 0.449329) +DEAL::Evaluating explicit function at t=1.00000 +DEAL::Evaluating explicit Jacobian at t=1.00000 +DEAL::Evaluating explicit function at t=1.00000 DEAL::Intermediate output: DEAL:: t =1.00000 DEAL:: y =0.368009 (exact: 0.367879) +DEAL::Evaluating explicit function at t=1.20000 +DEAL::Evaluating explicit Jacobian at t=1.20000 +DEAL::Evaluating explicit function at t=1.20000 DEAL::Intermediate output: DEAL:: t =1.20000 DEAL:: y =0.300364 (exact: 0.301194) +DEAL::Evaluating explicit function at t=1.40000 +DEAL::Evaluating explicit Jacobian at t=1.40000 +DEAL::Evaluating explicit function at t=1.40000 DEAL::Intermediate output: DEAL:: t =1.40000 DEAL:: y =0.245132 (exact: 0.246597) +DEAL::Evaluating explicit function at t=1.60000 +DEAL::Evaluating explicit Jacobian at t=1.60000 +DEAL::Evaluating explicit function at t=1.60000 DEAL::Intermediate output: DEAL:: t =1.60000 DEAL:: y =0.200048 (exact: 0.201897) +DEAL::Evaluating explicit function at t=1.80000 +DEAL::Evaluating explicit Jacobian at t=1.80000 +DEAL::Evaluating explicit function at t=1.80000 DEAL::Intermediate output: DEAL:: t =1.80000 DEAL:: y =0.163253 (exact: 0.165299) +DEAL::Evaluating explicit function at t=2.00000 +DEAL::Evaluating explicit Jacobian at t=2.00000 +DEAL::Evaluating explicit function at t=2.00000 DEAL::Intermediate output: DEAL:: t =2.00000 DEAL:: y =0.133225 (exact: 0.135335) +DEAL::Evaluating explicit function at t=2.20000 +DEAL::Evaluating explicit Jacobian at t=2.20000 +DEAL::Evaluating explicit function at t=2.20000 DEAL::Intermediate output: DEAL:: t =2.20000 DEAL:: y =0.108719 (exact: 0.110803) diff --git a/tests/petsc/petsc_ts_04.cc b/tests/petsc/petsc_ts_04.cc index 73c0cda0c8..0d1d2ad155 100644 --- a/tests/petsc/petsc_ts_04.cc +++ b/tests/petsc/petsc_ts_04.cc @@ -151,6 +151,8 @@ public: // solver is used. time_stepper.explicit_function = [&](const real_type t, const VectorType &y, VectorType &res) -> void { + deallog << "Evaluating explicit function at t=" << t << std::endl; + if (t > last_eval_time + 0.1) { deallog << "Time step too large: last_eval_time=" @@ -174,6 +176,7 @@ public: const VectorType &y, MatrixType & A, MatrixType & P) -> void { + deallog << "Evaluating explicit Jacobian at t=" << t << std::endl; P.set(0, 0, -kappa); P.compress(VectorOperation::insert); }; diff --git a/tests/petsc/petsc_ts_04.output b/tests/petsc/petsc_ts_04.output index b731a7e0e0..26db1c105a 100644 --- a/tests/petsc/petsc_ts_04.output +++ b/tests/petsc/petsc_ts_04.output @@ -39,9 +39,18 @@ DEAL::# Test explicit interface (J 0) DEAL::Intermediate output: DEAL:: t =0.00000 DEAL:: y =1.00000 (exact: 1.00000) +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 DEAL::Intermediate output: DEAL:: t =0.200000 DEAL:: y =0.823864 (exact: 0.818731) +DEAL::Evaluating explicit function at t=0.400000 DEAL::Time step too large: last_eval_time=0.200000, t=0.400000 DEAL::Time stepper aborted with an exception: DEAL:: @@ -96,9 +105,16 @@ DEAL::# Test explicit interface (J 1) DEAL::Intermediate output: DEAL:: t =0.00000 DEAL:: y =1.00000 (exact: 1.00000) +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit Jacobian at t=0.100000 +DEAL::Evaluating explicit function at t=0.100000 +DEAL::Evaluating explicit function at t=0.200000 +DEAL::Evaluating explicit Jacobian at t=0.200000 +DEAL::Evaluating explicit function at t=0.200000 DEAL::Intermediate output: DEAL:: t =0.200000 DEAL:: y =0.823864 (exact: 0.818731) +DEAL::Evaluating explicit function at t=0.400000 DEAL::Time step too large: last_eval_time=0.200000, t=0.400000 DEAL::Time stepper aborted with an exception: DEAL:: -- 2.39.5