OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Abstract class for IML++ compatible preconditioner. More...
#include <precond.h>
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... | |
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 or during the course of a basic iterartion, and thus can be seen as taking some input vector and return a corresponding vector.
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.
a | Sparse matrix to be preconditioned. |
attributes | Attributes of receiver. |
Definition at line 38 of file precond.C.
References init(), and initializeFrom().
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Returns the preconditioner name.
Reimplemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompCol_ICPreconditioner, oofem::VoidPreconditioner, and oofem::DiagPreconditioner.
Definition at line 113 of file precond.h.
Referenced by oofem::IMLSolver::solve().
|
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.
a | Sparse 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().
|
inlinevirtual |
Initializes receiver from given record. Empty implementation.
Reimplemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, and oofem::CompCol_ICPreconditioner.
Definition at line 115 of file precond.h.
References oofem::IRRT_OK.
Referenced by oofem::CompCol_ICPreconditioner::initializeFrom(), oofem::CompCol_ILUPreconditioner::initializeFrom(), oofem::CompRow_ILUPreconditioner::initializeFrom(), oofem::IMLSolver::initializeFrom(), and Preconditioner().
|
inline |
|
pure virtual |
Solves the linear system.
rhs | Right hand side. |
solution | Solution. |
Implemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompCol_ICPreconditioner, oofem::VoidPreconditioner, and oofem::DiagPreconditioner.
|
inline |
|
pure virtual |
Solves the transposed system.
rhs | Right hand side. |
solution | Solution. |
Implemented in oofem::CompRow_ILUPreconditioner, oofem::CompCol_ILUPreconditioner, oofem::CompCol_ICPreconditioner, oofem::VoidPreconditioner, and oofem::DiagPreconditioner.