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.
|
Explicit solving strategy base class. More...
#include <compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h>
Public Member Functions | |
Life Cycle | |
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta (ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta (ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta (const CompressibleNavierStokesExplicitSolvingStrategyRungeKutta &Other)=delete | |
virtual | ~CompressibleNavierStokesExplicitSolvingStrategyRungeKutta ()=default |
Public Member Functions inherited from Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > > | |
CompressibleNavierStokesExplicitSolvingStrategy (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
CompressibleNavierStokesExplicitSolvingStrategy (ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
CompressibleNavierStokesExplicitSolvingStrategy (ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
CompressibleNavierStokesExplicitSolvingStrategy (const CompressibleNavierStokesExplicitSolvingStrategy &Other)=delete | |
virtual | ~CompressibleNavierStokesExplicitSolvingStrategy ()=default |
int | Check () override |
Parameters | GetDefaultParameters () const override |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
void | AssignSettings (const Parameters ThisParameters) override |
This method assigns settings to member variables. More... | |
virtual void | Initialize () override |
Initialization of member variables and prior operations In this method we call the base strategy initialize and initialize the time derivatives This is required to prevent OpenMP errors as the time derivatives are stored in the non-historical database. More... | |
virtual void | InitializeSolutionStep () override |
virtual void | FinalizeSolutionStep () override |
Finalize the step In this method we calculate the final linearised time derivatives after the final update These will be the time derivatives employed in the first sub step of the next time step. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const override |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const override |
Print object's data. More... | |
KRATOS_CLASS_POINTER_DEFINITION (CompressibleNavierStokesExplicitSolvingStrategy) | |
Pointer definition of CompressibleNavierStokesExplicitSolvingStrategy. More... | |
Public Member Functions inherited from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | |
ExplicitSolvingStrategyRungeKutta () | |
Default constructor. (empty) More... | |
ExplicitSolvingStrategyRungeKutta (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
ExplicitSolvingStrategyRungeKutta (ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
ExplicitSolvingStrategyRungeKutta (ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
SolvingStrategyType::Pointer | Create (ModelPart &rModelPart, Parameters ThisParameters) const override |
Create method. More... | |
ExplicitSolvingStrategyRungeKutta (const ExplicitSolvingStrategyRungeKutta &Other)=delete | |
~ExplicitSolvingStrategyRungeKutta () override=default | |
KRATOS_CLASS_POINTER_DEFINITION (ExplicitSolvingStrategyRungeKutta) | |
Public Member Functions inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
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 () |
KRATOS_CLASS_POINTER_DEFINITION (ExplicitSolvingStrategy) | |
void | Clear () override |
Clears the internal storage. 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... | |
ExplicitBuilderType & | GetExplicitBuilder () |
Operations to get the explicit builder and solver. More... | |
const ExplicitBuilderType & | GetExplicitBuilder () const |
Operations to get the explicit builder and solver. More... | |
double | GetResidualNorm () override |
Operations to get the residual norm. 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 | 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... | |
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 TSystemMatrixType & | GetSystemMatrix () |
This method returns the LHS matrix. More... | |
virtual TSystemVectorType & | GetSystemVector () |
This method returns the RHS vector. More... | |
virtual TSystemVectorType & | GetSolutionVector () |
This method returns the solution vector. More... | |
Protected Member Functions | |
Protected Operations | |
void | InitializeRungeKuttaIntermediateSubStep () override |
Initialize the Runge-Kutta intermediate substep This method is intended to implement all the operations required before each Runge-Kutta intermediate substep. More... | |
void | InitializeRungeKuttaLastSubStep () override |
Initialize the Runge-Kutta last substep This method is intended to implement all the operations required before each Runge-Kutta last substep. More... | |
void | FinalizeRungeKuttaIntermediateSubStep () override |
Finalize the Runge-Kutta intermediate substep In this method we calculate the linearised time derivatives after the intemediate substep. More... | |
void | FinalizeRungeKuttaLastSubStep () override |
Finalize the Runge-Kutta last substep This method is intended to implement all the operations required after each Runge-Kutta last substep. More... | |
Protected Member Functions inherited from Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > > | |
void | SetUpShockCapturing (Parameters ShockCapturingParameters) |
void | CalculateOrthogonalSubScalesProjection () |
void | CalculateNonConservativeMagnitudes () |
Calculates the non-conservative magnitudes This function calculates the non-conservative magnitudes from the obtained conservative ones The set of non-conservative magnitudes (VELOCITY, PRESSURE and TEMPERATURE) are saved in the historical database. The speed of sound (SOUND_VELOCITY) and Mach number (MACH) are also computed and stored in the non-historical database. More... | |
void | ApplySlipCondition () |
Appy the slip condition This method substracts the normal projection of the momentum for all the nodes flagged as SLIP The correction is computed as m_slip = m - (m·n) x n. It is intended to be called after each substep. More... | |
virtual void | InitializeEverySubstep () |
virtual void | FinalizeEverySubstep () |
bool | ShockCapturingEnabled () const noexcept |
bool | ConservativeMagnitudeCalculationEnabled () const noexcept |
bool | SlipConditionEnabled () const noexcept |
const Process::UniquePointer & | GetShockCapturingProcess () |
Protected Member Functions inherited from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | |
void | SolveWithLumpedMassMatrix () override |
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 void | PerformRungeKuttaIntermediateSubStep (const IndexType SubStepIndex, const LocalSystemVectorType &rFixedDofsValues, LocalSystemMatrixType &rIntermediateStepResidualVectors) |
Performs an intermediate RK4 step This functions performs all the operations required in an intermediate RK4 sub step. More... | |
virtual void | PerformRungeKuttaLastSubStep (LocalSystemMatrixType &rLastStepResidualVector) |
Performs the last RK4 step This functions performs all the operations required in the last RK4 sub step. More... | |
Protected Member Functions inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
virtual double | GetDeltaTime () |
Get the Delta Time object This method returns the DELTA_TIME from the ProcessInfo container. 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... | |
Type Definitions | |
typedef CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > > | BaseType |
The base class definition. More... | |
typedef BaseType::ExplicitBuilderType | ExplicitBuilderType |
The explicit builder and solver definition. More... | |
typedef TDenseSpace::VectorType | LocalSystemVectorType |
The local vector definition. More... | |
KRATOS_CLASS_POINTER_DEFINITION (CompressibleNavierStokesExplicitSolvingStrategyRungeKutta) | |
Pointer definition of CompressibleNavierStokesExplicitSolvingStrategyRungeKutta. More... | |
KRATOS_DEFINE_LOCAL_FLAG (SHOCK_CAPTURING) | |
Local Flags. More... | |
Operations | |
Parameters | GetDefaultParameters () const override |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
std::string | Info () const override |
Turn back information as a string. 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::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > > | |
typedef ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | BaseType |
The base class definition. More... | |
typedef BaseType::ExplicitBuilderType | ExplicitBuilderType |
The explicit builder and solver definition. More... | |
typedef TBaseExplicitStrategy::LocalSystemVectorType | LocalSystemVectorType |
The local vector definition. More... | |
Public Types inherited from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | |
using | SolvingStrategyType = SolvingStrategy< TSparseSpace, TDenseSpace > |
The base solving strategy class definition. More... | |
using | BaseType = ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > |
The base class definition. More... | |
using | ClassType = ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > |
The definition of the current class. More... | |
using | ExplicitBuilderType = typename BaseType::ExplicitBuilderType |
The explicit builder and solver definition. More... | |
using | DofType = typename BaseType::DofType |
The DOF type. More... | |
using | LocalSystemVectorType = typename TDenseSpace::VectorType |
The local vector definition. More... | |
using | LocalSystemMatrixType = typename TDenseSpace::MatrixType |
Public Types inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
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... | |
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::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | |
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::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
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::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | |
const TButcherTableau | mButcherTableau |
Protected Attributes inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
int | mRebuildLevel |
Protected Attributes inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
int | mEchoLevel |
Explicit solving strategy base class.
This is the base class from which we will derive all the explicit strategies (FE, RK4, ...)
typedef CompressibleNavierStokesExplicitSolvingStrategy<ExplicitSolvingStrategyRungeKutta<TSparseSpace, TDenseSpace, TButcherTableau> > Kratos::CompressibleNavierStokesExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >::BaseType |
The base class definition.
typedef BaseType::ExplicitBuilderType Kratos::CompressibleNavierStokesExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >::ExplicitBuilderType |
The explicit builder and solver definition.
typedef TDenseSpace::VectorType Kratos::CompressibleNavierStokesExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >::LocalSystemVectorType |
The local vector definition.
|
inlineexplicit |
Default constructor. (with parameters)
rModelPart | The model part of the problem |
ThisParameters | The configuration parameters |
|
inlineexplicit |
Default constructor.
rModelPart | The model part to be computed |
pExplicitBuilder | The pointer to the explicit builder and solver |
MoveMeshFlag | The flag to set if the mesh is moved or not |
|
inlineexplicit |
Default constructor.
rModelPart | The model part to be computed |
MoveMeshFlag | The flag to set if the mesh is moved or not |
|
delete |
Copy constructor.
|
virtualdefault |
Destructor.
|
inlineoverrideprotectedvirtual |
Finalize the Runge-Kutta intermediate substep In this method we calculate the linearised time derivatives after the intemediate substep.
Reimplemented from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >.
|
inlineoverrideprotectedvirtual |
Finalize the Runge-Kutta last substep This method is intended to implement all the operations required after each Runge-Kutta last substep.
Reimplemented from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >.
|
inlineoverridevirtual |
This method provides the defaults parameters to avoid conflicts between the different constructors.
Reimplemented from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >.
|
inlineoverridevirtual |
Turn back information as a string.
|
inlineoverrideprotectedvirtual |
Initialize the Runge-Kutta intermediate substep This method is intended to implement all the operations required before each Runge-Kutta intermediate substep.
Reimplemented from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >.
|
inlineoverrideprotectedvirtual |
Initialize the Runge-Kutta last substep This method is intended to implement all the operations required before each Runge-Kutta last substep.
Reimplemented from Kratos::ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >.
Kratos::CompressibleNavierStokesExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >::KRATOS_CLASS_POINTER_DEFINITION | ( | CompressibleNavierStokesExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > | ) |
Pointer definition of CompressibleNavierStokesExplicitSolvingStrategyRungeKutta.
Kratos::CompressibleNavierStokesExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau >::KRATOS_DEFINE_LOCAL_FLAG | ( | SHOCK_CAPTURING | ) |
Local Flags.
|
inlinestatic |
Returns the name of the class as used in the settings (snake_case format)