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

Constant relaxation convergence accelerator This utility corrects the iteration guess with a constant relaxation factor. More...

#include <constant_relaxation_convergence_accelerator.h>

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

Public Member Functions

Operations
void UpdateSolution (const VectorType &rResidualVector, VectorType &rIterationGuess) 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 InitializeSolutionStep ()
 Operations before solving the solution step Performs all the required operations that should be done (for each step) before solving the solution step. 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 FinalizeNonLinearIteration ()
 Operations after each non-linear iteration Performs all the required operations that should be done at the end of 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)
 

Type Definitions

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

Life Cycle

 ConstantRelaxationConvergenceAccelerator (Parameters rConvAcceleratorParameters)
 Construct a new Constant Relaxation Convergence Accelerator object Constructor with json string settings. More...
 
 ConstantRelaxationConvergenceAccelerator (const double rOmega=0.5)
 Construct a new Constant Relaxation Convergence Accelerator object Constructor with given relaxation factor. More...
 
 ConstantRelaxationConvergenceAccelerator (const ConstantRelaxationConvergenceAccelerator &rOther)=delete
 Construct a new Constant Relaxation Convergence Accelerator object Explicitly deleted constant relaxation copy constructor. More...
 
virtual ~ConstantRelaxationConvergenceAccelerator ()=default
 Destroy the Constant Relaxation Convergence Accelerator object Default constant relaxation constructor. More...
 
static Parameters GetDefaultParameters ()
 Get the Default Settings object This method returns the default parameters for this convergence accelerator. Note that it is required to be static since it is called during the construction of the object so no instantation exists yet. More...
 

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
 
- Protected Attributes inherited from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >
int mEchoLevel
 

Detailed Description

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

Constant relaxation convergence accelerator This utility corrects the iteration guess with a constant relaxation factor.

Template Parameters
TSparseSpaceLinear algebra sparse space
TDenseSpaceLinear algebra dense space

Member Typedef Documentation

◆ BaseType

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

◆ BaseTypePointer

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

◆ VectorPointerType

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

◆ VectorType

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

Constructor & Destructor Documentation

◆ ConstantRelaxationConvergenceAccelerator() [1/3]

template<class TSparseSpace , class TDenseSpace >
Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::ConstantRelaxationConvergenceAccelerator ( Parameters  rConvAcceleratorParameters)
inline

Construct a new Constant Relaxation Convergence Accelerator object Constructor with json string settings.

Parameters
rConvAcceleratorParametersjson string encapsulating the settings

◆ ConstantRelaxationConvergenceAccelerator() [2/3]

template<class TSparseSpace , class TDenseSpace >
Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::ConstantRelaxationConvergenceAccelerator ( const double  rOmega = 0.5)
inline

Construct a new Constant Relaxation Convergence Accelerator object Constructor with given relaxation factor.

Parameters
rOmegarelaxation factor

◆ ConstantRelaxationConvergenceAccelerator() [3/3]

template<class TSparseSpace , class TDenseSpace >
Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::ConstantRelaxationConvergenceAccelerator ( const ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace > &  rOther)
delete

Construct a new Constant Relaxation Convergence Accelerator object Explicitly deleted constant relaxation copy constructor.

Parameters
rOtherconstant relaxation convergence accelerator to be copied

◆ ~ConstantRelaxationConvergenceAccelerator()

template<class TSparseSpace , class TDenseSpace >
virtual Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::~ConstantRelaxationConvergenceAccelerator ( )
virtualdefault

Destroy the Constant Relaxation Convergence Accelerator object Default constant relaxation constructor.

Member Function Documentation

◆ GetDefaultParameters()

template<class TSparseSpace , class TDenseSpace >
static Parameters Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::GetDefaultParameters ( )
inlinestatic

Get the Default Settings object This method returns the default parameters for this convergence accelerator. Note that it is required to be static since it is called during the construction of the object so no instantation exists yet.

Returns
Parameters Default parameters json string

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

◆ UpdateSolution()

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

Performs the solution update The correction is performed as u_{k+1} = u_{k} + w * r_{k+1}, being u_{k+1} the current iteration relaxed solution, u_{k} the previous iteration relaxed solution and r_{k+1} the current iteration residual, which is computed as r_{k+1} = \hat{u}_{k+1} - u_{k}, being \hat{u}_{k+1} the current iteration unrelaxed solution.

Parameters
rResidualVectorResidual vector from the residual evaluation
rIterationGuessCurrent iteration guess

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


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