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.
compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Ruben Zorrilla, Eduard Gómez
11 //
12 //
13 
14 #if !defined(KRATOS_COMPRESSIBLE_NAVIER_STOKES_EXPLICIT_SOLVING_STRATEGY_RUNGE_KUTTA)
15 #define KRATOS_COMPRESSIBLE_NAVIER_STOKES_EXPLICIT_SOLVING_STRATEGY_RUNGE_KUTTA
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/define.h"
23 #include "includes/model_part.h"
24 #include "factories/factory.h"
26 
27 // Application includes
30 
31 namespace Kratos
32 {
33 
36 
40 
44 
48 
52 
56 template <class TSparseSpace, class TDenseSpace, class TButcherTableau>
58 : public CompressibleNavierStokesExplicitSolvingStrategy<ExplicitSolvingStrategyRungeKutta<TSparseSpace, TDenseSpace, TButcherTableau>>
59 {
60 public:
63 
66 
69 
72 
75 
77  KRATOS_DEFINE_LOCAL_FLAG(SHOCK_CAPTURING);
78 
82 
89  ModelPart &rModelPart,
90  Parameters ThisParameters)
91  : BaseType(rModelPart)
92  {
94 
95  // Validate and assign defaults
96  ThisParameters = this->ValidateAndAssignParameters(ThisParameters, this->GetDefaultParameters());
97  this->AssignSettings(ThisParameters);
98 
99  KRATOS_CATCH("")
100  }
101 
109  ModelPart &rModelPart,
110  typename ExplicitBuilderType::Pointer pExplicitBuilder,
111  bool MoveMeshFlag = false,
112  int RebuildLevel = 0)
113  : BaseType(rModelPart, pExplicitBuilder, MoveMeshFlag, RebuildLevel)
114  {
115  }
116 
123  ModelPart &rModelPart,
124  bool MoveMeshFlag = false,
125  int RebuildLevel = 0)
126  : BaseType(rModelPart, MoveMeshFlag, RebuildLevel)
127  {
128  }
129 
133 
137 
141 
142 
146 
152  {
153  KRATOS_TRY
154 
155  Parameters default_parameters {};
156  default_parameters.AddString("explicit_solving_strategy", Name());
157 
158  // Getting base class default parameters
159  const Parameters base_default_parameters = BaseType::GetDefaultParameters();
160  default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
161  return default_parameters;
162 
163  KRATOS_CATCH("")
164  }
165 
170  static std::string Name()
171  {
172  return "compressible_navier_stokes_explicit_solving_strategy_runge_kutta_" + TButcherTableau::Name();
173  }
174 
176  std::string Info() const override
177  {
178  return "CompressibleNavierStokesExplicitSolvingStrategyRungeKutta";
179  }
180 
182 
183 protected:
186 
187 
191 
192 
196 
197 
201 
203  {
205  this->InitializeEverySubstep();
206  }
207 
209  {
211  this->InitializeEverySubstep();
212  }
213 
219  {
221  this->FinalizeEverySubstep();
222  }
223 
225  {
227  this->FinalizeEverySubstep();
228  }
229 
233 
234 
238 
239 
243 
244 
246 private:
249 
250 
254 
255 
256 
260 
261 
265 
266 
270 
271 
275 
276 
280 
281 
283 }; /* Class CompressibleNavierStokesExplicitSolvingStrategyRungeKutta */
284 
286 
289 
291 
292 template<class TSparseSpace, class TDenseSpace>
294 
295 template<class TSparseSpace, class TDenseSpace>
297 
298 template<class TSparseSpace, class TDenseSpace>
300 
301 } /* namespace Kratos.*/
302 
303 #endif /* KRATOS_COMPRESSIBLE_NAVIER_STOKES_EXPLICIT_SOLVING_STRATEGY_RUNGE_KUTTA defined */
Explicit solving strategy base class.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:63
BaseType::ExplicitBuilderType ExplicitBuilderType
The explicit builder and solver definition.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:73
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:193
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:169
Explicit solving strategy base class.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:59
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta(const CompressibleNavierStokesExplicitSolvingStrategyRungeKutta &Other)=delete
BaseType::ExplicitBuilderType ExplicitBuilderType
The explicit builder and solver definition.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:68
void FinalizeRungeKuttaIntermediateSubStep() override
Finalize the Runge-Kutta intermediate substep In this method we calculate the linearised time derivat...
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:218
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta(ModelPart &rModelPart, Parameters ThisParameters)
Default constructor. (with parameters)
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:88
KRATOS_CLASS_POINTER_DEFINITION(CompressibleNavierStokesExplicitSolvingStrategyRungeKutta)
Pointer definition of CompressibleNavierStokesExplicitSolvingStrategyRungeKutta.
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta(ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0)
Default constructor.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:122
std::string Info() const override
Turn back information as a string.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:176
void FinalizeRungeKuttaLastSubStep() override
Finalize the Runge-Kutta last substep This method is intended to implement all the operations require...
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:224
CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyRungeKutta< TSparseSpace, TDenseSpace, TButcherTableau > > BaseType
The base class definition.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:65
void InitializeRungeKuttaLastSubStep() override
Initialize the Runge-Kutta last substep This method is intended to implement all the operations requi...
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:208
CompressibleNavierStokesExplicitSolvingStrategyRungeKutta(ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0)
Default constructor.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:108
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:170
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:151
TDenseSpace::VectorType LocalSystemVectorType
The local vector definition.
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:71
void InitializeRungeKuttaIntermediateSubStep() override
Initialize the Runge-Kutta intermediate substep This method is intended to implement all the operatio...
Definition: compressible_navier_stokes_explicit_solving_strategy_runge_kutta.h:202
virtual void InitializeRungeKuttaLastSubStep()
Initialize the Runge-Kutta last substep This method is intended to implement all the operations requi...
Definition: explicit_solving_strategy_runge_kutta.h:333
virtual void FinalizeRungeKuttaLastSubStep()
Finalize the Runge-Kutta last substep This method is intended to implement all the operations require...
Definition: explicit_solving_strategy_runge_kutta.h:339
virtual void FinalizeRungeKuttaIntermediateSubStep()
Finalize the Runge-Kutta intermediate substep This method is intended to implement all the operations...
Definition: explicit_solving_strategy_runge_kutta.h:327
virtual void InitializeRungeKuttaIntermediateSubStep()
Initialize the Runge-Kutta intermediate substep This method is intended to implement all the operatio...
Definition: explicit_solving_strategy_runge_kutta.h:321
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
void AddString(const std::string &rEntry, const std::string &rValue)
This method adds a new string Parameter.
Definition: kratos_parameters.cpp:909
Solving strategy base class This is the base class from which we will derive all the strategies (impl...
Definition: solving_strategy.h:64
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: solving_strategy.h:507
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
Vector VectorType
Definition: geometrical_transformation_utilities.h:56
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21