KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType > Class Template Reference

Base class for all the iterative solvers in Kratos. More...

#include <iterative_solver.h>

Inheritance diagram for Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >:
Collaboration diagram for Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >:

Public Member Functions

Life Cycle
 IterativeSolver ()
 Default constructor. More...
 
 IterativeSolver (double NewTolerance)
 
 IterativeSolver (double NewTolerance, unsigned int NewMaxIterationsNumber)
 
 IterativeSolver (double NewTolerance, unsigned int NewMaxIterationsNumber, typename TPreconditionerType::Pointer pNewPreconditioner)
 
 IterativeSolver (Parameters settings, typename TPreconditionerType::Pointer pNewPreconditioner=Kratos::make_shared< TPreconditionerType >())
 
 IterativeSolver (const IterativeSolver &Other)
 Copy constructor. More...
 
 ~IterativeSolver () override
 Destructor. More...
 
Operators
IterativeSolveroperator= (const IterativeSolver &Other)
 Assignment operator. More...
 
void InitializeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override
 
void FinalizeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override
 
void Clear () override
 
bool AdditionalPhysicalDataIsNeeded () override
 
void ProvideAdditionalData (SparseMatrixType &rA, VectorType &rX, VectorType &rB, typename ModelPart::DofsArrayType &rdof_set, ModelPart &r_model_part) override
 
Access
virtual TPreconditionerType::Pointer GetPreconditioner (void)
 
virtual const TPreconditionerType::Pointer GetPreconditioner (void) const
 
virtual void SetPreconditioner (typename TPreconditionerType::Pointer pNewPreconditioner)
 
virtual void SetMaxIterationsNumber (unsigned int NewMaxIterationsNumber)
 
virtual IndexType GetMaxIterationsNumber ()
 
virtual void SetIterationsNumber (unsigned int NewIterationNumber)
 
IndexType GetIterationsNumber () override
 
void SetTolerance (double NewTolerance) override
 This method allows to set the tolerance in the linear solver. More...
 
double GetTolerance () override
 This method allows to get the tolerance in the linear solver. More...
 
virtual void SetResidualNorm (double NewResidualNorm)
 
virtual double GetResidualNorm ()
 
Inquiry
virtual bool IterationNeeded ()
 
virtual bool IsConverged ()
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >
 LinearSolver ()
 Default constructor. More...
 
 LinearSolver (Reorderer< TSparseSpaceType, TDenseSpaceType > NewReorderer)
 Constructor with specific reorderer. More...
 
 LinearSolver (const LinearSolver &Other)
 Copy constructor. More...
 
virtual ~LinearSolver ()
 Destructor. More...
 
LinearSolveroperator= (const LinearSolver &Other)
 Assignment operator. More...
 
