Skip to content
Snippets Groups Projects
Commit 0038a2ce authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

Fixing type in iterative linear solver example.

parent 45d5810f
No related branches found
No related tags found
1 merge request!116Documentation for linear solvers and preconditioners
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment