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

This is a very simple strategy to solve linearly the problem. More...

#include <residualbased_linear_strategy.h>

Inheritance diagram for Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >:
Collaboration diagram for Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >:

Public Member Functions

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 ()
 
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...
 
 KRATOS_CLASS_POINTER_DEFINITION (ImplicitSolvingStrategy)
 
- 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 bool IsConverged ()
 This should be considered as a "post solution" convergence check which is useful for coupled analysis. 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...
 
ModelPartGetModelPart ()
 Operations to get the pointer to the model. More...
 
const ModelPartGetModelPart () const
 Operations to get the pointer to the model. More...
 

Protected Member Functions

Protected Operations
void AssignSettings (const Parameters ThisParameters) override
 This method assigns settings to member variables. More...
 
Protected Operations
- 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...
 

Type Definitions *‍/

typedef SolvingStrategy< TSparseSpace, TDenseSpace > SolvingStrategyType
 
typedef ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
 
typedef ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 
typedef BaseType::TDataType TDataType
 
typedef TSparseSpace SparseSpaceType
 
typedef BaseType::TSchemeType TSchemeType
 
typedef BaseType::TBuilderAndSolverType TBuilderAndSolverType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
 
typedef BaseType::TSystemVectorPointerType TSystemVectorPointerType
 
 KRATOS_CLASS_POINTER_DEFINITION (ResidualBasedLinearStrategy)
 

Life Cycle

 ResidualBasedLinearStrategy ()
 Default constructor. More...
 
 ResidualBasedLinearStrategy (ModelPart &rModelPart, Parameters ThisParameters)
 Default constructor. (with parameters) More...
 
 ResidualBasedLinearStrategy (ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, bool CalculateReactionFlag=false, bool ReformDofSetAtEachStep=false, bool CalculateNormDxFlag=false, bool MoveMeshFlag=false)
 Default constructor. More...
 
 ResidualBasedLinearStrategy (ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver, bool CalculateReactionFlag=false, bool ReformDofSetAtEachStep=false, bool CalculateNormDxFlag=false, bool MoveMeshFlag=false)
 Constructor specifying the builder and solver. More...
 
 ~ResidualBasedLinearStrategy () override
 Destructor. More...
 
void SetScheme (typename TSchemeType::Pointer pScheme)
 Set method for the time scheme. More...
 
TSchemeType::Pointer GetScheme ()
 Get method for the time scheme. More...
 
void SetBuilderAndSolver (typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver)
 Set method for the builder and solver. More...
 
TBuilderAndSolverType::Pointer GetBuilderAndSolver ()
 Get method for the builder and solver. More...
 
void SetCalculateReactionsFlag (bool CalculateReactionsFlag)
 This method sets the flag mCalculateReactionsFlag. More...
 
bool GetCalculateReactionsFlag ()
 This method returns the flag mCalculateReactionsFlag. More...
 
void SetReformDofSetAtEachStepFlag (bool Flag)
 This method sets the flag mReformDofSetAtEachStep. More...
 
bool GetReformDofSetAtEachStepFlag ()
 This method returns the flag mReformDofSetAtEachStep. More...
 
void SetEchoLevel (int Level) override
 It 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
 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. More...
 
void Initialize () override
 Initialization of member variables and prior operations. More...
 
double Solve () override
 The problem of interest is solved. More...
 
void Clear () override
 Clears the internal storage. More...
 
void CalculateOutputData () override
 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. More...
 
void InitializeSolutionStep () override
 Performs all the required operations that should be done (for each step) before solving the solution step. More...
 
void FinalizeSolutionStep () override
 Performs all the required operations that should be done (for each step) after solving the solution step. More...
 
bool SolveSolutionStep () override
 Solves the current step. This function returns true if a solution has been found, false otherwise. More...
 
TSystemMatrixTypeGetSystemMatrix () override
 This method returns the LHS matrix. More...
 
TSystemVectorTypeGetSystemVector () override
 This method returns the RHS vector. More...
 
TSystemVectorTypeGetSolutionVector () override
 This method returns the solution vector. More...
 
double GetResidualNorm () override
 This method returns the residual norm. More...
 
int Check () override
 Function to perform expensive checks. 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::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >
typedef SolvingStrategy< TSparseSpace, TDenseSpace > BaseType
 
typedef BaseType::TDataType TDataType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
 
typedef BaseType::TSystemVectorPointerType TSystemVectorPointerType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef Scheme< TSparseSpace, TDenseSpace > TSchemeType
 
typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > TBuilderAndSolverType
 
typedef ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 
typedef BaseType::TDofType TDofType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::NodesArrayType NodesArrayType
 
typedef BaseType::ElementsArrayType ElementsArrayType
 
typedef BaseType::ConditionsArrayType ConditionsArrayType
 
