|
DOLFINx
0.1.0
DOLFINx C++ interface
|
This class implements Krylov methods for linear systems of the form Ax = b. It is a wrapper for the Krylov solvers of PETSc. More...
#include <PETScKrylovSolver.h>
Public Member Functions | |
| PETScKrylovSolver (MPI_Comm comm) | |
| Create Krylov solver for a particular method and named preconditioner. | |
| PETScKrylovSolver (KSP ksp, bool inc_ref_count) | |
| Create solver wrapper of a PETSc KSP object. More... | |
| PETScKrylovSolver (const PETScKrylovSolver &solver)=delete | |
| PETScKrylovSolver (PETScKrylovSolver &&solver) | |
| Move constructor. | |
| ~PETScKrylovSolver () | |
| Destructor. | |
| PETScKrylovSolver & | operator= (const PETScKrylovSolver &)=delete |
| PETScKrylovSolver & | operator= (PETScKrylovSolver &&solver) |
| Move assignment. | |
| void | set_operator (const Mat A) |
| Set operator (Mat) | |
| void | set_operators (const Mat A, const Mat P) |
| Set operator and preconditioner matrix (Mat) | |
| int | solve (Vec x, const Vec b, bool transpose=false) const |
| Solve linear system Ax = b and return number of iterations (A^t x = b if transpose is true) | |
| void | set_options_prefix (std::string options_prefix) |
| Sets the prefix used by PETSc when searching the PETSc options database. | |
| std::string | get_options_prefix () const |
| Returns the prefix used by PETSc when searching the PETSc options database. | |
| void | set_from_options () const |
| Set options from PETSc options database. | |
| KSP | ksp () const |
| Return PETSc KSP pointer. | |
| void | set_dm (DM dm) |
| Set the DM. | |
| void | set_dm_active (bool val) |
| Activate/deactivate DM. | |
This class implements Krylov methods for linear systems of the form Ax = b. It is a wrapper for the Krylov solvers of PETSc.
| PETScKrylovSolver::PETScKrylovSolver | ( | KSP | ksp, |
| bool | inc_ref_count | ||
| ) |
Create solver wrapper of a PETSc KSP object.
| [in] | ksp | The PETSc KSP object. It should already have been created |
| [in] | inc_ref_count | Increment the reference count on ksp if true |
1.8.17