35#include "arccore/alina/BuiltinBackend.h"
36#include "arccore/alina/Adapters.h"
37#include "arccore/alina/PreconditionedSolver.h"
38#include "arccore/alina/AMG.h"
39#include "arccore/alina/Coarsening.h"
40#include "arccore/alina/Relaxation.h"
41#include "arccore/alina/BiCGStabSolver.h"
43#include "arccore/alina/IO.h"
44#include "arccore/alina/Profiler.h"
48int main(
int argc,
char* argv[])
52 std::cerr <<
"Usage: " << argv[0] <<
" <matrix.mtx> <rhs.mtx>" << std::endl;
57 auto& prof = Alina::Profiler::globalProfiler();
61 std::vector<ptrdiff_t> ptr, col;
62 std::vector<double> val, rhs;
66 std::cout <<
"Matrix " << argv[1] <<
": " << rows <<
"x" << cols << std::endl;
69 std::cout <<
"RHS " << argv[2] <<
": " << rows <<
"x" << cols << std::endl;
75 auto A = std::tie(rows, ptr, col, val);
99 std::cout << solve << std::endl;
102 std::vector<double> x(rows, 0.0);
110 std::cout <<
"Iters: " << r.nbIteration() << std::endl
111 <<
"Error: " << r.residual() << std::endl
112 << prof << std::endl;
Algebraic multigrid method.
BiConjugate Gradient Stabilized (BiCGSTAB) method.
Convenience class that bundles together a preconditioner and an iterative solver.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Sparse approximate interface smoother.
Smoothed aggregation coarsening.