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.
|
Constant relaxation convergence accelerator This utility corrects the iteration guess with a constant relaxation factor. More...
#include <constant_relaxation_convergence_accelerator.h>
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 |
Constant relaxation convergence accelerator This utility corrects the iteration guess with a constant relaxation factor.
TSparseSpace | Linear algebra sparse space |
TDenseSpace | Linear algebra dense space |
typedef ConvergenceAccelerator<TSparseSpace, TDenseSpace> Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::BaseType |
typedef BaseType::Pointer Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::BaseTypePointer |
typedef BaseType::VectorPointerType Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::VectorPointerType |
typedef BaseType::VectorType Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::VectorType |
|
inline |
Construct a new Constant Relaxation Convergence Accelerator object Constructor with json string settings.
rConvAcceleratorParameters | json string encapsulating the settings |
|
inline |
Construct a new Constant Relaxation Convergence Accelerator object Constructor with given relaxation factor.
rOmega | relaxation factor |
|
delete |
Construct a new Constant Relaxation Convergence Accelerator object Explicitly deleted constant relaxation copy constructor.
rOther | constant relaxation convergence accelerator to be copied |
|
virtualdefault |
Destroy the Constant Relaxation Convergence Accelerator object Default constant relaxation constructor.
|
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.
Kratos::ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | ConstantRelaxationConvergenceAccelerator< TSparseSpace, TDenseSpace > | ) |
|
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.
rResidualVector | Residual vector from the residual evaluation |
rIterationGuess | Current iteration guess |
Reimplemented from Kratos::ConvergenceAccelerator< TSparseSpace, TDenseSpace >.