Public Member Functions | Private Attributes | List of all members
oomph::Preconditioner Class Referenceabstract

Preconditioner base class. Gives an interface to call all other preconditioners through and stores the matrix and communicator pointers. All preconditioners should be derived from this class. More...

#include <preconditioner.h>

+ Inheritance diagram for oomph::Preconditioner:

Public Member Functions

 Preconditioner ()
 Constructor. More...
 
 Preconditioner (const Preconditioner &)
 Broken copy constructor. More...
 
void operator= (const Preconditioner &)
 Broken assignment operator. More...
 
virtual ~Preconditioner ()
 Destructor (empty) More...
 
virtual void preconditioner_solve (const DoubleVector &r, DoubleVector &z)=0
 Apply the preconditioner. Pure virtual generic interface function. This method should apply the preconditioner operator to the vector r and return the vector z. 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 void setup ()=0
 Setup the preconditioner. Pure virtual generic interface function. More...
 
virtual void clean_up_memory ()
 Clean up memory (empty). Generic interface function. 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

DoubleMatrixBaseMatrix_pt
 Storage for a pointer to the matrix. More...
 
const OomphCommunicatorComm_pt
 Storage for a pointer to the communicator. Null if the preconditioner should not be distributed. More...
 
double Setup_time
 The time it takes to set up this 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...
 

Detailed Description

Preconditioner base class. Gives an interface to call all other preconditioners through and stores the matrix and communicator pointers. All preconditioners should be derived from this class.

Definition at line 58 of file preconditioner.h.

Constructor & Destructor Documentation

oomph::Preconditioner::Preconditioner ( )
inline

Constructor.

Definition at line 64 of file preconditioner.h.

oomph::Preconditioner::Preconditioner ( const Preconditioner )
inline

Broken copy constructor.

Definition at line 67 of file preconditioner.h.

References oomph::BrokenCopy::broken_copy().

virtual oomph::Preconditioner::~Preconditioner ( )
inlinevirtual

Destructor (empty)

Definition at line 79 of file preconditioner.h.

Member Function Documentation

virtual void oomph::Preconditioner::clean_up_memory ( )
inlinevirtual
virtual const OomphCommunicator* oomph::Preconditioner::comm_pt ( ) const
inlinevirtual
virtual DoubleMatrixBase* oomph::Preconditioner::matrix_pt ( ) const
inlinevirtual
void oomph::Preconditioner::operator= ( const Preconditioner )
inline

Broken assignment operator.

Definition at line 73 of file preconditioner.h.

References oomph::BrokenCopy::broken_assign().

virtual void oomph::Preconditioner::preconditioner_solve ( const DoubleVector r,
DoubleVector z 
)
pure virtual

Apply the preconditioner. Pure virtual generic interface function. This method should apply the preconditioner operator to the vector r and return the vector z.

Implemented in oomph::HelmholtzGMRESMG< MATRIX >, oomph::HyprePreconditioner, oomph::PseudoElasticPreconditionerScalingHelperOld, oomph::NavierStokesSchurComplementPreconditioner, oomph::MGPreconditioner< DIM >, oomph::PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld, oomph::DummyBlockPreconditioner< MATRIX >, oomph::ExactBlockPreconditioner< MATRIX >, oomph::SimpleFSIPreconditioner< MATRIX >, oomph::PseudoElasticPreconditionerSubsidiaryPreconditionerOld, oomph::BlockTriangularPreconditioner< MATRIX >, oomph::HelmholtzMGPreconditioner< DIM >, oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >, oomph::PseudoElasticPreconditionerOld, oomph::BlockDiagonalPreconditioner< MATRIX >, oomph::ILUZeroPreconditioner< CRDoubleMatrix >, oomph::InexactSubBiharmonicPreconditioner, oomph::NewMumpsPreconditioner, oomph::ILUZeroPreconditioner< CCDoubleMatrix >, oomph::IdentityPreconditioner, oomph::ExactSubBiharmonicPreconditioner, oomph::PressureBasedSolidLSCPreconditioner, oomph::LagrangeEnforcedFlowPreconditioner, oomph::FSIPreconditioner, oomph::PseudoElasticPreconditioner, oomph::PseudoElasticFSIPreconditioner, oomph::BiharmonicPreconditioner, oomph::MatrixBasedLumpedPreconditioner< MATRIX >, oomph::MatrixBasedLumpedPreconditioner< oomph::CRDoubleMatrix >, oomph::TrilinosPreconditionerBase, oomph::SuperLUPreconditioner, and oomph::MatrixBasedDiagPreconditioner.

Referenced by oomph::OomphLibPreconditionerEpetraOperator::ApplyInverse(), oomph::BiharmonicPreconditioner::preconditioner_solve(), oomph::FSIPreconditioner::preconditioner_solve(), oomph::LagrangeEnforcedFlowPreconditioner::preconditioner_solve(), oomph::PressureBasedSolidLSCPreconditioner::preconditioner_solve(), oomph::InexactSubBiharmonicPreconditioner::preconditioner_solve(), oomph::PseudoElasticPreconditionerSubsidiaryPreconditionerOld::preconditioner_solve(), oomph::NavierStokesSchurComplementPreconditioner::preconditioner_solve(), oomph::GMRES< MATRIX >::update(), and oomph::HelmholtzGMRESMG< MATRIX >::update().

