Public Member Functions | |
PreconditionerBase (const MatrixBase &matrix) | |
virtual | ~PreconditionerBase () |
Protected Member Functions | |
operator const Mat () const | |
virtual void | set_preconditioner_type (PC &pc) const =0 |
Protected Attributes | |
const Mat | matrix |
Friends | |
class | SolverBase |
Note that derived classes only provide interfaces to the relevant functionality of PETSc. PETSc does not implement all preconditioners for all matrix types. In particular, some preconditioners are not going to work for parallel jobs, such as for example the ILU preconditioner.
PETScWrappers::PreconditionerBase::PreconditionerBase | ( | const MatrixBase & | matrix | ) |
Constructor. Take a pointer to the matrix from which the preconditioner shall be constructed.
virtual PETScWrappers::PreconditionerBase::~PreconditionerBase | ( | ) | [virtual] |
Destructor.
PETScWrappers::PreconditionerBase::operator const Mat | ( | ) | const [protected] |
Conversion operator to get a representation of the matrix that represents this preconditioner. We use this inside the actual solver, where we need to pass this matrix to the PETSc solvers.
virtual void PETScWrappers::PreconditionerBase::set_preconditioner_type | ( | PC & | pc | ) | const [protected, pure virtual] |
Function that takes a Krylov Subspace Preconditioner context object, and sets the type of preconditioner that is requested by the derived class.
Implemented in PETScWrappers::PreconditionJacobi, PETScWrappers::PreconditionBlockJacobi, PETScWrappers::PreconditionSOR, PETScWrappers::PreconditionSSOR, PETScWrappers::PreconditionEisenstat, PETScWrappers::PreconditionICC, PETScWrappers::PreconditionILU, and PETScWrappers::PreconditionLU.
friend class SolverBase [friend] |
Make the solver class a friend, since it needs to call the conversion operator.
const Mat PETScWrappers::PreconditionerBase::matrix [protected] |
A pointer to the matrix that acts as a preconditioner.