Public Member Functions | Private Attributes | List of all members
oomph::MatrixBasedLumpedPreconditioner< MATRIX > Class Template Reference

Matrix-based lumped preconditioner. More...

#include <general_purpose_preconditioners.h>

+ Inheritance diagram for oomph::MatrixBasedLumpedPreconditioner< MATRIX >:

Public Member Functions

 MatrixBasedLumpedPreconditioner ()
 Constructor.
 
 ~MatrixBasedLumpedPreconditioner ()
 Destructor.
 
 MatrixBasedLumpedPreconditioner (const MatrixBasedDiagPreconditioner &)=delete
 Broken copy constructor.
 
void operator= (const MatrixBasedLumpedPreconditioner &)=delete
 Broken assignment operator.
 
void preconditioner_solve (const DoubleVector &r, DoubleVector &z)
 Apply preconditioner to z, i.e. z=D^-1.
 
void setup ()
 Setup the preconditioner (store diagonal) from the fully assembled matrix. Problem pointer is ignored.
 
bool positive_matrix () const
 Access function to the Positive_matrix which indicates whether lumped matrix was positive.
 
doubleinverse_lumped_vector_pt ()
 Access function to the inverse of the lumped vector assembled in the preconditioner setup routine.
 
unsignednrow ()
 Access function to number of rows for this preconditioner.
 
void clean_up_memory ()
 clean up memory - just delete the inverse lumped vector
 
void setup ()
 Setup the lumped preconditioner. Specialisation for CCDoubleMatrix.
 
void setup ()
 Setup the lumped preconditioner. Specialisation for CRDoubleMatrix.
 
virtual void setup (DoubleMatrixBase *matrix_pt)
 For some reason we need to remind the compiler that there is also a function named setup in the base class.
 
void setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt)
 For some reason we need to remind the compiler that there is also a function named setup in the base class.
 
virtual void setup ()=0
 For some reason we need to remind the compiler that there is also a function named setup in the base class.
 
- Public Member Functions inherited from oomph::Preconditioner
 Preconditioner ()
 Constructor.
 
 Preconditioner (const Preconditioner &)=delete
 Broken copy constructor.
 
void operator= (const Preconditioner &)=delete
 Broken assignment operator.
 
virtual ~Preconditioner ()
 Destructor (empty)
 
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)
 
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.
 
void enable_silent_preconditioner_setup ()
 Set up the block preconditioner quietly!
 
void disable_silent_preconditioner_setup ()
 Be verbose in the block preconditioner setup.
 
virtual DoubleMatrixBasematrix_pt () const
 Get function for matrix pointer.
 
virtual void set_matrix_pt (DoubleMatrixBase *matrix_pt)
 Set the matrix pointer.
 
virtual const OomphCommunicatorcomm_pt () const
 Get function for comm pointer.
 
virtual void set_comm_pt (const OomphCommunicator *const comm_pt)
 Set the communicator pointer.
 
double setup_time () const
 Returns the time to setup the preconditioner.
 
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.
 
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.
 
- Public Member Functions inherited from oomph::DistributableLinearAlgebraObject
 DistributableLinearAlgebraObject ()
 Default constructor - create a distribution.
 
 DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)=delete
 Broken copy constructor.
 
void operator= (const DistributableLinearAlgebraObject &)=delete
 Broken assignment operator.
 
virtual ~DistributableLinearAlgebraObject ()
 Destructor.
 
LinearAlgebraDistributiondistribution_pt () const
 access to the LinearAlgebraDistribution
 
unsigned nrow () const
 access function to the number of global rows.
 
unsigned nrow_local () const
 access function for the num of local rows on this processor.
 
unsigned nrow_local (const unsigned &p) const
 access function for the num of local rows on this processor.
 
unsigned first_row () const
 access function for the first row on this processor
 
unsigned first_row (const unsigned &p) const
 access function for the first row on this processor
 
bool distributed () const
 distribution is serial or distributed
 
bool distribution_built () const
 if the communicator_pt is null then the distribution is not setup then false is returned, otherwise return true
 
