OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Implemantation of ILU (Incomplete LU) Preconditioner. More...
#include <iluprecond.h>
Public Member Functions | |
CompCol_ILUPreconditioner (const SparseMtrx &A, InputRecord &attributes) | |
Constructor. Initializes the the receiver (constructs the precontioning matrix M) of given matrix. More... | |
CompCol_ILUPreconditioner () | |
Constructor. The user should call initializeFrom and init services in this given order to ensure consistency. More... | |
virtual | ~CompCol_ILUPreconditioner (void) |
Destructor. More... | |
virtual void | init (const SparseMtrx &) |
Initializes the receiver (constructs the preconditioning matrix M) of given matrix. More... | |
void | initialize (const CompCol &A) |
void | initialize (const DynCompCol &A) |
void | solve (const FloatArray &x, FloatArray &y) const |
Solves the linear system. More... | |
void | trans_solve (const FloatArray &x, FloatArray &y) const |
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... | |
Public Member Functions inherited from oofem::Preconditioner | |
Preconditioner (const SparseMtrx &a, InputRecord &attributes) | |
Constructor. More... | |
Preconditioner () | |
Constructor. More... | |
virtual | ~Preconditioner (void) |
Destructor. More... | |
FloatArray | solve (const FloatArray &rhs) const |
Solves the linear system. More... | |
FloatArray | trans_solve (const FloatArray &rhs) const |
Solves transposed system. More... | |
Protected Member Functions | |
void | qsortRow (IntArray &, FloatArray &, int l, int r) |
int | qsortRowPartition (IntArray &, FloatArray &, int l, int r) |
Private Attributes | |
FloatArray | l_val_ |
IntArray | l_colptr_ |
IntArray | l_rowind_ |
int | l_nz_ |
FloatArray | u_val_ |
IntArray | u_colptr_ |
IntArray | u_rowind_ |
int | u_nz_ |
int | dim_ [2] |
Implemantation of ILU (Incomplete LU) Preconditioner.
No fill-up - ILU(0).
Definition at line 45 of file iluprecond.h.
oofem::CompCol_ILUPreconditioner::CompCol_ILUPreconditioner | ( | const SparseMtrx & | A, |
InputRecord & | attributes | ||
) |
Constructor. Initializes the the receiver (constructs the precontioning matrix M) of given matrix.
Definition at line 47 of file iluprecond.C.
|
inline |
Constructor. The user should call initializeFrom and init services in this given order to ensure consistency.
Definition at line 64 of file iluprecond.h.
|
inlinevirtual |
Destructor.
Definition at line 66 of file iluprecond.h.
|
inlinevirtual |
Returns the preconditioner name.
Reimplemented from oofem::Preconditioner.
Definition at line 76 of file iluprecond.h.
|
virtual |
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 from oofem::Preconditioner.
Definition at line 58 of file iluprecond.C.
References oofem::Timer::getUtime(), initialize(), OOFEM_ERROR, OOFEM_LOG_INFO, oofem::Timer::startTimer(), and oofem::Timer::stopTimer().
void oofem::CompCol_ILUPreconditioner::initialize | ( | const CompCol & | A | ) |
Definition at line 81 of file iluprecond.C.
References oofem::CompCol::col_ptr(), oofem::CompCol::dim(), dim_, oofem::SparseMtrx::giveNumberOfColumns(), oofem::SparseMtrx::giveNumberOfRows(), l_colptr_, l_nz_, l_rowind_, l_val_, oofem::IntArray::resize(), oofem::FloatArray::resize(), oofem::CompCol::row_ind(), u_colptr_, u_nz_, u_rowind_, u_val_, and oofem::CompCol::val().
Referenced by init().
void oofem::CompCol_ILUPreconditioner::initialize | ( | const DynCompCol & | A | ) |
Definition at line 177 of file iluprecond.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::DynCompCol::column(), dim_, oofem::SparseMtrx::giveNumberOfColumns(), oofem::SparseMtrx::giveNumberOfRows(), oofem::IntArray::giveSize(), l_colptr_, l_nz_, l_rowind_, l_val_, qsortRow(), oofem::IntArray::resize(), oofem::FloatArray::resize(), oofem::DynCompCol::row_ind(), u_colptr_, u_nz_, u_rowind_, and u_val_.
|
virtual |
Initializes receiver from given record. Empty implementation.
Reimplemented from oofem::Preconditioner.
Definition at line 51 of file iluprecond.C.
References oofem::Preconditioner::initializeFrom().
|
protected |
Definition at line 379 of file iluprecond.C.
References qsortRowPartition().
Referenced by initialize().
|
protected |
Definition at line 392 of file iluprecond.C.
Referenced by qsortRow().
|
virtual |
Solves the linear system.
rhs | Right hand side. |
solution | Solution. |
Implements oofem::Preconditioner.
Definition at line 312 of file iluprecond.C.
References oofem::FloatArray::giveSize(), l_colptr_, l_rowind_, l_val_, oofem::FloatArray::resize(), u_colptr_, u_rowind_, u_val_, and oofem::FloatArray::zero().
|
virtual |
Solves the transposed system.
rhs | Right hand side. |
solution | Solution. |
Implements oofem::Preconditioner.
Definition at line 343 of file iluprecond.C.
References oofem::FloatArray::at(), oofem::FloatArray::giveSize(), l_colptr_, l_rowind_, l_val_, oofem::FloatArray::resize(), u_colptr_, u_rowind_, and u_val_.
|
private |
Definition at line 58 of file iluprecond.h.
Referenced by initialize().
|
private |
Definition at line 49 of file iluprecond.h.
Referenced by initialize(), solve(), and trans_solve().
|
private |
Definition at line 51 of file iluprecond.h.
Referenced by initialize().
|
private |
Definition at line 50 of file iluprecond.h.
Referenced by initialize(), solve(), and trans_solve().
|
private |
Definition at line 48 of file iluprecond.h.
Referenced by initialize(), solve(), and trans_solve().
|
private |
Definition at line 54 of file iluprecond.h.
Referenced by initialize(), solve(), and trans_solve().
|
private |
Definition at line 56 of file iluprecond.h.
Referenced by initialize().
|
private |
Definition at line 55 of file iluprecond.h.
Referenced by initialize(), solve(), and trans_solve().
|
private |
Definition at line 53 of file iluprecond.h.
Referenced by initialize(), solve(), and trans_solve().