virtual void Initialize (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void PerformSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual bool Solve (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual bool Solve (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB)
 
virtual void Solve (SparseMatrixType &K, SparseMatrixType &M, DenseVectorType &Eigenvalues, DenseMatrixType &Eigenvectors)
 
virtual TReordererType::Pointer GetReorderer ()
 
virtual void SetReorderer (typename TReordererType::Pointer pNewReorderer)
 
virtual bool IsConsistent (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 This method checks if the dimensions of the system of equations are consistent. More...
 
virtual bool IsConsistent (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB)
 This method checks if the dimensions of the system of equations are consistent (dense matrix for RHS and unknowns version) More...
 
virtual bool IsNotConsistent (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 This method checks if the dimensions of the system of equations are not consistent. More...
 
virtual bool IsNotConsistent (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB)
 This method checks if the dimensions of the system of equations are not consistent. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (LinearSolver)
 Pointer definition of LinearSolver. More...
 

Protected Member Functions

Protected Operations
void PreconditionedMult (SparseMatrixType &rA, VectorType &rX, VectorType &rY)
 
void PreconditionedTransposeMult (SparseMatrixType &rA, VectorType &rX, VectorType &rY)
 

Protected Attributes

Protected member Variables
double mResidualNorm
 
double mFirstResidualNorm
 
IndexType mIterationsNumber
 
double mBNorm
 

Type Definitions

typedef LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType > BaseType
 
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
typedef TPreconditionerType PreconditionerType
 
typedef TSparseSpaceType::IndexType IndexType
 The index type definition to be consistent. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (IterativeSolver)
 Pointer definition of IterativeSolver. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::MatrixPointerType SparseMatrixPointerType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TSparseSpaceType::VectorPointerType VectorPointerType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
typedef TDenseSpaceType::VectorType DenseVectorType
 
typedef std::size_t SizeType
 
typedef TSparseSpaceType::IndexType IndexType
 The index type definition to be consistent. More...
 

Detailed Description

template<class TSparseSpaceType, class TDenseSpaceType, class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
class Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >

Base class for all the iterative solvers in Kratos.

This class define the general interface for the iterative solvers in Kratos. iterative solver is a template class with this parameter:

Member Typedef Documentation

◆ BaseType

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef LinearSolver<TSparseSpaceType, TDenseSpaceType, TReordererType> Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::BaseType

◆ DenseMatrixType

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TDenseSpaceType::MatrixType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::DenseMatrixType

◆ IndexType

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::IndexType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IndexType

The index type definition to be consistent.

◆ PreconditionerType

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TPreconditionerType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::PreconditionerType

◆ SparseMatrixType

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::MatrixType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::SparseMatrixType

◆ VectorType

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::VectorType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::VectorType

Constructor & Destructor Documentation

◆ IterativeSolver() [1/6]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterativeSolver ( )
inline

Default constructor.

◆ IterativeSolver() [2/6]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterativeSolver ( double  NewTolerance)
inline

◆ IterativeSolver() [3/6]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterativeSolver ( double  NewTolerance,
unsigned int  NewMaxIterationsNumber 
)
inline

◆ IterativeSolver() [4/6]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterativeSolver ( double  NewTolerance,
unsigned int  NewMaxIterationsNumber,
typename TPreconditionerType::Pointer  pNewPreconditioner 
)
inline

◆ IterativeSolver() [5/6]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterativeSolver ( Parameters  settings,
typename TPreconditionerType::Pointer  pNewPreconditioner = Kratos::make_shared<TPreconditionerType>() 
)
inline

◆ IterativeSolver() [6/6]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterativeSolver ( const IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType > &  Other)
inline

Copy constructor.

◆ ~IterativeSolver()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::~IterativeSolver ( )
inlineoverride

Destructor.

Member Function Documentation

◆ AdditionalPhysicalDataIsNeeded()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
bool Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::AdditionalPhysicalDataIsNeeded ( )
inlineoverridevirtual

Some solvers may require a minimum degree of knowledge of the structure of the matrix. To make an example when solving a mixed u-p problem, it is important to identify the row associated to v and p. another example is the automatic prescription of rotation null-space for smoothed-aggregation solvers which require knowledge on the spatial position of the nodes associated to a given dof. This function tells if the solver requires such data

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

◆ Clear()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::Clear ( )
inlineoverridevirtual

This function is designed to clean up all internal data in the solver. Clear is designed to leave the solver object as if newly created. After a clear a new Initialize is needed

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

◆ FinalizeSolutionStep()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::FinalizeSolutionStep ( SparseMatrixType rA,
VectorType rX,
VectorType rB 
)
inlineoverridevirtual

This function is designed to be called at the end of the solve step. for example this is the place to remove any data that we do not want to save for later

Parameters
rA.System matrix
rX.Solution vector. it's also the initial guess for iterative linear solvers.
rB.Right hand side vector.

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

◆ GetIterationsNumber()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
IndexType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::GetIterationsNumber ( )
inlineoverridevirtual

◆ GetMaxIterationsNumber()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual IndexType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::GetMaxIterationsNumber ( )
inlinevirtual

◆ GetPreconditioner() [1/2]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual TPreconditionerType::Pointer Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::GetPreconditioner ( void  )
inlinevirtual

◆ GetPreconditioner() [2/2]

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual const TPreconditionerType::Pointer Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::GetPreconditioner ( void  ) const
inlinevirtual

◆ GetResidualNorm()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual double Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::GetResidualNorm ( )
inlinevirtual

◆ GetTolerance()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
double Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::GetTolerance ( )
inlineoverridevirtual

This method allows to get the tolerance in the linear solver.

Returns
The tolerance

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

◆ Info()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
std::string Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::Info ( ) const
inlineoverridevirtual

◆ InitializeSolutionStep()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::InitializeSolutionStep ( SparseMatrixType rA,
VectorType rX,
VectorType rB 
)
inlineoverridevirtual

This function is designed to be called every time the coefficients change in the system that is, normally at the beginning of each solve. For example if we are implementing a direct solver, this is the place to do the factorization so that then the backward substitution can be performed effectively more than once

Parameters
rA.System matrix
rX.Solution vector. it's also the initial guess for iterative linear solvers.
rB.Right hand side vector.

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

◆ IsConverged()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual bool Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IsConverged ( )
inlinevirtual

◆ IterationNeeded()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual bool Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::IterationNeeded ( )
inlinevirtual

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::KRATOS_CLASS_POINTER_DEFINITION ( IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >  )

Pointer definition of IterativeSolver.

◆ operator=()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
IterativeSolver& Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::operator= ( const IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType > &  Other)
inline

Assignment operator.

◆ PreconditionedMult()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::PreconditionedMult ( SparseMatrixType rA,
VectorType rX,
VectorType rY 
)
inlineprotected

◆ PreconditionedTransposeMult()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::PreconditionedTransposeMult ( SparseMatrixType rA,
VectorType rX,
VectorType rY 
)
inlineprotected

◆ PrintData()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ PrintInfo()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ ProvideAdditionalData()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::ProvideAdditionalData ( SparseMatrixType rA,
VectorType rX,
VectorType rB,
typename ModelPart::DofsArrayType rdof_set,
ModelPart r_model_part 
)
inlineoverridevirtual

Some solvers may require a minimum degree of knowledge of the structure of the matrix. To make an example when solving a mixed u-p problem, it is important to identify the row associated to v and p. another example is the automatic prescription of rotation null-space for smoothed-aggregation solvers which require knowledge on the spatial position of the nodes associated to a given dof. This function is the place to eventually provide such data

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

◆ SetIterationsNumber()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::SetIterationsNumber ( unsigned int  NewIterationNumber)
inlinevirtual

◆ SetMaxIterationsNumber()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::SetMaxIterationsNumber ( unsigned int  NewMaxIterationsNumber)
inlinevirtual

◆ SetPreconditioner()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::SetPreconditioner ( typename TPreconditionerType::Pointer  pNewPreconditioner)
inlinevirtual

◆ SetResidualNorm()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
virtual void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::SetResidualNorm ( double  NewResidualNorm)
inlinevirtual

◆ SetTolerance()

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::SetTolerance ( double  NewTolerance)
inlineoverridevirtual

This method allows to set the tolerance in the linear solver.

Parameters
NewToleranceThe new tolerance set

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.

Member Data Documentation

◆ mBNorm

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
double Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::mBNorm
protected

◆ mFirstResidualNorm

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
double Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::mFirstResidualNorm
protected

◆ mIterationsNumber

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
IndexType Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::mIterationsNumber
protected

◆ mResidualNorm

template<class TSparseSpaceType , class TDenseSpaceType , class TPreconditionerType = Preconditioner<TSparseSpaceType, TDenseSpaceType>, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
double Kratos::IterativeSolver< TSparseSpaceType, TDenseSpaceType, TPreconditionerType, TReordererType >::mResidualNorm
protected

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