From: Sebastian Proell Date: Sat, 13 May 2023 09:56:17 +0000 (+0200) Subject: Fix step-77: zero out residual before assembly X-Git-Tag: v9.5.0-rc1~238^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15210%2Fhead;p=dealii.git Fix step-77: zero out residual before assembly --- diff --git a/examples/step-77/step-77.cc b/examples/step-77/step-77.cc index b58f350b20..ab75a26d72 100644 --- a/examples/step-77/step-77.cc +++ b/examples/step-77/step-77.cc @@ -334,6 +334,8 @@ namespace Step77 std::cout << " Computing residual vector..." << std::flush; + residual = 0.0; + const QGauss quadrature_formula(fe.degree + 1); FEValues fe_values(fe, quadrature_formula, diff --git a/tests/sundials/step-77.cc b/tests/sundials/step-77.cc index 4c427d2636..d8aa4ffd28 100644 --- a/tests/sundials/step-77.cc +++ b/tests/sundials/step-77.cc @@ -243,6 +243,8 @@ namespace Step77 const Vector &evaluation_point, Vector & residual) { + residual = 0.0; + const QGauss quadrature_formula(fe.degree + 1); FEValues fe_values(fe, quadrature_formula,