27#ifndef OOMPH_PRECONDITION_HEADER
28#define OOMPH_PRECONDITION_HEADER
33#include <oomph-lib-config.h>
42 template<
typename MATRIX>
43 class BlockPreconditioner;
86 throw OomphLibError(
"This function hasn't been implemented yet!",
179 error_msg <<
"Tried to access a null communicator pointer. This might "
181 <<
"trying to use it in a non-parallel case. Or it might "
183 <<
"set it properly.";
295 if (*
r.distribution_pt() != *
this->distribution_pt())
299 <<
"The r vector must have the same distribution as the "
301 <<
"(this is the same as the matrix passed to setup())";
312 <<
"The z vector distribution has been setup; it must have the "
313 <<
"same distribution as the r vector (and preconditioner).";
Base class for any linear algebra object that is distributable. Just contains storage for the LinearA...
LinearAlgebraDistribution * distribution_pt() const
access to the LinearAlgebraDistribution
void build_distribution(const LinearAlgebraDistribution *const dist_pt)
setup the distribution of this distributable linear algebra object
Abstract base class for matrices of doubles – adds abstract interfaces for solving,...
A vector in the mathematical sense, initially developed for linear algebra type applications....
The Identity Preconditioner.
void preconditioner_solve_transpose(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner. This method should apply the preconditioner operator to the vector r and re...
IdentityPreconditioner(const IdentityPreconditioner &)=delete
Broken copy constructor.
virtual ~IdentityPreconditioner()
Destructor (empty)
void operator=(const IdentityPreconditioner &)=delete
Broken assignment operator.
virtual void setup()
setup method - just sets the distribution
virtual void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner. This method should apply the preconditioner operator to the vector r and re...
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...
An OomphLibError object which should be thrown when an run-time error is encountered....
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
double Setup_time
The time it takes to set up this preconditioner.
DoubleMatrixBase * Matrix_pt
Storage for a pointer to the matrix.
virtual DoubleMatrixBase * matrix_pt() const
Get function for matrix pointer.
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....
virtual void preconditioner_solve_transpose(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner. Pure virtual generic interface function. This method should apply the preco...
void disable_silent_preconditioner_setup()
Be verbose in the block preconditioner setup.
std::ostream * Stream_pt
Pointer to the output stream – defaults to std::cout.
virtual void set_comm_pt(const OomphCommunicator *const comm_pt)
Set the communicator pointer.
virtual void clean_up_memory()
Clean up memory (empty). Generic interface function.
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....
void operator=(const Preconditioner &)=delete
Broken assignment operator.
void setup(const Problem *problem_pt, DoubleMatrixBase *matrix_pt)
Compatability layer for old preconditioners where problem pointers were needed. The problem pointer i...
Preconditioner()
Constructor.
virtual const OomphCommunicator * comm_pt() const
Get function for comm pointer.
double setup_time() const
Returns the time to setup the preconditioner.
const OomphCommunicator * Comm_pt
Storage for a pointer to the communicator. Null if the preconditioner should not be distributed.
void enable_silent_preconditioner_setup()
Set up the block preconditioner quietly!
virtual ~Preconditioner()
Destructor (empty)
Preconditioner(const Preconditioner &)=delete
Broken copy constructor.
virtual void setup(DoubleMatrixBase *matrix_pt)
Setup the preconditioner: store the matrix pointer and the communicator pointer then call preconditio...
virtual void preconditioner_solve(const DoubleVector &r, DoubleVector &z)=0
Apply the preconditioner. Pure virtual generic interface function. This method should apply the preco...
bool Silent_preconditioner_setup
Boolean to indicate whether or not the build should be done silently.
virtual void set_matrix_pt(DoubleMatrixBase *matrix_pt)
Set the matrix pointer.
virtual void setup()=0
Setup the preconditioner. Pure virtual generic interface function.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
void obsolete()
Output warning message.
double timer()
returns the time in seconds after some point in past
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).