void build_distribution (const LinearAlgebraDistribution *const dist_pt)
 setup the distribution of this distributable linear algebra object
 
void build_distribution (const LinearAlgebraDistribution &dist)
 setup the distribution of this distributable linear algebra object
 

Private Attributes

doubleInv_lumped_diag_pt
 Vector of inverse diagonal entries.
 
bool Positive_matrix
 
unsigned Nrow
 

Additional Inherited Members

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

Detailed Description

template<typename MATRIX>
class oomph::MatrixBasedLumpedPreconditioner< MATRIX >

Matrix-based lumped preconditioner.

Definition at line 80 of file general_purpose_preconditioners.h.

Constructor & Destructor Documentation

◆ MatrixBasedLumpedPreconditioner() [1/2]

template<typename MATRIX >
oomph::MatrixBasedLumpedPreconditioner< MATRIX >::MatrixBasedLumpedPreconditioner ( )
inline

◆ ~MatrixBasedLumpedPreconditioner()

◆ MatrixBasedLumpedPreconditioner() [2/2]

template<typename MATRIX >
oomph::MatrixBasedLumpedPreconditioner< MATRIX >::MatrixBasedLumpedPreconditioner ( const MatrixBasedDiagPreconditioner )
delete

Broken copy constructor.

Member Function Documentation

◆ clean_up_memory()

template<typename MATRIX >
void oomph::MatrixBasedLumpedPreconditioner< MATRIX >::clean_up_memory ( )
inlinevirtual

◆ inverse_lumped_vector_pt()

template<typename MATRIX >
double * oomph::MatrixBasedLumpedPreconditioner< MATRIX >::inverse_lumped_vector_pt ( )
inline

Access function to the inverse of the lumped vector assembled in the preconditioner setup routine.

paranoid check that vector has been created

Definition at line 136 of file general_purpose_preconditioners.h.

References oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Inv_lumped_diag_pt.

◆ nrow()

Access function to number of rows for this preconditioner.

Definition at line 153 of file general_purpose_preconditioners.h.

References oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Nrow.

◆ operator=()

Broken assignment operator.

◆ positive_matrix()

template<typename MATRIX >
bool oomph::MatrixBasedLumpedPreconditioner< MATRIX >::positive_matrix ( ) const
inline

Access function to the Positive_matrix which indicates whether lumped matrix was positive.

paranoid check that preconditioner has been setup

Definition at line 119 of file general_purpose_preconditioners.h.

References oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Inv_lumped_diag_pt, and oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Positive_matrix.

◆ preconditioner_solve()

template<typename MATRIX >
void oomph::MatrixBasedLumpedPreconditioner< MATRIX >::preconditioner_solve ( const DoubleVector r,
DoubleVector z 
)
virtual

◆ setup() [1/6]

◆ setup() [2/6]

◆ setup() [3/6]

Setup the preconditioner (store diagonal) from the fully assembled matrix. Problem pointer is ignored.

Implements oomph::Preconditioner.

◆ setup() [4/6]

template<typename MATRIX >
virtual void oomph::Preconditioner::setup ( )
virtual

For some reason we need to remind the compiler that there is also a function named setup in the base class.

Implements oomph::Preconditioner.

◆ setup() [5/6]

template<typename MATRIX >
void oomph::Preconditioner::setup ( const Problem problem_pt,
DoubleMatrixBase matrix_pt 
)
inline

For some reason we need to remind the compiler that there is also a function named setup in the base class.

Definition at line 120 of file preconditioner.h.

◆ setup() [6/6]

template<typename MATRIX >
virtual void oomph::Preconditioner::setup ( DoubleMatrixBase matrix_pt)
inlinevirtual

For some reason we need to remind the compiler that there is also a function named setup in the base class.

Reimplemented from oomph::Preconditioner.

Definition at line 94 of file preconditioner.h.

Member Data Documentation

◆ Inv_lumped_diag_pt

template<typename MATRIX >
double* oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Inv_lumped_diag_pt
private

◆ Nrow

◆ Positive_matrix

template<typename MATRIX >
bool oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Positive_matrix
private

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