You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a number of tests that output inital and final residuals and iteration count. Exemplarily,
DEAL:: Solving linear system
DEAL::Starting value 1.67096
DEAL::Convergence step 9 value 2.69526e-13
DEAL:: Solved in 9 iterations.
This is an issue because the exact floating point number for the initial and final residual, as well as the number of iterations typically depends on library versions, operating system, hardware and processor architecture, and what optimization have been chosen. We should avoid printing these numbers
(As a side note: the final residual in above output isn't critical - we ignore it thanks to our numdiff settings. Typically a test fails because the initial residual or the number of convergence steps differ.)
Instead one possiblity is to use the check_solver_within_range macro that can be invoked for example as follows:
check_solver_within_range(solver.solve(A, u, f, preconditioner),
control.last_step(), 40, 44);
and will output success if the solve() converged within 40 to 44 steps and otherwise outputs a failure condition.
The text was updated successfully, but these errors were encountered:
We have a number of tests that output inital and final residuals and iteration count. Exemplarily,
This is an issue because the exact floating point number for the initial and final residual, as well as the number of iterations typically depends on library versions, operating system, hardware and processor architecture, and what optimization have been chosen. We should avoid printing these numbers
(As a side note: the final residual in above output isn't critical - we ignore it thanks to our numdiff settings. Typically a test fails because the initial residual or the number of convergence steps differ.)
Instead one possiblity is to use the
check_solver_within_range
macro that can be invoked for example as follows:and will output success if the
solve()
converged within 40 to 44 steps and otherwise outputs a failure condition.The text was updated successfully, but these errors were encountered: