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

Explicit solving strategy base class. More...

#include <explicit_solving_strategy.h>

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

Public Member Functions

Life Cycle
 ExplicitSolvingStrategy ()
 Default constructor. (empty) More...
 
 ExplicitSolvingStrategy (ModelPart &rModelPart, Parameters ThisParameters)
 Default constructor. (with parameters) More...
 
 ExplicitSolvingStrategy (ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0)
 Default constructor. More...
 
 ExplicitSolvingStrategy (ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0)
 Default constructor. More...
 
 ExplicitSolvingStrategy (const ExplicitSolvingStrategy &Other)=delete
 
virtual ~ExplicitSolvingStrategy ()
 
BaseType::Pointer Create (ModelPart &rModelPart, Parameters ThisParameters) const override
 Create method. More...
 
Input and output
std::string Info () const override
 Turn back information as a string. 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 ()
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (SolvingStrategy)
 
virtual void Predict ()
 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...
 
virtual double Solve ()
 The problem of interest is solved. More...
 
virtual bool IsConverged ()
 This should be considered as a "post solution" convergence check which is useful for coupled analysis. More...
 
virtual void CalculateOutputData ()
 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...
 
virtual void SetEchoLevel (const int Level)
 This sets the level of echo for the solving strategy. 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...
 
virtual int Check ()
 Function to perform expensive checks. More...
 
virtual TSystemMatrixTypeGetSystemMatrix ()
 This method returns the LHS matrix. More...
 
virtual TSystemVectorTypeGetSystemVector ()
 This method returns the RHS vector. More...
 
virtual TSystemVectorTypeGetSolutionVector ()
 This method returns the solution vector. More...
 

Protected Member Functions

Protected Operations
virtual void SolveWithLumpedMassMatrix ()
 Calculate the explicit update This method is intended to implement the explicit update calculation Note that it has to be implemented according to the explicit scheme in a derived class. More...
 
virtual double GetDeltaTime ()
 Get the Delta Time object This method returns the DELTA_TIME from the ProcessInfo container. More...
 
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

Protected static Member Variables
int mRebuildLevel
 
- Protected Attributes inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >
int mEchoLevel
 

Type Definitions

typedef ExplicitBuilder< TSparseSpace, TDenseSpace > ExplicitBuilderType
 
typedef ExplicitBuilderType::Pointer ExplicitBuilderPointerType
 
typedef ExplicitBuilderType::DofType DofType
 
typedef SolvingStrategy< TSparseSpace, TDenseSpace > BaseType
 The definition of the base class. More...
 
typedef ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > ClassType
 The definition of the current class. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (ExplicitSolvingStrategy)
 

Operations

void Initialize () override
 Initialization of member variables and prior operations. More...
 
void Clear () override
 Clears the internal storage. 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. The function always return true as convergence is not checked in the explicit framework. More...
 
void SetRebuildLevel (int Level) override
 
int GetRebuildLevel () const override
 This returns the build level. More...
 
ExplicitBuilderPointerType pGetExplicitBuilder ()
 Operations to get the pointer to the explicit builder and solver. More...
 
ExplicitBuilderTypeGetExplicitBuilder ()
 Operations to get the explicit builder and solver. More...
 
const ExplicitBuilderTypeGetExplicitBuilder () const
 Operations to get the explicit builder and solver. More...
 
double GetResidualNorm () override
 Operations to get the residual norm. 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::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::SolvingStrategy< TSparseSpace, TDenseSpace >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 

Detailed Description

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

Explicit solving strategy base class.

This is the base class from which we will derive all the explicit strategies (FE, RK4, ...)

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace >
typedef SolvingStrategy<TSparseSpace, TDenseSpace> Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::BaseType

The definition of the base class.

◆ ClassType

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

The definition of the current class.

◆ DofType

template<class TSparseSpace , class TDenseSpace >
typedef ExplicitBuilderType::DofType Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::DofType

◆ ExplicitBuilderPointerType

template<class TSparseSpace , class TDenseSpace >
typedef ExplicitBuilderType::Pointer Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::ExplicitBuilderPointerType

◆ ExplicitBuilderType

template<class TSparseSpace , class TDenseSpace >
typedef ExplicitBuilder<TSparseSpace, TDenseSpace> Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::ExplicitBuilderType

Constructor & Destructor Documentation

◆ ExplicitSolvingStrategy() [1/5]

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

Default constructor. (empty)

◆ ExplicitSolvingStrategy() [2/5]

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

Default constructor. (with parameters)

Parameters
rModelPartThe model part of the problem
ThisParametersThe configuration parameters

◆ ExplicitSolvingStrategy() [3/5]

template<class TSparseSpace , class TDenseSpace >
Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::ExplicitSolvingStrategy ( ModelPart rModelPart,
typename ExplicitBuilderType::Pointer  pExplicitBuilder,
bool  MoveMeshFlag = false,
int  RebuildLevel = 0 
)
inlineexplicit

Default constructor.

Parameters
rModelPartThe model part to be computed
pExplicitBuilderThe pointer to the explicit builder and solver
MoveMeshFlagThe flag to set if the mesh is moved or not
RebuildLevelThe flag to set if the DOF set is rebuild or not

◆ ExplicitSolvingStrategy() [4/5]

template<class TSparseSpace , class TDenseSpace >
Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::ExplicitSolvingStrategy ( ModelPart rModelPart,
bool  MoveMeshFlag = false,
int  RebuildLevel = 0 
)
inlineexplicit

Default constructor.

Parameters
rModelPartThe model part to be computed
MoveMeshFlagThe flag to set if the mesh is moved or not
RebuildLevelThe flag to set if the DOF set is rebuild or not

◆ ExplicitSolvingStrategy() [5/5]

template<class TSparseSpace , class TDenseSpace >
Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::ExplicitSolvingStrategy ( const ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > &  Other)
delete

Copy constructor.

◆ ~ExplicitSolvingStrategy()

template<class TSparseSpace , class TDenseSpace >
virtual Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::~ExplicitSolvingStrategy ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AssignSettings()

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

◆ Clear()

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

Clears the internal storage.

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

◆ Create()

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

◆ FinalizeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::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 >.

Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > >, and Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.

◆ GetDefaultParameters()

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

◆ GetDeltaTime()

template<class TSparseSpace , class TDenseSpace >
virtual double Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::GetDeltaTime ( )
inlineprotectedvirtual

Get the Delta Time object This method returns the DELTA_TIME from the ProcessInfo container.

Returns
const double

◆ GetExplicitBuilder() [1/2]

template<class TSparseSpace , class TDenseSpace >
ExplicitBuilderType& Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::GetExplicitBuilder ( )
inline

Operations to get the explicit builder and solver.

Returns
The explicit builder and solver

◆ GetExplicitBuilder() [2/2]

template<class TSparseSpace , class TDenseSpace >
const ExplicitBuilderType& Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::GetExplicitBuilder ( ) const
inline

Operations to get the explicit builder and solver.

Returns
The explicit builder and solver

◆ GetRebuildLevel()

template<class TSparseSpace , class TDenseSpace >
int Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::GetRebuildLevel ( ) const
inlineoverridevirtual

This returns the build level.

{ 0 -> Set up the DOF set just once 1 -> Set up the DOF set at the beginning of each solution step }

Returns
The build level

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

◆ GetResidualNorm()

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

Operations to get the residual norm.

Returns
The residual norm

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

◆ Info()

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

◆ Initialize()

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

◆ InitializeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::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.

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

Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > >, and Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

Counted pointer of ClassName

◆ Name()

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

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

Returns
The name of the class

◆ pGetExplicitBuilder()

template<class TSparseSpace , class TDenseSpace >
ExplicitBuilderPointerType Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::pGetExplicitBuilder ( )
inline

Operations to get the pointer to the explicit builder and solver.

Returns
mpExplicitBuilder: A pointer to the explicit builder and solver

◆ SetRebuildLevel()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::SetRebuildLevel ( int  Level)
inlineoverridevirtual

This sets the build level

Parameters
LevelThe build level

{ 0 -> Set up the DOF set just once 1 -> Set up the DOF set at the beginning of each solution step }

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

◆ SolveSolutionStep()

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

Solves the current step. The function always return true as convergence is not checked in the explicit framework.

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

Reimplemented in Kratos::ExplicitSolvingStrategyRungeKutta4ConvectionDiffusion< TSparseSpace, TDenseSpace >.

◆ SolveWithLumpedMassMatrix()

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::SolveWithLumpedMassMatrix ( )
inlineprotectedvirtual

Calculate the explicit update This method is intended to implement the explicit update calculation Note that it has to be implemented according to the explicit scheme in a derived class.

Reimplemented in Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >, and Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.

Member Data Documentation

◆ mRebuildLevel

template<class TSparseSpace , class TDenseSpace >
int Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >::mRebuildLevel
protected

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