Go to the documentation of this file.
   20 #ifndef LIBMESH_PETSC_PRECONDITIONER_H 
   21 #define LIBMESH_PETSC_PRECONDITIONER_H 
   23 #include "libmesh/libmesh_config.h" 
   25 #ifdef LIBMESH_HAVE_PETSC 
   28 #include "libmesh/preconditioner.h" 
   29 #include "libmesh/libmesh_common.h" 
   30 #include "libmesh/reference_counted_object.h" 
   31 #include "libmesh/libmesh.h" 
   32 #include "libmesh/petsc_macro.h" 
   34 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS 
   40 #include "libmesh/enum_preconditioner_type.h" 
   50 template <
typename T> 
class SparseMatrix;
 
   51 template <
typename T> 
class NumericVector;
 
   52 template <
typename T> 
class ShellMatrix;
 
   79   virtual void clear () 
override;
 
   81   virtual void init () 
override;
 
  114 #if PETSC_VERSION_LESS_THAN(3,0,0) 
  127 template <
typename T>
 
  137 template <
typename T>
 
  146 #endif // #ifdef LIBMESH_HAVE_PETSC 
  147 #endif // LIBMESH_PETSC_PRECONDITIONER_H 
  
This class provides an interface to the suite of preconditioners available from PETSc.
 
The libMesh namespace provides an interface to certain functionality in the library.
 
PetscPreconditioner(const libMesh::Parallel::Communicator &comm_in)
Constructor.
 
virtual void init() override
Initialize data structures if not done so already.
 
PC _pc
Preconditioner context.
 
static void set_petsc_subpreconditioner_type(PCType type, PC &pc)
Some PETSc preconditioners (ILU, LU) don't work in parallel.
 
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
 
virtual void clear() override
Release all memory and clear data structures.
 
virtual ~PetscPreconditioner()
Destructor.
 
This class provides a uniform interface for preconditioners.
 
PreconditionerType
Defines an enum for preconditioner types.
 
virtual void apply(const NumericVector< T > &x, NumericVector< T > &y) override
Computes the preconditioned vector y based on input vector x.
 
Mat _mat
PETSc Mat pulled out of the _matrix object during init().
 
PreconditionerType type() const
 
static void set_petsc_preconditioner_type(const PreconditionerType &preconditioner_type, PC &pc)
Tells PETSc to use the user-specified preconditioner.
 
void ErrorVector unsigned int