From 0038a2ce2a3887e3e720fc0ddd27fb1b0cdb4533 Mon Sep 17 00:00:00 2001 From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz> Date: Sun, 26 Dec 2021 22:02:50 +0100 Subject: [PATCH] Fixing type in iterative linear solver example. --- .../Examples/Solvers/Linear/IterativeLinearSolverExample.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/Examples/Solvers/Linear/IterativeLinearSolverExample.cpp b/Documentation/Examples/Solvers/Linear/IterativeLinearSolverExample.cpp index 186d67cce1..229aab3690 100644 --- a/Documentation/Examples/Solvers/Linear/IterativeLinearSolverExample.cpp +++ b/Documentation/Examples/Solvers/Linear/IterativeLinearSolverExample.cpp @@ -57,15 +57,15 @@ void iterativeLinearSolverExample() Vector x( size, 1.0 ); Vector b( size ); matrix_ptr->vectorProduct( x, b ); + x = 0.0; std::cout << "Vector b = " << b << std::endl; /*** - * Solver the linear system + * Solve the linear system */ using LinearSolver = TNL::Solvers::Linear::GMRES< MatrixType >; LinearSolver solver; solver.setMatrix( matrix_ptr ); - x = 0.0; solver.solve( b, x ); std::cout << "Vector x = " << x << std::endl; } -- GitLab