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::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace > Class Template Reference

Aitken convergence accelerator Aitken formula-based. More...

#include <aitken_convergence_accelerator.hpp>

Inheritance diagram for Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >:
Collaboration diagram for Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >:

Public Member Functions

Life Cycle
 AitkenConvergenceAccelerator (Parameters rConvAcceleratorParameters)
 
 AitkenConvergenceAccelerator (double rOmegaInitial=0.825)
 
 AitkenConvergenceAccelerator (const AitkenConvergenceAccelerator &rOther)
 
virtual BaseTypePointer Clone ()
 
virtual ~AitkenConvergenceAccelerator ()
 
Operations
void InitializeSolutionStep () override
 
void UpdateSolution (const VectorType &rResidualVector, VectorType &rIterationGuess) override
 
void FinalizeNonLinearIteration () override
 
- Public Member Functions inherited from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >
 ConvergenceAccelerator ()=default
 
 ConvergenceAccelerator (Parameters ThisParameters)
 
 ConvergenceAccelerator (const ConvergenceAccelerator &Other)=delete
 
virtual ~ConvergenceAccelerator ()=default
 
virtual void Initialize ()
 Initialize the convergence accelerator Operations that are required to be done once before the resolution of the problem. More...
 
virtual void InitializeNonLinearIteration ()
 Operations before each non-linear iteration Performs all the required operations that should be done before each non-linear iteration. More...
 
virtual void FinalizeSolutionStep ()
 Operations after solving the solution step Performs all the required operations that should be done (for each step) after solving the solution step. More...
 
virtual void Finalize ()
 Finalize the convergence accelerator Perform all the operations required after the resolution of the problem. More...
 
virtual void Clear ()
 Clear the internal storage Clears all the internal data (e.g. previous observation matrices) More...
 
virtual void SetEchoLevel (int Level)
 Set the Echo Level object Set the echo level of the convergence accelerator. More...
 
int GetEchoLevel ()
 Get the Echo Level object Get the echo level of the convergence accelerator. More...
 
virtual bool IsBlockNewton () const
 Checks if the update direction is unique or double For the current convergence accelerator, this method returns information about the nature of the coupling If it is block Newton, the update is done in both directions. Otherwise, it is done in one direction. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (ConvergenceAccelerator)
 

Protected Attributes

Protected member Variables
unsigned int mConvergenceAcceleratorIteration = 0
 
double mOmega_0
 
double mOmega_1 = 0.0
 
VectorPointerType mpResidualVector_0 = nullptr
 
VectorPointerType mpResidualVector_1 = nullptr
 
- Protected Attributes inherited from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >
int mEchoLevel
 

Type Definitions

typedef ConvergenceAccelerator< TSparseSpace, TDenseSpace > BaseType
 
typedef BaseType::Pointer BaseTypePointer
 
typedef BaseType::VectorType VectorType
 
typedef BaseType::VectorPointerType VectorPointerType
 
 KRATOS_CLASS_POINTER_DEFINITION (AitkenConvergenceAccelerator)
 

Additional Inherited Members

- Public Types inherited from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >
typedef TSparseSpace::VectorType VectorType
 
typedef TSparseSpace::MatrixType MatrixType
 
typedef TSparseSpace::VectorPointerType VectorPointerType
 
typedef TSparseSpace::MatrixPointerType MatrixPointerType
 
typedef TDenseSpace::VectorType DenseVectorType
 
typedef TDenseSpace::MatrixType DenseMatrixType
 
typedef TDenseSpace::MatrixPointerType DenseMatrixPointerType
 
typedef TDenseSpace::VectorPointerType DenseVectorPointerType
 
- Protected Member Functions inherited from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >
virtual void ComputeJacobianApproximation ()
 
virtual DenseMatrixPointerType pGetInverseJacobianApproximation ()
 
virtual std::size_t GetProblemSize () const
 

Detailed Description

template<class TSparseSpace, class TDenseSpace>
class Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >

Aitken convergence accelerator Aitken formula-based.

Template Parameters
TSparseSpaceLinear algebra sparse space
TDenseSpaceLinear algebra dense space

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace >
typedef ConvergenceAccelerator<TSparseSpace, TDenseSpace> Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::BaseType

◆ BaseTypePointer

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::Pointer Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::BaseTypePointer

◆ VectorPointerType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::VectorPointerType Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::VectorPointerType

◆ VectorType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::VectorType Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::VectorType

Constructor & Destructor Documentation

◆ AitkenConvergenceAccelerator() [1/3]

template<class TSparseSpace , class TDenseSpace >
Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::AitkenConvergenceAccelerator ( Parameters  rConvAcceleratorParameters)
inlineexplicit

Constructor. Aitken convergence accelerator

◆ AitkenConvergenceAccelerator() [2/3]

template<class TSparseSpace , class TDenseSpace >
Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::AitkenConvergenceAccelerator ( double  rOmegaInitial = 0.825)
inline

◆ AitkenConvergenceAccelerator() [3/3]

template<class TSparseSpace , class TDenseSpace >
Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::AitkenConvergenceAccelerator ( const AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace > &  rOther)
inline

Copy Constructor.

◆ ~AitkenConvergenceAccelerator()

template<class TSparseSpace , class TDenseSpace >
virtual Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::~AitkenConvergenceAccelerator ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Clone()

template<class TSparseSpace , class TDenseSpace >
virtual BaseTypePointer Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::Clone ( )
inlinevirtual

Clone

◆ FinalizeNonLinearIteration()

template<class TSparseSpace , class TDenseSpace >
void Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::FinalizeNonLinearIteration ( )
inlineoverridevirtual

Updates the Aitken iteration values for the next non-linear iteration

Reimplemented from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >.

◆ InitializeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::InitializeSolutionStep ( )
inlineoverridevirtual

Initialize the internal iteration counter

Reimplemented from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSparseSpace , class TDenseSpace >
Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION ( AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >  )

◆ UpdateSolution()

template<class TSparseSpace , class TDenseSpace >
void Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::UpdateSolution ( const VectorType rResidualVector,
VectorType rIterationGuess 
)
inlineoverridevirtual

Performs the solution update The correction is done as u_i+1 = u_i + w_i+1*r_i+1 where w_i+1 is de relaxation parameter computed using the Aitken's formula.

Parameters
rResidualVectorResidual vector from the residual evaluation
rIterationGuessCurrent iteration guess

Reimplemented from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >.

Member Data Documentation

◆ mConvergenceAcceleratorIteration

template<class TSparseSpace , class TDenseSpace >
unsigned int Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::mConvergenceAcceleratorIteration = 0
protected

◆ mOmega_0

template<class TSparseSpace , class TDenseSpace >
double Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::mOmega_0
protected

◆ mOmega_1

template<class TSparseSpace , class TDenseSpace >
double Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::mOmega_1 = 0.0
protected

◆ mpResidualVector_0

template<class TSparseSpace , class TDenseSpace >
VectorPointerType Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::mpResidualVector_0 = nullptr
protected

◆ mpResidualVector_1

template<class TSparseSpace , class TDenseSpace >
VectorPointerType Kratos::AitkenConvergenceAccelerator< TSparseSpace, TDenseSpace >::mpResidualVector_1 = nullptr
protected

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