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. More...
 
 ~MatrixBasedLumpedPreconditioner ()
 Destructor. More...
 
 MatrixBasedLumpedPreconditioner (const MatrixBasedDiagPreconditioner &)
 Broken copy constructor. More...
 
void operator= (const MatrixBasedLumpedPreconditioner &)
 Broken assignment operator. More...
 
void preconditioner_solve (const DoubleVector &r, DoubleVector &z)
 Apply preconditioner to z, i.e. z=D^-1. More...
 
void setup ()
 Setup the preconditioner (store diagonal) from the fully assembled matrix. Problem pointer is ignored. More...
 
bool positive_matrix () const
 Access function to the Positive_matrix which indicates whether lumped matrix was positive. More...
 
double * inverse_lumped_vector_pt ()
 Access function to the inverse of the lumped vector assembled in the preconditioner setup routine. More...
 
unsigned & nrow ()
 Access function to number of rows for this preconditioner. More...
 
void clean_up_memory ()
 clean up memory - just delete the inverse lumped vector More...
 
template<>
void setup ()
 Setup the lumped preconditioner. Specialisation for CCDoubleMatrix. More...
 
template<>
void setup ()
 Setup the lumped preconditioner. Specialisation for CRDoubleMatrix. More...
 
- Public Member Functions inherited from oomph::Preconditioner
 Preconditioner ()
 Constructor. More...
 
 Preconditioner (const Preconditioner &)
 Broken copy constructor. More...
 
void operator= (const Preconditioner &)
 Broken assignment operator. More...
 
virtual ~Preconditioner ()
 Destructor (empty) 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...
 
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 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)
 
- Public Member Functions inherited from oomph::DistributableLinearAlgebraObject
 DistributableLinearAlgebraObject ()
 Default constructor - create a distribution. More...
 
 DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)
 Broken copy constructor. More...
 
void operator= (const DistributableLinearAlgebraObject &)
 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
 
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

double * Inv_lumped_diag_pt
 Vector of inverse diagonal entries. More...
 
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 More...
 

Detailed Description

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

Matrix-based lumped preconditioner.

Definition at line 95 of file general_purpose_preconditioners.h.

Constructor & Destructor Documentation

◆ MatrixBasedLumpedPreconditioner() [1/2]

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

Constructor.

Definition at line 100 of file general_purpose_preconditioners.h.

◆ ~MatrixBasedLumpedPreconditioner()

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

Destructor.

Definition at line 110 of file general_purpose_preconditioners.h.

◆ MatrixBasedLumpedPreconditioner() [2/2]

Broken copy constructor.

Definition at line 116 of file general_purpose_preconditioners.h.

Member Function Documentation

◆ clean_up_memory()

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

clean up memory - just delete the inverse lumped vector

Reimplemented from oomph::Preconditioner.

Definition at line 178 of file general_purpose_preconditioners.h.

◆ 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 158 of file general_purpose_preconditioners.h.

◆ nrow()

template<typename MATRIX>
unsigned& oomph::MatrixBasedLumpedPreconditioner< MATRIX >::nrow ( )
inline

Access function to number of rows for this preconditioner.

Definition at line 175 of file general_purpose_preconditioners.h.

◆ operator=()

template<typename MATRIX>
void oomph::MatrixBasedLumpedPreconditioner< MATRIX >::operator= ( const MatrixBasedLumpedPreconditioner< MATRIX > &  )
inline

Broken assignment operator.

Definition at line 122 of file general_purpose_preconditioners.h.

◆ 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 140 of file general_purpose_preconditioners.h.

◆ preconditioner_solve()

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

Apply preconditioner to z, i.e. z=D^-1.

Apply preconditioner: Multiply r by the inverse of the lumped matrix.

Implements oomph::Preconditioner.

Definition at line 279 of file general_purpose_preconditioners.cc.

◆ setup() [1/3]

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

◆ setup() [2/3]

template<>
void oomph::MatrixBasedLumpedPreconditioner< CCDoubleMatrix >::setup ( )
virtual

Setup the lumped preconditioner. Specialisation for CCDoubleMatrix.

Implements oomph::Preconditioner.

Definition at line 176 of file general_purpose_preconditioners.cc.

◆ setup() [3/3]

template<>
void oomph::MatrixBasedLumpedPreconditioner< CRDoubleMatrix >::setup ( )
virtual

Setup the lumped preconditioner. Specialisation for CRDoubleMatrix.

Implements oomph::Preconditioner.

Definition at line 228 of file general_purpose_preconditioners.cc.

Member Data Documentation

◆ Inv_lumped_diag_pt

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

Vector of inverse diagonal entries.

Definition at line 187 of file general_purpose_preconditioners.h.

◆ Nrow

template<typename MATRIX>
unsigned oomph::MatrixBasedLumpedPreconditioner< MATRIX >::Nrow
private

Definition at line 193 of file general_purpose_preconditioners.h.

◆ Positive_matrix

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

Definition at line 190 of file general_purpose_preconditioners.h.


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