27#ifndef OOMPH_GENERAL_PRECONDITION_HEADER
28#define OOMPH_GENERAL_PRECONDITION_HEADER
33#include <oomph-lib-config.h>
79 template<
typename MATRIX>
125 throw OomphLibError(
"The preconditioner has not been setup.",
142 throw OomphLibError(
"The inverse lumped vector has not been created. "
143 "Created in setup(...)",
258 template<
typename MATRIX>
360 template<
class SOLVER,
class PRECONDITIONER>
379 "The template argument SOLVER must be of type IterativeLinearSolver",
386 "The template argument PRECONDITIONER must be of type Preconditioner",
393 Solver_pt->disable_setup_preconditioner_before_solve();
A class for compressed column matrices that store doubles.
A class for compressed row matrices. This is a distributable object.
Class for a compressed-matrix coefficent (for either CC or CR matrices). Contains the (row or column)...
~CompressedMatrixCoefficient()
Destructor (does nothing)
unsigned & index()
access function for the coefficient's (row or column) index
bool operator<(const CompressedMatrixCoefficient &a) const
Less Than Operator (for the STL sort function)
CompressedMatrixCoefficient()
Constructor (no arguments)
CompressedMatrixCoefficient(const unsigned &index, const double &value)
Constructor (takes the index and value as arguments)
double value() const
access function for the coefficient's value (const version)
double Value
the value of the compressed-matrix coefficient
CompressedMatrixCoefficient(const CompressedMatrixCoefficient &a)
Copy Constructor. Not Broken. Required for STL sort function.
double & value()
access function for the coefficient value
void operator=(const CompressedMatrixCoefficient &a)
Assignment Operator. Not Broken. Required for STL sort function.
unsigned Index
the row or column index of the compressed-matrix coefficient
unsigned index() const
Access function for the coefficient's (row or column_ index (const version)
Base class for any linear algebra object that is distributable. Just contains storage for the LinearA...
unsigned nrow() const
access function to the number of global rows.
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
A vector in the mathematical sense, initially developed for linear algebra type applications....
Vector< unsigned > L_column_start
Column start for lower triangular matrix.
Vector< CompressedMatrixCoefficient > U_row_entry
Row entry for the upper triangular matrix (each element of the vector contains the row index and coef...
void operator=(const ILUZeroPreconditioner &)=delete
Broken assignment operator.
Vector< CompressedMatrixCoefficient > L_row_entry
Row entry for the lower triangular matrix (each element of the vector contains the row index and coef...
~ILUZeroPreconditioner()
Destructor (empty)
Vector< unsigned > U_column_start
Column start for upper triangular matrix.
ILUZeroPreconditioner(const ILUZeroPreconditioner &)=delete
Broken copy constructor.
ILUZeroPreconditioner()
Constructor (empty)
~ILUZeroPreconditioner()
Destructor (empty)
ILUZeroPreconditioner(const ILUZeroPreconditioner &)=delete
Broken copy constructor.
ILUZeroPreconditioner()
Constructor (empty)
Vector< CompressedMatrixCoefficient > U_row_entry
column entry for the upper triangular matrix (each element of the vector contains the column index an...
Vector< unsigned > U_row_start
Row start for upper triangular matrix.
Vector< unsigned > L_row_start
Row start for lower triangular matrix.
void operator=(const ILUZeroPreconditioner &)=delete
Broken assignment operator.
Vector< CompressedMatrixCoefficient > L_row_entry
column entry for the lower triangular matrix (each element of the vector contains the column index an...
A preconditioner for performing inner iteration preconditioner solves. The template argument SOLVER s...
void setup()
Preconditioner setup method. Setup the preconditioner for the inner iteration solver.
void clean_up_memory()
Clean up memory (empty). Generic interface function.
InnerIterationPreconditioner()
Constructor.
PRECONDITIONER * preconditioner_pt()
double & tolerance()
Access to convergence tolerance of the inner iteration solver.
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Preconditioner solve method. Performs the specified number of Krylov iterations preconditioned with t...
~InnerIterationPreconditioner()
SOLVER * Solver_pt
pointer to the underlying solver
unsigned & max_iter()
Access to max. number of iterations of the inner iteration solver.
PRECONDITIONER * Preconditioner_pt
pointer to the underlying preconditioner
Base class for all linear iterative solvers. This merely defines standard interfaces for linear itera...
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
Matrix-based diagonal preconditioner.
void operator=(const MatrixBasedDiagPreconditioner &)=delete
Broken assignment operator.
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply preconditioner to z, i.e. z=D^-1.
Vector< double > Inv_diag
Vector of inverse diagonal entries.
MatrixBasedDiagPreconditioner(const MatrixBasedDiagPreconditioner &)=delete
Broken copy constructor.
MatrixBasedDiagPreconditioner()
Constructor (empty)
void setup()
Setup the preconditioner (store diagonal) from the fully assembled matrix.
~MatrixBasedDiagPreconditioner()
Destructor (empty)
Matrix-based lumped preconditioner.
void clean_up_memory()
clean up memory - just delete the inverse lumped vector
~MatrixBasedLumpedPreconditioner()
Destructor.
MatrixBasedLumpedPreconditioner(const MatrixBasedDiagPreconditioner &)=delete
Broken copy constructor.
bool positive_matrix() const
Access function to the Positive_matrix which indicates whether lumped matrix was positive.
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply preconditioner to z, i.e. z=D^-1.
double * inverse_lumped_vector_pt()
Access function to the inverse of the lumped vector assembled in the preconditioner setup routine.
double * Inv_lumped_diag_pt
Vector of inverse diagonal entries.
void setup()
Setup the preconditioner (store diagonal) from the fully assembled matrix. Problem pointer is ignored...
unsigned & nrow()
Access function to number of rows for this preconditioner.
void operator=(const MatrixBasedLumpedPreconditioner &)=delete
Broken assignment operator.
MatrixBasedLumpedPreconditioner()
Constructor.
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...
virtual DoubleMatrixBase * matrix_pt() const
Get function for matrix pointer.
virtual const OomphCommunicator * comm_pt() const
Get function for comm pointer.
virtual void preconditioner_solve(const DoubleVector &r, DoubleVector &z)=0
Apply the preconditioner. Pure virtual generic interface function. This method should apply the preco...
virtual void setup()=0
Setup the preconditioner. Pure virtual generic interface function.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).