From 5fccd87dce8ba75ed5226a2a9d69bf81ba1c8544 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 25 Jun 2016 17:31:35 -0400 Subject: [PATCH] Fix a sign error in step-25. Credit for this fix belongs to Anup Basak, who mentioned it on the mailing list in March 2016. Even with the sign error the Newton solver converged to the right solution: changing the sign only altered the solution in the fifth decimal place. The fixed version now only requires three, instead of four, Newton steps in 2D. --- examples/step-25/step-25.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index 9ce719834d..5ee224cf58 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -353,7 +353,7 @@ namespace Step25 SparseMatrix tmp_matrix (sparsity_pattern); compute_nl_matrix (old_solution, solution, tmp_matrix); - system_matrix.add (-std::pow(time_step*theta,2), tmp_matrix); + system_matrix.add (std::pow(time_step*theta,2), tmp_matrix); // Then, we compute the right-hand side vector $-F_h(U^{n,l})$. // -- 2.39.5