14 #if !defined(KRATOS_BASE_CONVERGENCE_CRITERIA_H )
15 #define KRATOS_BASE_CONVERGENCE_CRITERIA_H
54 template<
class TSparseSpace,
143 return Kratos::make_shared<ClassType>(ThisParameters);
153 KRATOS_ERROR <<
"Asking for Global Components to the CONVERGENCE CRITERION base class which is not component wise and not contains this member variable" << std::endl;
163 KRATOS_ERROR <<
"Asking for Global Components to the CONVERGENCE CRITERION base class which is not component wise and not contains this member variable" << std::endl;
173 KRATOS_ERROR <<
"Asking for Global Components to the CONVERGENCE CRITERION base class which is not component wise and not contains this member variable" << std::endl;
183 KRATOS_ERROR <<
"Asking for Global Components to the CONVERGENCE CRITERION base class which is not component wise and not contains this member variable" << std::endl;
388 "name" : "convergence_criteria",
391 return default_parameters;
400 return "convergence_criteria";
416 virtual std::string
Info()
const
418 return "ConvergenceCriteria";
472 return ThisParameters;
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
KRATOS_CLASS_POINTER_DEFINITION(ConvergenceCriteria)
Pointer definition of ConvergenceCriteria.
ConvergenceCriteria(Kratos::Parameters ThisParameters)
Constructor with Parameters.
Definition: convergence_criteria.h:100
ConvergenceCriteria< TSparseSpace, TDenseSpace > ClassType
The definition of the current class.
Definition: convergence_criteria.h:67
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: convergence_criteria.h:428
bool GetActualizeRHSflag()
This method gets the flag mActualizeRHSIsNeeded.
Definition: convergence_criteria.h:227
TDenseSpace::VectorType LocalSystemVectorType
Local system vector type definition.
Definition: convergence_criteria.h:78
virtual int Check(ModelPart &rModelPart)
This function is designed to be called once to perform all the checks needed on the input provided....
Definition: convergence_criteria.h:372
virtual ClassType::Pointer Create(Parameters ThisParameters) const
Create method.
Definition: convergence_criteria.h:141
int GetEchoLevel()
This returns the level of echo for the solving strategy.
Definition: convergence_criteria.h:209
virtual std::vector< TSystemVectorType > & GetRHS_Element_Components()
Get component wise element components.
Definition: convergence_criteria.h:151
virtual bool PostCriteria(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
Criterias that need to be called after getting the solution.
Definition: convergence_criteria.h:261
int mEchoLevel
This "flag" is set in order to know if it is convergence criteria is initialized.
Definition: convergence_criteria.h:450
bool mActualizeRHSIsNeeded
Definition: convergence_criteria.h:447
virtual std::vector< Variable< LocalSystemVectorType > > & GetRHS_Element_Variables()
Get component wise element variables.
Definition: convergence_criteria.h:161
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: convergence_criteria.h:398
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: convergence_criteria.h:422
virtual std::string Info() const
Turn back information as a string.
Definition: convergence_criteria.h:416
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: convergence_criteria.h:466
virtual bool PreCriteria(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
Criterias that need to be called before getting the solution.
Definition: convergence_criteria.h:241
TSparseSpace::MatrixType TSystemMatrixType
Matrix type definition.
Definition: convergence_criteria.h:72
ModelPart::DofsArrayType DofsArrayType
DoF array type definition.
Definition: convergence_criteria.h:81
virtual std::vector< TSystemVectorType > & GetRHS_Condition_Components()
Get component wise condition components.
Definition: convergence_criteria.h:171
virtual std::vector< Variable< LocalSystemVectorType > > & GetRHS_Condition_Variables()
Get component wise condition variables.
Definition: convergence_criteria.h:181
virtual void InitializeNonLinearIteration(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
This function initializes the non-linear iteration.
Definition: convergence_criteria.h:318
virtual Parameters GetDefaultParameters() const
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: convergence_criteria.h:384
ConvergenceCriteria(ConvergenceCriteria const &rOther)
Definition: convergence_criteria.h:112
virtual void SetEchoLevel(int Level)
It sets the level of echo for the solving strategy.
Definition: convergence_criteria.h:195
virtual void Initialize(ModelPart &rModelPart)
This function initialize the convergence criteria.
Definition: convergence_criteria.h:276
virtual void FinalizeNonLinearIteration(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
This function finalizes the non-linear iteration.
Definition: convergence_criteria.h:356
ConvergenceCriteria()
Definition: convergence_criteria.h:89
TSparseSpace::DataType TDataType
Data type definition.
Definition: convergence_criteria.h:70
TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: convergence_criteria.h:74
virtual void FinalizeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
This function finalizes the solution step.
Definition: convergence_criteria.h:337
bool mConvergenceCriteriaIsInitialized
This "flag" is set in order to know if it is necessary to actualize the RHS.
Definition: convergence_criteria.h:448
TDenseSpace::MatrixType LocalSystemMatrixType
Local system matrix type definition.
Definition: convergence_criteria.h:76
virtual ~ConvergenceCriteria()
Definition: convergence_criteria.h:121
virtual void InitializeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
This function initializes the solution step.
Definition: convergence_criteria.h:299
virtual void AssignSettings(const Parameters ThisParameters)
This method assigns settings to member variables.
Definition: convergence_criteria.h:479
virtual bool IsInitialized()
This function returns if the convergence criteria is initialized.
Definition: convergence_criteria.h:285
void SetActualizeRHSFlag(bool ActualizeRHSIsNeeded)
This method sets the flag mActualizeRHSIsNeeded.
Definition: convergence_criteria.h:218
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21