OOFEM 3.0
Loading...
Searching...
No Matches
oofem::IMLSolver Class Reference

#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.
virtual ~IMLSolver ()
 Destructor.
ConvergedReason solve (SparseMtrx &A, FloatArray &b, FloatArray &x) override
void initializeFrom (InputRecord &ir) override
const char * giveClassName () const override
LinSystSolverType giveLinSystSolverType () const override
SparseMtrxType giveRecommendedMatrix (bool symmetric) const override
Public Member Functions inherited from oofem::SparseLinearSystemNM
 SparseLinearSystemNM (Domain *d, EngngModel *m)
 Constructor.
virtual ~SparseLinearSystemNM ()
 Destructor.
std::string errorInfo (const char *func)
virtual ConvergedReason solve (SparseMtrx &A, FloatMatrix &B, FloatMatrix &X)
Public Member Functions inherited from oofem::NumericalMethod
 NumericalMethod (Domain *d, EngngModel *m)
virtual ~NumericalMethod ()
 Destructor.
EngngModelgiveEngngModel ()
virtual void reinitialize ()
virtual void setDomain (Domain *d)
virtual void saveContext (DataStream &stream, ContextMode mode)
virtual void restoreContext (DataStream &stream, ContextMode mode)

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.
SparseMtrx::SparseMtrxVersionType lhsVersion
 Last mapped matrix version.
std::unique_ptr< PreconditionerM
 Preconditioner.
IMLSolverType solverType
 IML Solver type.
IMLPrecondType precondType
 IML Preconditioner type.
bool precondInit
 Precond. init flag.
double tol
 Tolerance of residual.
int maxite
 Max number of iterations.

Additional Inherited Members

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

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 64 of file imlsolver.h.

Member Enumeration Documentation

◆ IMLPrecondType

Preconditioner type.

Enumerator
IML_VoidPrec 
IML_DiagPrec 
IML_ILU_CompColPrec 
IML_ILU_CompRowPrec 
IML_ICPrec 

Definition at line 70 of file imlsolver.h.

◆ IMLSolverType

Solver type.

Enumerator
IML_ST_CG 
IML_ST_GMRES 

Definition at line 68 of file imlsolver.h.

Constructor & Destructor Documentation

◆ IMLSolver()

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

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

◆ ~IMLSolver()

virtual oofem::IMLSolver::~IMLSolver ( )
inlinevirtual

Destructor.

Definition at line 96 of file imlsolver.h.

Member Function Documentation

◆ giveClassName()

const char * oofem::IMLSolver::giveClassName ( ) const
inlineoverridevirtual

Implements oofem::SparseLinearSystemNM.

Definition at line 101 of file imlsolver.h.

◆ giveLinSystSolverType()

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

Implements oofem::SparseLinearSystemNM.

Definition at line 102 of file imlsolver.h.

References oofem::ST_IML.

◆ giveRecommendedMatrix()

SparseMtrxType oofem::IMLSolver::giveRecommendedMatrix ( bool symmetric) const
inlineoverridevirtual

Returns the recommended sparse matrix type for this solver.

Implements oofem::SparseLinearSystemNM.

Definition at line 103 of file imlsolver.h.

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

◆ initializeFrom()

◆ solve()

ConvergedReason oofem::IMLSolver::solve ( SparseMtrx & A,
FloatArray & b,
FloatArray & x )
overridevirtual

Solves the given sparse linear system of equations \( A\cdot x=b \).

Parameters
ACoefficient matrix.
bRight hand side.
xSolution array.
Returns
Status of the solver.

Implements oofem::SparseLinearSystemNM.

Definition at line 102 of file imlsolver.C.

References oofem::CR_CONVERGED, oofem::CR_DIVERGED_ITS, oofem::Timer::getUtime(), oofem::FloatArray::giveSize(), oofem::SparseMtrx::giveVersion(), IML_ST_CG, IML_ST_GMRES, lhs, lhsVersion, M, maxite, OOFEM_ERROR, OOFEM_LOG_INFO, precondInit, solverType, oofem::Timer::startTimer(), oofem::Timer::stopTimer(), and tol.

Member Data Documentation

◆ lhs

SparseMtrx* oofem::IMLSolver::lhs
private

Last mapped Lhs matrix.

Definition at line 73 of file imlsolver.h.

Referenced by solve().

◆ lhsVersion

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

Last mapped matrix version.

Definition at line 75 of file imlsolver.h.

Referenced by solve().

◆ M

std::unique_ptr<Preconditioner> oofem::IMLSolver::M
private

Preconditioner.

Definition at line 77 of file imlsolver.h.

Referenced by initializeFrom(), and solve().

◆ maxite

int oofem::IMLSolver::maxite
private

Max number of iterations.

Definition at line 90 of file imlsolver.h.

Referenced by initializeFrom(), and solve().

◆ precondInit

bool oofem::IMLSolver::precondInit
private

Precond. init flag.

Definition at line 83 of file imlsolver.h.

Referenced by solve().

◆ precondType

IMLPrecondType oofem::IMLSolver::precondType
private

IML Preconditioner type.

Definition at line 81 of file imlsolver.h.

Referenced by initializeFrom().

◆ solverType

IMLSolverType oofem::IMLSolver::solverType
private

IML Solver type.

Definition at line 79 of file imlsolver.h.

Referenced by initializeFrom(), and solve().

◆ tol

double oofem::IMLSolver::tol
private

Tolerance of residual.

Definition at line 88 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-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