OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::IMLSolver Class Reference

Implements the solution of linear system of equation in the form $ A\cdot x=b $ using iterative solvers from IML++ library. More...

#include <imlsolver.h>

+ Inheritance diagram for oofem::IMLSolver:
+ Collaboration diagram for oofem::IMLSolver:

Public Member Functions

 IMLSolver (Domain *d, EngngModel *m)
 Constructor. Creates new instance of LDLTFactorization, with number i, belonging to domain d and Engngmodel m. More...
 
virtual ~IMLSolver ()
 Destructor. More...
 
virtual NM_Status solve (SparseMtrx &A, FloatArray &b, FloatArray &x)
 Solves the given linear system iteratively by method described by IMLSolverType. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 
virtual const char * giveClassName () const
 
virtual LinSystSolverType giveLinSystSolverType () const
 
virtual SparseMtrxType giveRecommendedMatrix (bool symmetric) const
 Returns the recommended sparse matrix type for this solver. More...
 
- Public Member Functions inherited from oofem::SparseLinearSystemNM
 SparseLinearSystemNM (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual ~SparseLinearSystemNM ()
 Destructor. More...
 
std::string errorInfo (const char *func)
 
virtual NM_Status solve (SparseMtrx &A, FloatMatrix &B, FloatMatrix &X)
 Solves the given sparse linear system of equations $ A\cdot X=B $. More...
 
- Public Member Functions inherited from oofem::NumericalMethod
 NumericalMethod (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual ~NumericalMethod ()
 Destructor. More...
 
EngngModelgiveEngngModel ()
 
virtual void reinitialize ()
 Reinitializes the receiver. More...
 
virtual void setDomain (Domain *d)
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 

Private Types

enum  IMLSolverType { IML_ST_CG, IML_ST_GMRES }
 Solver type. More...
 
enum  IMLPrecondType {
  IML_VoidPrec, IML_DiagPrec, IML_ILU_CompColPrec, IML_ILU_CompRowPrec,
  IML_ICPrec
}
 Preconditioner type. More...
 

Private Attributes

SparseMtrxLhs
 Last mapped Lhs matrix. More...
 
SparseMtrx::SparseMtrxVersionType lhsVersion
 Last mapped matrix version. More...
 
PreconditionerM
 Preconditioner. More...
 
IMLSolverType solverType
 IML Solver type. More...
 
IMLPrecondType precondType
 IML Preconditioner type. More...
 
bool precondInit
 Precond. init flag. More...
 
double tol
 Tolerance of residual. More...
 
int maxite
 Max number of iterations. More...
 

Additional Inherited Members

- Protected Attributes inherited from oofem::NumericalMethod
Domaindomain
 Pointer to domain. More...
 
EngngModelengngModel
 Pointer to engineering model. More...
 

Detailed Description

Implements the solution of linear system of equation in the form $ A\cdot x=b $ using iterative solvers from IML++ library.

Can work with any sparse matrix implementation.

Definition at line 61 of file imlsolver.h.

Member Enumeration Documentation

Preconditioner type.

Enumerator
IML_VoidPrec 
IML_DiagPrec 
IML_ILU_CompColPrec 
IML_ILU_CompRowPrec 
IML_ICPrec 

Definition at line 67 of file imlsolver.h.

Solver type.

Enumerator
IML_ST_CG 
IML_ST_GMRES 

Definition at line 65 of file imlsolver.h.

Constructor & Destructor Documentation

oofem::IMLSolver::IMLSolver ( Domain d,
EngngModel m 
)

Constructor. Creates new instance of LDLTFactorization, with number i, belonging to domain d and Engngmodel m.

oofem::IMLSolver::~IMLSolver ( )
virtual

Destructor.

Definition at line 68 of file imlsolver.C.

References M.

Member Function Documentation

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

Implements oofem::SparseLinearSystemNM.

Definition at line 106 of file imlsolver.h.

virtual LinSystSolverType oofem::IMLSolver::giveLinSystSolverType ( ) const
inlinevirtual
Returns
LinSystSolverType value, corresponding to receiver.

Implements oofem::SparseLinearSystemNM.

Definition at line 107 of file imlsolver.h.

References oofem::ST_IML.

virtual SparseMtrxType oofem::IMLSolver::giveRecommendedMatrix ( bool  symmetric) const
inlinevirtual

Returns the recommended sparse matrix type for this solver.

Implements oofem::SparseLinearSystemNM.

Definition at line 108 of file imlsolver.h.

References oofem::SMT_CompCol, and oofem::SMT_SymCompCol.

NM_Status oofem::IMLSolver::solve ( SparseMtrx A,
FloatArray b,
FloatArray x 
)
virtual

Solves the given linear system iteratively by method described by IMLSolverType.

Parameters
ACoefficient matrix.
bRight hand side.
xSolution array.
Returns
Status value.

Implements oofem::SparseLinearSystemNM.

Definition at line 114 of file imlsolver.C.

References oofem::Timer::getUtime(), oofem::Preconditioner::giveClassName(), oofem::FloatArray::giveSize(), oofem::SparseMtrx::giveVersion(), IML_ST_CG, IML_ST_GMRES, oofem::Preconditioner::init(), Lhs, lhsVersion, M, maxite, NM_Success, OOFEM_ERROR, OOFEM_LOG_INFO, precondInit, solverType, oofem::Timer::startTimer(), oofem::Timer::stopTimer(), and tol.

Member Data Documentation

SparseMtrx* oofem::IMLSolver::Lhs
private

Last mapped Lhs matrix.

Definition at line 70 of file imlsolver.h.

Referenced by solve().

SparseMtrx :: SparseMtrxVersionType oofem::IMLSolver::lhsVersion
private

Last mapped matrix version.

Definition at line 72 of file imlsolver.h.

Referenced by solve().

Preconditioner* oofem::IMLSolver::M
private

Preconditioner.

Definition at line 74 of file imlsolver.h.

Referenced by initializeFrom(), solve(), and ~IMLSolver().

int oofem::IMLSolver::maxite
private

Max number of iterations.

Definition at line 87 of file imlsolver.h.

Referenced by initializeFrom(), and solve().

bool oofem::IMLSolver::precondInit
private

Precond. init flag.

Definition at line 80 of file imlsolver.h.

Referenced by solve().

IMLPrecondType oofem::IMLSolver::precondType
private

IML Preconditioner type.

Definition at line 78 of file imlsolver.h.

Referenced by initializeFrom().

IMLSolverType oofem::IMLSolver::solverType
private

IML Solver type.

Definition at line 76 of file imlsolver.h.

Referenced by initializeFrom(), and solve().

double oofem::IMLSolver::tol
private

Tolerance of residual.

Definition at line 85 of file imlsolver.h.

Referenced by initializeFrom(), and solve().


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:36 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011