OOFEM 3.0
Loading...
Searching...
No Matches
oofem::Preconditioner Class Referenceabstract

#include <precond.h>

Inheritance diagram for oofem::Preconditioner:

Public Member Functions

 Preconditioner (const SparseMtrx &a, InputRecord &attributes)
 Preconditioner ()
virtual ~Preconditioner (void)
 Destructor.
virtual void init (const SparseMtrx &a)
FloatArray solve (const FloatArray &rhs) const
FloatArray trans_solve (const FloatArray &rhs) const
virtual void solve (const FloatArray &rhs, FloatArray &solution) const =0
virtual void trans_solve (const FloatArray &rhs, FloatArray &solution) const =0
virtual const char * giveClassName () const
 Returns the preconditioner name.
virtual void initializeFrom (InputRecord &ir)
 Initializes receiver from given record. Empty implementation.

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

◆ Preconditioner() [1/2]

◆ Preconditioner() [2/2]

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.

◆ ~Preconditioner()

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

Destructor.

Definition at line 70 of file precond.h.

Member Function Documentation

◆ giveClassName()

virtual const char * oofem::Preconditioner::giveClassName ( ) const
inlinevirtual

◆ init()

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::CompCol_ICPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompRow_ILUPreconditioner, oofem::DiagPreconditioner, and oofem::VoidPreconditioner.

Definition at line 77 of file precond.h.

Referenced by Preconditioner().

◆ initializeFrom()

virtual void oofem::Preconditioner::initializeFrom ( InputRecord & ir)
inlinevirtual

Initializes receiver from given record. Empty implementation.

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

Definition at line 115 of file precond.h.

Referenced by Preconditioner().

◆ solve() [1/2]

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.

References solve().

Referenced by solve().

◆ solve() [2/2]

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::CompCol_ICPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompRow_ILUPreconditioner, oofem::DiagPreconditioner, and oofem::VoidPreconditioner.

◆ trans_solve() [1/2]

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.

References trans_solve().

Referenced by trans_solve().

◆ trans_solve() [2/2]

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::CompCol_ICPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompRow_ILUPreconditioner, oofem::DiagPreconditioner, and oofem::VoidPreconditioner.


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011