- Public Types inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >
typedef TSparseSpace::DataType TDataType
 
typedef TSparseSpace::MatrixType TSystemMatrixType
 
typedef TSparseSpace::VectorType TSystemVectorType
 
typedef TSparseSpace::MatrixPointerType TSystemMatrixPointerType
 
typedef TSparseSpace::VectorPointerType TSystemVectorPointerType
 
typedef TDenseSpace::MatrixType LocalSystemMatrixType
 
typedef TDenseSpace::VectorType LocalSystemVectorType
 
typedef SolvingStrategy< TSparseSpace, TDenseSpace > ClassType
 
typedef ModelPart::DofType TDofType
 
typedef ModelPart::DofsArrayType DofsArrayType
 
typedef ModelPart::NodesContainerType NodesArrayType
 
typedef ModelPart::ElementsContainerType ElementsArrayType
 
typedef ModelPart::ConditionsContainerType ConditionsArrayType
 
- Static Public Member Functions inherited from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 
- Static Public Member Functions inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 
- 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
 

Detailed Description

template<class TSparseSpace, class TDenseSpace, class TLinearSolver>
class Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >

This is a very simple strategy to solve linearly the problem.

As a linear strategy the check on the convergence is not done and just one non linear iteration will be performed

Author
Riccardo Rossi

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef ImplicitSolvingStrategy<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::BaseType

◆ ClassType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef ResidualBasedLinearStrategy<TSparseSpace,TDenseSpace,TLinearSolver> Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::ClassType

◆ DofsArrayType

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

◆ LocalSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::LocalSystemMatrixType Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemMatrixType

◆ LocalSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::LocalSystemVectorType Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemVectorType

◆ SolvingStrategyType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef SolvingStrategy<TSparseSpace, TDenseSpace> Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SolvingStrategyType

◆ SparseSpaceType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef TSparseSpace Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SparseSpaceType

◆ TBuilderAndSolverType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TBuilderAndSolverType Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TBuilderAndSolverType

◆ TDataType

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

◆ TSchemeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSchemeType Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSchemeType

◆ TSystemMatrixPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemMatrixPointerType Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixPointerType

◆ TSystemMatrixType

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

◆ TSystemVectorPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemVectorPointerType Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorPointerType

◆ TSystemVectorType

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

Constructor & Destructor Documentation

◆ ResidualBasedLinearStrategy() [1/4]

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

Default constructor.

◆ ResidualBasedLinearStrategy() [2/4]

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::ResidualBasedLinearStrategy ( ModelPart rModelPart,
Parameters  ThisParameters 
)
inlineexplicit

Default constructor. (with parameters)

Parameters
rModelPartThe model part of the problem
ThisParametersThe configuration parameters

◆ ResidualBasedLinearStrategy() [3/4]

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::ResidualBasedLinearStrategy ( ModelPart rModelPart,
typename TSchemeType::Pointer  pScheme,
typename TLinearSolver::Pointer  pNewLinearSolver,
bool  CalculateReactionFlag = false,
bool  ReformDofSetAtEachStep = false,
bool  CalculateNormDxFlag = false,
bool  MoveMeshFlag = false 
)
inlineexplicit

Default constructor.

Parameters
rModelPartThe model part of the problem
pSchemeThe integration scheme
pNewLinearSolverThe linear solver employed
CalculateReactionFlagThe flag for the reaction calculation
ReformDofSetAtEachStepThe flag that allows to compute the modification of the DOF
CalculateNormDxFlagThe flag sets if the norm of Dx is computed
MoveMeshFlagThe flag that allows to move the mesh

◆ ResidualBasedLinearStrategy() [4/4]

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::ResidualBasedLinearStrategy ( ModelPart rModelPart,
typename TSchemeType::Pointer  pScheme,
typename TBuilderAndSolverType::Pointer  pNewBuilderAndSolver,
bool  CalculateReactionFlag = false,
bool  ReformDofSetAtEachStep = false,
bool  CalculateNormDxFlag = false,
bool  MoveMeshFlag = false 
)
inlineexplicit

Constructor specifying the builder and solver.

Parameters
rModelPartThe model part of the problem
pSchemeThe integration scheme
pNewLinearSolverThe linear solver employed
pNewBuilderAndSolverThe builder and solver employed
CalculateReactionFlagThe flag for the reaction calculation
ReformDofSetAtEachStepThe flag that allows to compute the modification of the DOF
CalculateNormDxFlagThe flag sets if the norm of Dx is computed
MoveMeshFlagThe flag that allows to move the mesh

◆ ~ResidualBasedLinearStrategy()

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

Destructor.

In trilinos third party library, the linear solver's preconditioner should be freed before the system matrix. We control the deallocation order with Clear().

Member Function Documentation

◆ AssignSettings()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::AssignSettings ( const Parameters  ThisParameters)
inlineoverrideprotectedvirtual

