Public Member Functions | Private Attributes | List of all members
oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER > Class Template Reference

A preconditioner for performing inner iteration preconditioner solves. The template argument SOLVER specifies the inner iteration solver (which must be derived from IterativeLinearSolver) and the template argument PRECONDITIONER specifies the preconditioner for the inner iteration iterative solver. Note: For no preconditioning use the IdentityPreconditioner. More...

#include <general_purpose_preconditioners.h>

+ Inheritance diagram for oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >:

Public Member Functions

 InnerIterationPreconditioner ()
 Constructor. More...
 
 ~InnerIterationPreconditioner ()
 
void clean_up_memory ()
 Clean up memory (empty). Generic interface function. More...
 
void setup ()
 Preconditioner setup method. Setup the preconditioner for the inner iteration solver. More...
 
void preconditioner_solve (const DoubleVector &r, DoubleVector &z)
 Preconditioner solve method. Performs the specified number of Krylov iterations preconditioned with the specified preconditioner. More...
 
double & tolerance ()
 Access to convergence tolerance of the inner iteration solver. More...
 
unsigned & max_iter ()
 Access to max. number of iterations of the inner iteration solver. More...
 
SOLVER * solver_pt ()
 
PRECONDITIONER * preconditioner_pt ()
 
- Public Member Functions inherited from oomph::Preconditioner
 Preconditioner ()
 Constructor. More...
 
 Preconditioner (const Preconditioner &)=delete
 Broken copy constructor. More...
 
void operator= (const Preconditioner &)=delete
 Broken assignment operator. More...
 
virtual ~Preconditioner ()
 Destructor (empty) More...
 
virtual void preconditioner_solve_transpose (const DoubleVector &r, DoubleVector &z)
 Apply the preconditioner. Pure virtual generic interface function. This method should apply the preconditioner operator to the vector r and return the vector z. (broken virtual) More...
 
void setup (DoubleMatrixBase *matrix_pt)
 Setup the preconditioner: store the matrix pointer and the communicator pointer then call preconditioner specific setup() function. More...
 
void setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt)
 Compatability layer for old preconditioners where problem pointers were needed. The problem pointer is only used to get a communicator pointer. More...
 
void enable_silent_preconditioner_setup ()
 Set up the block preconditioner quietly! More...
 
void disable_silent_preconditioner_setup ()
 Be verbose in the block preconditioner setup. More...
 
virtual DoubleMatrixBasematrix_pt () const
 Get function for matrix pointer. More...
 
virtual void set_matrix_pt (DoubleMatrixBase *matrix_pt)
 Set the matrix pointer. More...
 
virtual const OomphCommunicatorcomm_pt () const
 Get function for comm pointer. More...
 
virtual void set_comm_pt (const OomphCommunicator *const comm_pt)
 Set the communicator pointer. More...
 
double setup_time () const
 Returns the time to setup the preconditioner. More...
 
virtual void turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse)
 Virtual interface function for making a preconditioner a subsidiary of a block preconditioner. By default nothing is needed, but if this preconditioner is also a block preconditioner then things need to happen. There's an assumption here that the block preconditioner will be in CR form but since that assumption is hard coded all over BlockPreconditioner we're safe. More...
 
virtual void turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse, const Vector< Vector< unsigned >> &doftype_coarsen_map_coarse)
 Virtual interface function for making a preconditioner a subsidiary of a block preconditioner. By default nothing is needed, but if this preconditioner is also a block preconditioner then things need to happen. Version for coarsening dof-types. More...
 
- Public Member Functions inherited from oomph::DistributableLinearAlgebraObject
 DistributableLinearAlgebraObject ()
 Default constructor - create a distribution. More...
 
 DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)=delete
 Broken copy constructor. More...
 
void operator= (const DistributableLinearAlgebraObject &)=delete
 Broken assignment operator. More...
 
virtual ~DistributableLinearAlgebraObject ()
 Destructor. More...
 
LinearAlgebraDistributiondistribution_pt () const
 access to the LinearAlgebraDistribution More...
 
unsigned nrow () const
 access function to the number of global rows. More...
 
