Public Member Functions | Private Attributes | List of all members
oomph::MatrixBasedDiagPreconditioner Class Reference

Matrix-based diagonal preconditioner. More...

#include <general_purpose_preconditioners.h>

+ Inheritance diagram for oomph::MatrixBasedDiagPreconditioner:

Public Member Functions

 MatrixBasedDiagPreconditioner ()
 Constructor (empty) More...
 
 ~MatrixBasedDiagPreconditioner ()
 Destructor (empty) More...
 
 MatrixBasedDiagPreconditioner (const MatrixBasedDiagPreconditioner &)
 Broken copy constructor. More...
 
void operator= (const MatrixBasedDiagPreconditioner &)
 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. 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 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

Vector< double > Inv_diag
 Vector of inverse diagonal entries. 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

Matrix-based diagonal preconditioner.

Definition at line 56 of file general_purpose_preconditioners.h.

Constructor & Destructor Documentation

oomph::MatrixBasedDiagPreconditioner::MatrixBasedDiagPreconditioner ( )
inline

Constructor (empty)

Definition at line 61 of file general_purpose_preconditioners.h.

oomph::MatrixBasedDiagPreconditioner::~MatrixBasedDiagPreconditioner ( )
inline

Destructor (empty)

Definition at line 64 of file general_purpose_preconditioners.h.

oomph::MatrixBasedDiagPreconditioner::MatrixBasedDiagPreconditioner ( const MatrixBasedDiagPreconditioner )
inline

Broken copy constructor.

Definition at line 67 of file general_purpose_preconditioners.h.

References oomph::BrokenCopy::broken_copy().

Member Function Documentation

void oomph::MatrixBasedDiagPreconditioner::operator= ( const MatrixBasedDiagPreconditioner )
inline

Broken assignment operator.

Definition at line 73 of file general_purpose_preconditioners.h.

References oomph::BrokenCopy::broken_assign().

void oomph::MatrixBasedDiagPreconditioner::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 diagonal.

Implements oomph::Preconditioner.

Definition at line 124 of file general_purpose_preconditioners.cc.

References oomph::DoubleVector::build(), oomph::DoubleVector::built(), oomph::DistributableLinearAlgebraObject::distribution_pt(), i, Inv_diag, oomph::DistributableLinearAlgebraObject::nrow_local(), and oomph::DoubleVector::values_pt().

void oomph::MatrixBasedDiagPreconditioner::setup ( )
virtual

Setup the preconditioner (store diagonal) from the fully assembled matrix.

Setup diagonal preconditioner: Store the inverse of the diagonal entries from the fully assembled matrix.

Implements oomph::Preconditioner.

Definition at line 49 of file general_purpose_preconditioners.cc.

References oomph::DistributableLinearAlgebraObject::build_distribution(), oomph::Preconditioner::comm_pt(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::DistributableLinearAlgebraObject::first_row(), i, Inv_diag, oomph::Preconditioner::matrix_pt(), oomph::DoubleMatrixBase::nrow(), and oomph::DistributableLinearAlgebraObject::nrow_local().

Member Data Documentation

Vector<double> oomph::MatrixBasedDiagPreconditioner::Inv_diag
private

Vector of inverse diagonal entries.

Definition at line 88 of file general_purpose_preconditioners.h.

Referenced by preconditioner_solve(), and setup().


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