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.
SparseMatrix<double> 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})$.
//
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams