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

This convergence criteria checks simultaneously two convergence criteria (one of them must be satisfied) More...

#include <or_criteria.h>

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

Public Member Functions

Life Cycle
 Or_Criteria ()
 
 Or_Criteria (Kratos::Parameters ThisParameters)
 Default constructor. (with parameters) More...
 
 Or_Criteria (ConvergenceCriteriaPointerType pFirstCriterion, ConvergenceCriteriaPointerType pSecondCriterion)
 Default constructor. More...
 
 Or_Criteria (Or_Criteria const &rOther)
 
 ~Or_Criteria () override
 
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::ConvergenceCriteria< TSparseSpace, TDenseSpace >
 ConvergenceCriteria ()
 
 ConvergenceCriteria (Kratos::Parameters ThisParameters)
 Constructor with Parameters. More...
 
 ConvergenceCriteria (ConvergenceCriteria const &rOther)
 
virtual ~ConvergenceCriteria ()
 
 KRATOS_CLASS_POINTER_DEFINITION (ConvergenceCriteria)
 Pointer definition of ConvergenceCriteria. More...
 
virtual std::vector< TSystemVectorType > & GetRHS_Element_Components ()
 Get component wise element components. More...
 
virtual std::vector< Variable< LocalSystemVectorType > > & GetRHS_Element_Variables ()
 Get component wise element variables. More...
 
virtual std::vector< TSystemVectorType > & GetRHS_Condition_Components ()
 Get component wise condition components. More...
 
virtual std::vector< Variable< LocalSystemVectorType > > & GetRHS_Condition_Variables ()
 Get component wise condition variables. More...
 
int GetEchoLevel ()
 This returns the level of echo for the solving strategy. More...
 
void SetActualizeRHSFlag (bool ActualizeRHSIsNeeded)
 This method sets the flag mActualizeRHSIsNeeded. More...
 
bool GetActualizeRHSflag ()
 This method gets the flag mActualizeRHSIsNeeded. More...
 
virtual bool IsInitialized ()
 This function returns if the convergence criteria is initialized. More...
 

Type Definitions

typedef ConvergenceCriteria< TSparseSpace, TDenseSpace > BaseType
 
typedef Or_Criteria< TSparseSpace, TDenseSpace > ClassType
 The definition of the current class. More...
 
typedef TSparseSpace SparseSpaceType
 
typedef BaseType::TDataType TDataType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef ConvergenceCriteria< TSparseSpace, TDenseSpace >::Pointer ConvergenceCriteriaPointerType
 
 KRATOS_CLASS_POINTER_DEFINITION (Or_Criteria)
 

Operations

BaseType::Pointer Create (Parameters ThisParameters) const override
 Create method. More...
 
void SetEchoLevel (int Level) override
 It sets the level of echo for the solving strategy. More...
 
