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.
|
Short class definition. More...
#include <adaptive_residualbased_newton_raphson_strategy.h>
Public Member Functions | |
Access | |
TSystemMatrixType & | GetSystemMatrix () override |
This method returns the LHS matrix. More... | |
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::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > | |
ImplicitSolvingStrategy () | |
Default constructor. More... | |
ImplicitSolvingStrategy (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
ImplicitSolvingStrategy (ModelPart &rModelPart, bool MoveMeshFlag=false) | |
Default constructor. More... | |
virtual | ~ImplicitSolvingStrategy () |
BaseType::Pointer | Create (ModelPart &rModelPart, Parameters ThisParameters) const override |
Create method. More... | |
void | SetRebuildLevel (int Level) override |
This sets the build level. More... | |
int | GetRebuildLevel () const override |
This returns the build level. More... | |
void | SetStiffnessMatrixIsBuilt (const bool StiffnessMatrixIsBuilt) |
This method sets the flag mStiffnessMatrixIsBuilt. More... | |
bool | GetStiffnessMatrixIsBuilt () const |
This method gets the flag mStiffnessMatrixIsBuilt. More... | |
std::string | Info () const override |
Turn back information as a string. More... | |
KRATOS_CLASS_POINTER_DEFINITION (ImplicitSolvingStrategy) | |
Parameters | GetDefaultParameters () const override |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
Public Member Functions inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
SolvingStrategy () | |
Default constructor. More... | |
SolvingStrategy (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
SolvingStrategy (ModelPart &rModelPart, bool MoveMeshFlag=false) | |
Default constructor. More... | |
virtual | ~SolvingStrategy () |
KRATOS_CLASS_POINTER_DEFINITION (SolvingStrategy) | |
virtual void | FinalizeSolutionStep () |
Performs all the required operations that should be done (for each step) after solving the solution step. More... | |
virtual bool | SolveSolutionStep () |
Solves the current step. This function returns true if a solution has been found, false otherwise. More... | |
int | GetEchoLevel () |
This returns the level of echo for the solving strategy. More... | |
void | SetMoveMeshFlag (bool Flag) |
This function sets the flag that says if the mesh is moved. More... | |
bool | MoveMeshFlag () |
This function returns the flag that says if the mesh is moved. More... | |
bool | GetMoveMeshFlag () |
This function returns the flag that says if the mesh is moved. More... | |
virtual void | MoveMesh () |
This function is designed to move the mesh. More... | |
ModelPart & | GetModelPart () |
Operations to get the pointer to the model. More... | |
const ModelPart & | GetModelPart () const |
Operations to get the pointer to the model. More... | |
virtual double | GetResidualNorm () |
Operations to get the residual norm. More... | |
virtual int | Check () |
Function to perform expensive checks. More... | |
virtual TSystemVectorType & | GetSystemVector () |
This method returns the RHS vector. More... | |
virtual TSystemVectorType & | GetSolutionVector () |
This method returns the solution vector. More... | |
Protected Member Functions | |
Private Operators | |
void | Initialize () override |
Initialization of member variables and prior operations. More... | |
void | InitializeSolutionStep () override |
Performs all the required operations that should be done (for each step) before solving the solution step. More... | |
void | MaxIterationsExceeded (int cycle_number) |
void | PrintIncreaseOfDeltaTime (double old_dt, double new_dt) |
void | ReductionStrategy (ModelPart &model_part, double NewTime) |
void | AssignSettings (const Parameters ThisParameters) override |
This method assigns settings to member variables. More... | |
Un accessible methods | |
AdaptiveResidualBasedNewtonRaphsonStrategy (const AdaptiveResidualBasedNewtonRaphsonStrategy &Other) | |
Protected Member Functions inherited from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > | |
void | AssignSettings (const Parameters ThisParameters) override |
This method assigns settings to member variables. More... | |
Protected Member Functions inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
virtual Parameters | ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const |
This method validate and assign default parameters. More... | |
Protected Attributes | |
Member Variables | |
TSchemeType::Pointer | mpScheme |
TLinearSolver::Pointer | mpLinearSolver |
TBuilderAndSolverType::Pointer | mpBuilderAndSolver |
TConvergenceCriteriaType::Pointer | mpConvergenceCriteria |
TSystemVectorPointerType | mpDx |
TSystemVectorPointerType | mpb |
TSystemMatrixPointerType | mpA |
bool | mReformDofSetAtEachStep |
bool | mCalculateReactionsFlag |
bool | mSolutionStepIsInitialized |
int | mMaxIterationNumber |
default = 30 More... | |
int | mMinIterationNumber |
bool | mInitializeWasPerformed |
double | mReductionFactor |
double | mIncreaseFactor |
int | mNumberOfCycles |
Protected Attributes inherited from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > | |
int | mRebuildLevel |
bool | mStiffnessMatrixIsBuilt |
The current rebuild level. More... | |
Protected Attributes inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
int | mEchoLevel |
Life Cycle | |
AdaptiveResidualBasedNewtonRaphsonStrategy () | |
Default constructor. More... | |
AdaptiveResidualBasedNewtonRaphsonStrategy (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
AdaptiveResidualBasedNewtonRaphsonStrategy (ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, int MaxIterations=30, int MinIterations=4, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false, double ReductionFactor=0.5, double IncreaseFactor=1.3, int NumberOfCycles=5) | |
AdaptiveResidualBasedNewtonRaphsonStrategy (ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver, int MaxIterations=30, int MinIterations=4, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false, double ReductionFactor=0.5, double IncreaseFactor=1.3, int NumberOfCycles=5) | |
~AdaptiveResidualBasedNewtonRaphsonStrategy () override | |
void | SetScheme (typename TSchemeType::Pointer pScheme) |
TSchemeType::Pointer | GetScheme () |
void | SetBuilderAndSolver (typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver) |
TBuilderAndSolverType::Pointer | GetBuilderAndSolver () |
void | SetCalculateReactionsFlag (bool CalculateReactionsFlag) |
bool | GetCalculateReactionsFlag () |
void | SetReformDofSetAtEachStepFlag (bool flag) |
bool | GetReformDofSetAtEachStepFlag () |
void | SetMaxIterationNumber (int MaxIterationNumber) |
unsigned int | GetMaxIterationNumber () |
void | SetEchoLevel (int Level) override |
This sets the level of echo for the solving strategy. More... | |
SolvingStrategyType::Pointer | Create (ModelPart &rModelPart, Parameters ThisParameters) const override |
Create method. More... | |
void | Predict () override |
bool | CyclicSolve () |
double | Solve () override |
The problem of interest is solved. More... | |
bool | IsConverged () override |
void | CalculateOutputData () override |
void | Clear () override |
Clears the internal storage. More... | |
Parameters | GetDefaultParameters () const override |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
static std::string | Name () |
Returns the name of the class as used in the settings (snake_case format) More... | |
Short class definition.
Detail class definition.
\URL[Example of use html]{ extended_documentation/no_ex_of_use.html}
\URL[Example of use pdf]{ extended_documentation/no_ex_of_use.pdf}
\URL[Example of use doc]{ extended_documentation/no_ex_of_use.doc}
\URL[Example of use ps]{ extended_documentation/no_ex_of_use.ps}
\URL[Extended documentation html]{ extended_documentation/no_ext_doc.html}
\URL[Extended documentation pdf]{ extended_documentation/no_ext_doc.pdf}
\URL[Extended documentation doc]{ extended_documentation/no_ext_doc.doc}
\URL[Extended documentation ps]{ extended_documentation/no_ext_doc.ps}
typedef ImplicitSolvingStrategy<TSparseSpace,TDenseSpace,TLinearSolver> Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::BaseType |
typedef AdaptiveResidualBasedNewtonRaphsonStrategy<TSparseSpace,TDenseSpace,TLinearSolver> Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::ClassType |
typedef BaseType::DofsArrayType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::DofsArrayType |
typedef BaseType::LocalSystemMatrixType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemMatrixType |
typedef BaseType::LocalSystemVectorType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemVectorType |
typedef SolvingStrategy<TSparseSpace, TDenseSpace> Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SolvingStrategyType |
typedef TSparseSpace Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SparseSpaceType |
typedef BaseType::TBuilderAndSolverType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TBuilderAndSolverType |
typedef ConvergenceCriteria<TSparseSpace,TDenseSpace> Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TConvergenceCriteriaType |
typedef BaseType::TDataType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TDataType |
typedef BaseType::TSchemeType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSchemeType |
typedef BaseType::TSystemMatrixPointerType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixPointerType |
typedef BaseType::TSystemMatrixType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixType |
typedef BaseType::TSystemVectorPointerType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorPointerType |
typedef BaseType::TSystemVectorType Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorType |
|
inlineexplicit |
Default constructor.
|
inlineexplicit |
Default constructor. (with parameters)
rModelPart | The model part of the problem |
ThisParameters | The configuration parameters |
|
inline |
Constructor.
|
inlineexplicit |
Constructor specifying the builder and solver
rModelPart | The model part of the problem |
pScheme | The integration scheme |
pNewLinearSolver | The linear solver employed |
pNewConvergenceCriteria | The convergence criteria employed |
pNewBuilderAndSolver | The builder and solver employed |
MaxIterations | The maximum number of non-linear iterations to be considered when solving the problem |
CalculateReactions | The flag for the reaction calculation |
ReformDofSetAtEachStep | The flag that allows to compute the modification of the DOF |
MoveMeshFlag | The flag that allows to move the mesh |
ReductionFactor | The factor of reduction |
IncreaseFactor | The increase factor |
NumberOfCycles | The number of cycles |
|
inlineoverride |
Destructor.
|
protected |
Copy constructor.
|
inlineoverrideprotectedvirtual |
This method assigns settings to member variables.
ThisParameters | Parameters that are assigned to the member variables |
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
this operations should be called before printing the results when non trivial results (e.g. stresses) need to be calculated given the solution of the step
This operations should be called only when needed, before printing as it can involve a non negligible cost
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
Clears the internal storage.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
Create method.
OPERATIONS ACCESSIBLE FROM THE INPUT:
rModelPart | The model part of the problem |
ThisParameters | The configuration parameters |
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inline |
the problem of interest is solved
|
inline |
|
inline |
|
inlineoverridevirtual |
This method provides the defaults parameters to avoid conflicts between the different constructors.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
This method returns the LHS matrix.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverrideprotectedvirtual |
Initialization of member variables and prior operations.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverrideprotectedvirtual |
Performs all the required operations that should be done (for each step) before solving the solution step.
A member variable should be used as a flag to make sure this function is called only once per step.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
this should be considered as a "post solution" convergence check which is useful for coupled analysis
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
Kratos::AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::KRATOS_CLASS_POINTER_DEFINITION | ( | AdaptiveResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver > | ) |
Counted pointer of ClassName
|
inlineprotected |
|
inlinestatic |
Returns the name of the class as used in the settings (snake_case format)
|
inlineoverridevirtual |
operation to predict the solution ... if it is not called a trivial predictor is used in which the values of the solution step of interest are assumed equal to the old values
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
Print object's data.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineprotected |
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inlineprotected |
|
inline |
|
inline |
|
inlineoverridevirtual |
This sets the level of echo for the solving strategy.
Level | of echo for the solving strategy |
{ 0 -> Mute... no echo at all 1 -> Printing time and basic information 2 -> Printing linear solver data 3 -> Print of debug information: Echo of stiffness matrix, Dx, b... }
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
inline |
|
inline |
|
inline |
Destructor.
|
inlineoverridevirtual |
The problem of interest is solved.
{ This function calls sequentially: Initialize(), InitializeSolutionStep(), Predict(), SolveSolutionStep() and FinalizeSolutionStep(). All those functions can otherwise be called separately. }
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
|
protected |
Flag telling if it is needed or not to compute the reactions
default = true
|
protected |
|
protected |
|
protected |
default = 30
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Flag telling if it is needed to reform the DofSet at each solution step or if it is possible to form it just once
Default = false
|
protected |