OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Preconditioner Class Referenceabstract

Abstract class for IML++ compatible preconditioner. More...

#include <precond.h>

+ Inheritance diagram for oofem::Preconditioner:

Public Member Functions

 Preconditioner (const SparseMtrx &a, InputRecord &attributes)
 Constructor. More...
 
 Preconditioner ()
 Constructor. More...
 
virtual ~Preconditioner (void)
 Destructor. More...
 
virtual void init (const SparseMtrx &a)
 Initializes the receiver (constructs the preconditioning matrix M) of given matrix. More...
 
FloatArray solve (const FloatArray &rhs) const
 Solves the linear system. More...
 
FloatArray trans_solve (const FloatArray &rhs) const
 Solves transposed system. More...
 
virtual void solve (const FloatArray &rhs, FloatArray &solution) const =0
 Solves the linear system. More...
 
virtual void trans_solve (const FloatArray &rhs, FloatArray &solution) const =0
 Solves the transposed system. More...
 
virtual const char * giveClassName () const
 Returns the preconditioner name. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver from given record. Empty implementation. More...
 

Detailed Description

Abstract class for IML++ compatible preconditioner.

Each preconditioner provides solve() and transpose_solve() functionality, so that they can be used interchangeably in the same base iterative method code.

Preconditioner matrix M is typically used to compute $ M^{-1}\cdot x $ or $ (M^{\mathrm{T}})^{-1}\cdot x $ during the course of a basic iterartion, and thus can be seen as taking some input vector and return a corresponding vector.

Definition at line 53 of file precond.h.

Constructor & Destructor Documentation

oofem::Preconditioner::Preconditioner ( const SparseMtrx a,
InputRecord attributes 
)

Constructor.

Initializes the the receiver (constructs the preconditioning matrix M) of given matrix. Calls virtual init service.

Parameters
aSparse matrix to be preconditioned.
attributesAttributes of receiver.

Definition at line 38 of file precond.C.

References init(), and initializeFrom().

oofem::Preconditioner::Preconditioner ( )
inline

Constructor.

The user should call initializeFrom and init services in this given order to ensure consistency.

Definition at line 68 of file precond.h.

virtual oofem::Preconditioner::~Preconditioner ( void  )
inlinevirtual

Destructor.

Definition at line 70 of file precond.h.

Member Function Documentation

virtual const char* oofem::Preconditioner::giveClassName ( ) const
inlinevirtual
virtual void oofem::Preconditioner::init ( const SparseMtrx a)
inlinevirtual

Initializes the receiver (constructs the preconditioning matrix M) of given matrix.

Virtual service, to be implemented by derived classes. Should be called after initializeFrom service.

Parameters
aSparse matrix to be preconditioned.

Reimplemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompCol_ICPreconditioner, oofem::VoidPreconditioner, and oofem::DiagPreconditioner.

Definition at line 77 of file precond.h.

Referenced by Preconditioner(), and oofem::IMLSolver::solve().

virtual IRResultType oofem::Preconditioner::initializeFrom ( InputRecord ir)
inlinevirtual
FloatArray oofem::Preconditioner::solve ( const FloatArray rhs) const
inline

Solves the linear system.

Parameters
rhsRight hand side
Returns
Solution.

Definition at line 84 of file precond.h.

virtual void oofem::Preconditioner::solve ( const FloatArray rhs,
FloatArray solution 
) const
pure virtual

Solves the linear system.

Parameters
rhsRight hand side.
solutionSolution.

Implemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompCol_ICPreconditioner, oofem::VoidPreconditioner, and oofem::DiagPreconditioner.

FloatArray oofem::Preconditioner::trans_solve ( const FloatArray rhs) const
inline

Solves transposed system.

Parameters
rhsRight hand side.
Returns
Solution.

Definition at line 94 of file precond.h.

virtual void oofem::Preconditioner::trans_solve ( const FloatArray rhs,
FloatArray solution 
) const
pure virtual

Solves the transposed system.

Parameters
rhsRight hand side.
solutionSolution.

Implemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompCol_ICPreconditioner, oofem::VoidPreconditioner, and oofem::DiagPreconditioner.


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:39 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011