bool PreCriteria (ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
 Criterias that need to be called before getting the solution. More...
 
bool PostCriteria (ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
 Criteria that need to be called after getting the solution. More...
 
void Initialize (ModelPart &rModelPart) override
 This function initialize the convergence criteria. More...
 
void InitializeSolutionStep (ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
 This function initializes the solution step. More...
 
void InitializeNonLinearIteration (ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
 This function initializes the non linear iteration. More...
 
void FinalizeSolutionStep (ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
 This function finalizes the solution step. More...
 
void FinalizeNonLinearIteration (ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &A, const TSystemVectorType &Dx, const TSystemVectorType &b) override
 This function finalizes the non linear iteration. More...
 
int Check (ModelPart &rModelPart) override
 This function is designed to be called once to perform all the checks needed on the input provided. 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...
 

Additional Inherited Members

- Public Types inherited from Kratos::ConvergenceCriteria< TSparseSpace, TDenseSpace >
typedef ConvergenceCriteria< TSparseSpace, TDenseSpace > ClassType
 The definition of the current class. More...
 
typedef TSparseSpace::DataType TDataType
 Data type definition. More...
 
typedef TSparseSpace::MatrixType TSystemMatrixType
 Matrix type definition. More...
 
typedef TSparseSpace::VectorType TSystemVectorType
 Vector type definition. More...
 
typedef TDenseSpace::MatrixType LocalSystemMatrixType
 Local system matrix type definition. More...
 
typedef TDenseSpace::VectorType LocalSystemVectorType
 Local system vector type definition. More...
 
typedef ModelPart::DofsArrayType DofsArrayType
 DoF array type definition. More...
 
- Static Public Member Functions inherited from Kratos::ConvergenceCriteria< TSparseSpace, TDenseSpace >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 
- Protected Member Functions inherited from Kratos::ConvergenceCriteria< TSparseSpace, TDenseSpace >
virtual Parameters ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const
 This method validate and assign default parameters. More...
 
virtual void AssignSettings (const Parameters ThisParameters)
 This method assigns settings to member variables. More...
 
- Protected Attributes inherited from Kratos::ConvergenceCriteria< TSparseSpace, TDenseSpace >
bool mActualizeRHSIsNeeded = false
 
bool mConvergenceCriteriaIsInitialized = false
 This "flag" is set in order to know if it is necessary to actualize the RHS. More...
 
int mEchoLevel
 This "flag" is set in order to know if it is convergence criteria is initialized. More...
 

Detailed Description

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

This convergence criteria checks simultaneously two convergence criteria (one of them must be satisfied)

It takes two different convergence criteria in order to work

Author
Riccardo Rossi

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace >
typedef ConvergenceCriteria< TSparseSpace, TDenseSpace > Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::BaseType

◆ ClassType

template<class TSparseSpace , class TDenseSpace >
typedef Or_Criteria< TSparseSpace, TDenseSpace > Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::ClassType

The definition of the current class.

◆ ConvergenceCriteriaPointerType

template<class TSparseSpace , class TDenseSpace >
typedef ConvergenceCriteria< TSparseSpace, TDenseSpace >::Pointer Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::ConvergenceCriteriaPointerType

◆ DofsArrayType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::DofsArrayType Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::DofsArrayType

◆ SparseSpaceType

template<class TSparseSpace , class TDenseSpace >
typedef TSparseSpace Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::SparseSpaceType

◆ TDataType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::TDataType Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::TDataType

◆ TSystemMatrixType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::TSystemMatrixType Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::TSystemMatrixType

◆ TSystemVectorType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::TSystemVectorType Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::TSystemVectorType

Constructor & Destructor Documentation

◆ Or_Criteria() [1/4]

template<class TSparseSpace , class TDenseSpace >
Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Or_Criteria ( )
inlineexplicit

◆ Or_Criteria() [2/4]

template<class TSparseSpace , class TDenseSpace >
Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Or_Criteria ( Kratos::Parameters  ThisParameters)
inlineexplicit

Default constructor. (with parameters)

It takes two different convergence criteria in order to work

Parameters
ThisParametersThe configuration parameters

◆ Or_Criteria() [3/4]

template<class TSparseSpace , class TDenseSpace >
Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Or_Criteria ( ConvergenceCriteriaPointerType  pFirstCriterion,
ConvergenceCriteriaPointerType  pSecondCriterion 
)
inlineexplicit

Default constructor.

It takes two different convergence criteria in order to work

Parameters
pFirstCriterionThe first convergence criteria
pSecondCriterionThe second convergence criteria

◆ Or_Criteria() [4/4]

template<class TSparseSpace , class TDenseSpace >
Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Or_Criteria ( Or_Criteria< TSparseSpace, TDenseSpace > const &  rOther)
inlineexplicit

Copy constructor.

◆ ~Or_Criteria()

template<class TSparseSpace , class TDenseSpace >
Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::~Or_Criteria ( )
inlineoverride

Destructor.

Member Function Documentation

◆ Check()

template<class TSparseSpace , class TDenseSpace >
int Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Check ( ModelPart rModelPart)
inlineoverridevirtual

This function is designed to be called once to perform all the checks needed on the input provided.

Checks can be "expensive" as the function is designed to catch user's errors.

Parameters
rModelPartModelPart containing the problem.
Returns
0 all ok

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

◆ Create()

template<class TSparseSpace , class TDenseSpace >
BaseType::Pointer Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Create ( Parameters  ThisParameters) const
inlineoverridevirtual

Create method.

Parameters
ThisParametersThe configuration parameters

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

◆ FinalizeNonLinearIteration()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::FinalizeNonLinearIteration ( ModelPart rModelPart,
DofsArrayType rDofSet,
const TSystemMatrixType A,
const TSystemVectorType Dx,
const TSystemVectorType b 
)
inlineoverridevirtual

This function finalizes the non linear iteration.

Parameters
rModelPartModelPart containing the problem.
rDofSetContainer of the problem's degrees of freedom (stored by the BuilderAndSolver)
ASystem matrix
DxVector of results (variations on nodal variables)
bRHS vector (residual)

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

◆ FinalizeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::FinalizeSolutionStep ( ModelPart rModelPart,
DofsArrayType rDofSet,
const TSystemMatrixType A,
const TSystemVectorType Dx,
const TSystemVectorType b 
)
inlineoverridevirtual

This function finalizes the solution step.

Parameters
rModelPartModelPart containing the problem.
rDofSetContainer of the problem's degrees of freedom (stored by the BuilderAndSolver)
ASystem matrix
DxVector of results (variations on nodal variables)
bRHS vector (residual)

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

◆ GetDefaultParameters()

template<class TSparseSpace , class TDenseSpace >
Parameters Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::GetDefaultParameters ( ) const
inlineoverridevirtual

This method provides the defaults parameters to avoid conflicts between the different constructors.

Returns
The default parameters

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

◆ Info()

template<class TSparseSpace , class TDenseSpace >
std::string Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

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

◆ Initialize()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Initialize ( ModelPart rModelPart)
inlineoverridevirtual

This function initialize the convergence criteria.

Parameters
rModelPartThe model part of interest

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

◆ InitializeNonLinearIteration()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::InitializeNonLinearIteration ( ModelPart rModelPart,
DofsArrayType rDofSet,
const TSystemMatrixType A,
const TSystemVectorType Dx,
const TSystemVectorType b 
)
inlineoverridevirtual

This function initializes the non linear iteration.

Parameters
rModelPartModelPart containing the problem.
rDofSetContainer of the problem's degrees of freedom (stored by the BuilderAndSolver)
ASystem matrix
DxVector of results (variations on nodal variables)
bRHS vector (residual)

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

◆ InitializeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::InitializeSolutionStep ( ModelPart rModelPart,
DofsArrayType rDofSet,
const TSystemMatrixType A,
const TSystemVectorType Dx,
const TSystemVectorType b 
)
inlineoverridevirtual

This function initializes the solution step.

Parameters
rModelPartModelPart containing the problem.
rDofSetContainer of the problem's degrees of freedom (stored by the BuilderAndSolver)
ASystem matrix
DxVector of results (variations on nodal variables)
bRHS vector (residual)

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

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

Counted pointer of Or_Criteria

◆ Name()

template<class TSparseSpace , class TDenseSpace >
static std::string Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::Name ( )
inlinestatic

Returns the name of the class as used in the settings (snake_case format)

Returns
The name of the class

◆ PostCriteria()

template<class TSparseSpace , class TDenseSpace >
bool Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::PostCriteria ( ModelPart rModelPart,
DofsArrayType rDofSet,
const TSystemMatrixType A,
const TSystemVectorType Dx,
const TSystemVectorType b 
)
inlineoverridevirtual

Criteria that need to be called after getting the solution.

Parameters
rModelPartModelPart containing the problem.
rDofSetContainer of the problem's degrees of freedom (stored by the BuilderAndSolver)
ASystem matrix
DxVector of results (variations on nodal variables)
bRHS vector (residual)
Returns
true if convergence is achieved, false otherwise

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

◆ PreCriteria()

template<class TSparseSpace , class TDenseSpace >
bool Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::PreCriteria ( ModelPart rModelPart,
DofsArrayType rDofSet,
const TSystemMatrixType A,
const TSystemVectorType Dx,
const TSystemVectorType b 
)
inlineoverridevirtual

Criterias that need to be called before getting the solution.

Parameters
rModelPartModelPart containing the problem.
rDofSetContainer of the problem's degrees of freedom (stored by the BuilderAndSolver)
ASystem matrix
DxVector of results (variations on nodal variables)
bRHS vector (residual)
Returns
true if convergence is achieved, false otherwise

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

◆ PrintData()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

Print object's data.

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

◆ PrintInfo()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

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

◆ SetEchoLevel()

template<class TSparseSpace , class TDenseSpace >
void Kratos::Or_Criteria< TSparseSpace, TDenseSpace >::SetEchoLevel ( int  Level)
inlineoverridevirtual

It sets the level of echo for the solving strategy.

Parameters
LevelThe level to set

The different levels of echo are:

  • 0: Mute... no echo at all
  • 1: Printing time and basic information
  • 2: Printing extra information

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


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