unsigned nrow_local () const
 access function for the num of local rows on this processor. More...
 
unsigned nrow_local (const unsigned &p) const
 access function for the num of local rows on this processor. More...
 
unsigned first_row () const
 access function for the first row on this processor More...
 
unsigned first_row (const unsigned &p) const
 access function for the first row on this processor More...
 
bool distributed () const
 distribution is serial or distributed More...
 
bool distribution_built () const
 if the communicator_pt is null then the distribution is not setup then false is returned, otherwise return true More...
 
void build_distribution (const LinearAlgebraDistribution *const dist_pt)
 setup the distribution of this distributable linear algebra object More...
 
void build_distribution (const LinearAlgebraDistribution &dist)
 setup the distribution of this distributable linear algebra object More...
 

Private Attributes

SOLVER * Solver_pt
 pointer to the underlying solver More...
 
PRECONDITIONER * Preconditioner_pt
 pointer to the underlying preconditioner More...
 

Additional Inherited Members

- Protected Member Functions inherited from oomph::DistributableLinearAlgebraObject
void clear_distribution ()
 clear the distribution of this distributable linear algebra object More...
 
- Protected Attributes inherited from oomph::Preconditioner
bool Silent_preconditioner_setup
 Boolean to indicate whether or not the build should be done silently. More...
 
std::ostream * Stream_pt
 Pointer to the output stream – defaults to std::cout. More...
 

Detailed Description

template<class SOLVER, class PRECONDITIONER>
class oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >

A preconditioner for performing inner iteration preconditioner solves. The template argument SOLVER specifies the inner iteration solver (which must be derived from IterativeLinearSolver) and the template argument PRECONDITIONER specifies the preconditioner for the inner iteration iterative solver. Note: For no preconditioning use the IdentityPreconditioner.

Definition at line 361 of file general_purpose_preconditioners.h.

Constructor & Destructor Documentation

◆ InnerIterationPreconditioner()

template<class SOLVER , class PRECONDITIONER >
oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::InnerIterationPreconditioner ( )
inline

◆ ~InnerIterationPreconditioner()

template<class SOLVER , class PRECONDITIONER >
oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::~InnerIterationPreconditioner ( )
inline

Member Function Documentation

◆ clean_up_memory()

template<class SOLVER , class PRECONDITIONER >
void oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::clean_up_memory ( )
inlinevirtual

◆ max_iter()

template<class SOLVER , class PRECONDITIONER >
unsigned& oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::max_iter ( )
inline

Access to max. number of iterations of the inner iteration solver.

Definition at line 459 of file general_purpose_preconditioners.h.

References oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::Solver_pt.

Referenced by oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::setup().

◆ preconditioner_pt()

template<class SOLVER , class PRECONDITIONER >
PRECONDITIONER* oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::preconditioner_pt ( )
inline

◆ preconditioner_solve()

template<class SOLVER , class PRECONDITIONER >
void oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::preconditioner_solve ( const DoubleVector r,
DoubleVector z 
)
inlinevirtual

Preconditioner solve method. Performs the specified number of Krylov iterations preconditioned with the specified preconditioner.

Implements oomph::Preconditioner.

Definition at line 447 of file general_purpose_preconditioners.h.

References oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::Solver_pt.

◆ setup()

template<class SOLVER , class PRECONDITIONER >
void oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::setup ( )
inlinevirtual

◆ solver_pt()

template<class SOLVER , class PRECONDITIONER >
SOLVER* oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::solver_pt ( )
inline

◆ tolerance()

template<class SOLVER , class PRECONDITIONER >
double& oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::tolerance ( )
inline

Access to convergence tolerance of the inner iteration solver.

Definition at line 453 of file general_purpose_preconditioners.h.

References oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::Solver_pt.

Member Data Documentation

◆ Preconditioner_pt

template<class SOLVER , class PRECONDITIONER >
PRECONDITIONER* oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::Preconditioner_pt
private

◆ Solver_pt

template<class SOLVER , class PRECONDITIONER >
SOLVER* oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >::Solver_pt
private

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