10#include <AmgXSolver.hpp>
32 LinSolverAmgX(
const std::string &solverName,
const std::string &file);
38 virtual PetscErrorCode
destroy();
41 virtual PetscErrorCode
setMatrix(
const Mat &A);
44 virtual PetscErrorCode
solve(Vec &
x, Vec &b);
47 virtual PetscErrorCode
getIters(PetscInt &iters);
57 virtual PetscErrorCode
init();
Iterative solver using wrapper of AmgX.
virtual PetscErrorCode setMatrix(const Mat &A)
Set the coefficient matrix of the linear system.
virtual ~LinSolverAmgX()
Default destructor.
LinSolverAmgX(const std::string &solverName, const std::string &file)
Constructor.
virtual PetscErrorCode solve(Vec &x, Vec &b)
Solve the linear system.
virtual PetscErrorCode destroy()
Manually destroy the data in the current instance.
virtual PetscErrorCode init()
Private initialization function.
virtual PetscErrorCode getIters(PetscInt &iters)
Get the number of iterations of the solver.
AmgXSolver amgx
the underlying AmgX wrapper solver.
virtual PetscErrorCode getResidual(PetscReal &res)
Get the final residual of the solver.
The abstract (base) class for different iterative solvers.
Def. of LinSolverBase, LinSolver, and factory function.
A toolbox for building flow solvers.