This method assigns settings to member variables.

Parameters
ThisParametersParameters that are assigned to the member variables

Reimplemented from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ CalculateOutputData()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::CalculateOutputData ( )
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 >.

◆ Check()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
int Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Check ( )
inlineoverridevirtual

Function to perform expensive checks.

It is designed to be called ONCE to verify that the input is correct.

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

◆ Clear()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Clear ( )
inlineoverridevirtual

Clears the internal storage.

Note
NULL could be changed to nullptr in the future (c++11)

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

◆ Create()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
SolvingStrategyType::Pointer Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Create ( ModelPart rModelPart,
Parameters  ThisParameters 
) const
inlineoverridevirtual

Create method.

OPERATIONS ACCESSIBLE FROM THE INPUT:

Parameters
rModelPartThe model part of the problem
ThisParametersThe configuration parameters

Reimplemented from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ FinalizeSolutionStep()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::FinalizeSolutionStep ( )
inlineoverridevirtual

Performs all the required operations that should be done (for each step) after 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 >.

◆ GetBuilderAndSolver()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TBuilderAndSolverType::Pointer Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetBuilderAndSolver ( )
inline

Get method for the builder and solver.

Returns
mpBuilderAndSolver: The pointer to the builder and solver considered

◆ GetCalculateReactionsFlag()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetCalculateReactionsFlag ( )
inline

This method returns the flag mCalculateReactionsFlag.

Returns
The flag that tells if the reactions are computed

◆ GetDefaultParameters()

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

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

Returns
The default parameters

Reimplemented from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ GetReformDofSetAtEachStepFlag()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetReformDofSetAtEachStepFlag ( )
inline

This method returns the flag mReformDofSetAtEachStep.

Returns
The flag that tells if each time step the system is rebuilt

◆ GetResidualNorm()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
double Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetResidualNorm ( )
inlineoverridevirtual

This method returns the residual norm.

Returns
The residual norm

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

◆ GetScheme()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSchemeType::Pointer Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetScheme ( )
inline

Get method for the time scheme.

Returns
mpScheme: The pointer to the time scheme considered

◆ GetSolutionVector()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemVectorType& Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetSolutionVector ( )
inlineoverridevirtual

This method returns the solution vector.

Returns
The Dx vector

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

◆ GetSystemMatrix()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemMatrixType& Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetSystemMatrix ( )
inlineoverridevirtual

This method returns the LHS matrix.

Returns
The LHS matrix

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

◆ GetSystemVector()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemVectorType& Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::GetSystemVector ( )
inlineoverridevirtual

This method returns the RHS vector.

Returns
The RHS vector

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

◆ Info()

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

Turn back information as a string.

Reimplemented from Kratos::ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Initialize()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Initialize ( )
inlineoverridevirtual

Initialization of member variables and prior operations.

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

◆ InitializeSolutionStep()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::InitializeSolutionStep ( )
inlineoverridevirtual

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.

Todo:
Boost dependencies should be replaced by std equivalent

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

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

Counted pointer of ClassName

◆ Name()

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

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

Returns
The name of the class

◆ Predict()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Predict ( )
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 >.

◆ PrintData()

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

Print object's data.

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

◆ PrintInfo()

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

Print information about this object.

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

◆ SetBuilderAndSolver()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SetBuilderAndSolver ( typename TBuilderAndSolverType::Pointer  pNewBuilderAndSolver)
inline

Set method for the builder and solver.

Parameters
pNewBuilderAndSolverThe pointer to the builder and solver considered

◆ SetCalculateReactionsFlag()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SetCalculateReactionsFlag ( bool  CalculateReactionsFlag)
inline

This method sets the flag mCalculateReactionsFlag.

Parameters
CalculateReactionsFlagThe flag that tells if the reactions are computed

◆ SetEchoLevel()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::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 linear solver data
  • 3: Print of debug information: Echo of stiffness matrix, Dx, b...

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

◆ SetReformDofSetAtEachStepFlag()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SetReformDofSetAtEachStepFlag ( bool  Flag)
inline

This method sets the flag mReformDofSetAtEachStep.

Parameters
FlagThe flag that tells if each time step the system is rebuilt

◆ SetScheme()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SetScheme ( typename TSchemeType::Pointer  pScheme)
inline

Set method for the time scheme.

Parameters
pSchemeThe pointer to the time scheme considered

◆ Solve()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
double Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::Solve ( )
inlineoverridevirtual

The problem of interest is solved.

a double containing norm(Dx) is returned if CalculateNormDxFlag == true, else 0 is returned

Returns
norm(Dx)

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

◆ SolveSolutionStep()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedLinearStrategy< TSparseSpace, TDenseSpace, TLinearSolver >::SolveSolutionStep ( )
inlineoverridevirtual

Solves the current step. This function returns true if a solution has been found, false otherwise.

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


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