virtual void oomph::Preconditioner::set_comm_pt ( const OomphCommunicator *const  comm_pt)
inlinevirtual

Set the communicator pointer.

Definition at line 171 of file preconditioner.h.

References comm_pt(), and Comm_pt.

Referenced by oomph::PseudoElasticPreconditionerScalingHelperOld::PseudoElasticPreconditionerScalingHelperOld(), and setup().

virtual void oomph::Preconditioner::set_matrix_pt ( DoubleMatrixBase matrix_pt)
inlinevirtual
void oomph::Preconditioner::setup ( DoubleMatrixBase matrix_pt)
inline
void oomph::Preconditioner::setup ( const Problem problem_pt,
DoubleMatrixBase matrix_pt 
)
inline

Compatability layer for old preconditioners where problem pointers were needed. The problem pointer is only used to get a communicator pointer.

Definition at line 116 of file preconditioner.h.

References oomph::ObsoleteCode::obsolete(), and setup().

virtual void oomph::Preconditioner::setup ( )
pure virtual

Setup the preconditioner. Pure virtual generic interface function.

Implemented in oomph::HelmholtzGMRESMG< MATRIX >, oomph::NavierStokesExactPreconditioner< MATRIX >, oomph::HyprePreconditioner, oomph::PseudoElasticPreconditionerScalingHelperOld, oomph::NavierStokesSchurComplementPreconditioner, oomph::MGPreconditioner< DIM >, oomph::PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld, oomph::DummyBlockPreconditioner< MATRIX >, oomph::ExactBlockPreconditioner< MATRIX >, oomph::SimpleFSIPreconditioner< MATRIX >, oomph::HelmholtzMGPreconditioner< DIM >, oomph::PseudoElasticPreconditionerSubsidiaryPreconditionerOld, oomph::BlockTriangularPreconditioner< MATRIX >, oomph::InnerIterationPreconditioner< SOLVER, PRECONDITIONER >, oomph::PressureBasedSolidExactPreconditioner< MATRIX >, oomph::BlockDiagonalPreconditioner< MATRIX >, oomph::PseudoElasticPreconditionerOld, oomph::ILUZeroPreconditioner< CRDoubleMatrix >, oomph::InexactSubBiharmonicPreconditioner, oomph::ILUZeroPreconditioner< CCDoubleMatrix >, oomph::NewMumpsPreconditioner, oomph::ExactSubBiharmonicPreconditioner, oomph::IdentityPreconditioner, oomph::PressureBasedSolidLSCPreconditioner, oomph::LagrangeEnforcedFlowPreconditioner, oomph::MatrixBasedLumpedPreconditioner< MATRIX >, oomph::FSIPreconditioner, oomph::PseudoElasticPreconditioner, oomph::MatrixBasedLumpedPreconditioner< MATRIX >, oomph::PseudoElasticFSIPreconditioner, oomph::BiharmonicPreconditioner, oomph::MatrixBasedLumpedPreconditioner< MATRIX >, oomph::MatrixBasedLumpedPreconditioner< oomph::CRDoubleMatrix >, oomph::TrilinosPreconditionerBase, oomph::MatrixBasedDiagPreconditioner, and oomph::SuperLUPreconditioner.

Referenced by setup(), oomph::PseudoElasticFSIPreconditioner::setup(), and oomph::PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld::setup().

double oomph::Preconditioner::setup_time ( ) const
inline

Returns the time to setup the preconditioner.

Definition at line 175 of file preconditioner.h.

References Setup_time.

Referenced by oomph::FSIPreconditioner::setup().

virtual void oomph::Preconditioner::turn_into_subsidiary_block_preconditioner ( BlockPreconditioner< CRDoubleMatrix > *  master_block_prec_pt,
const Vector< unsigned > &  doftype_in_master_preconditioner_coarse 
)
inlinevirtual

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.

Reimplemented in oomph::BlockPreconditioner< CRDoubleMatrix >.

Definition at line 185 of file preconditioner.h.

virtual void oomph::Preconditioner::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 
)
inlinevirtual

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.

Reimplemented in oomph::BlockPreconditioner< CRDoubleMatrix >.

Definition at line 193 of file preconditioner.h.

Member Data Documentation

const OomphCommunicator* oomph::Preconditioner::Comm_pt
private

Storage for a pointer to the communicator. Null if the preconditioner should not be distributed.

Definition at line 204 of file preconditioner.h.

Referenced by comm_pt(), and set_comm_pt().

DoubleMatrixBase* oomph::Preconditioner::Matrix_pt
private

Storage for a pointer to the matrix.

Definition at line 200 of file preconditioner.h.

Referenced by matrix_pt(), and set_matrix_pt().

double oomph::Preconditioner::Setup_time
private

The time it takes to set up this preconditioner.

Definition at line 207 of file preconditioner.h.

Referenced by setup(), and setup_time().


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