GEOSX
Public Member Functions | List of all members
geosx::PetscSolver Class Reference

This class creates and provides basic support for PETSc solvers. More...

#include <PetscSolver.hpp>

Public Member Functions

 PetscSolver (LinearSolverParameters parameters)
 Solver constructor, with parameter list reference. More...
 
virtual ~PetscSolver ()=default
 Virtual destructor.
 
void solve (PetscMatrix &mat, PetscVector &sol, PetscVector &rhs, DofManager const *const dofManager=nullptr)
 Solve system with an iterative solver. More...
 
LinearSolverResult const & result ()
 Get the result of previous solve. More...
 

Detailed Description

This class creates and provides basic support for PETSc solvers.

Definition at line 35 of file PetscSolver.hpp.

Constructor & Destructor Documentation

◆ PetscSolver()

geosx::PetscSolver::PetscSolver ( LinearSolverParameters  parameters)

Solver constructor, with parameter list reference.

Parameters
[in]parametersstructure containing linear solver parameters

Member Function Documentation

◆ result()

LinearSolverResult const& geosx::PetscSolver::result ( )
inline

Get the result of previous solve.

Returns
struct with last solve stats

Definition at line 69 of file PetscSolver.hpp.

◆ solve()

void geosx::PetscSolver::solve ( PetscMatrix mat,
PetscVector sol,
PetscVector rhs,
DofManager const *const  dofManager = nullptr 
)

Solve system with an iterative solver.

Parameters
[in,out]matthe matrix
[in,out]solthe solution
[in,out]rhsthe right-hand side
dofManagerthe Degree-of-Freedom manager associated with matrix

Solve Ax=b with A an PetscMatrix, x and b PetscVector.


The documentation for this class was generated from the following file: