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.
weighted_divergence_calculation_process.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: Riccardo Tosi
11 //
12 
13 #ifndef KRATOS_WEIGHTED_DIVERGENCE_CALCULATION_PROCESS_H
14 #define KRATOS_WEIGHTED_DIVERGENCE_CALCULATION_PROCESS_H
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
22 #include "utilities/geometry_utilities.h"
23 #include "includes/model_part.h"
24 #include "processes/process.h"
25 #include "geometries/geometry.h"
28 
29 // Application includes
30 
31 namespace Kratos
32 {
35 
38 
42 
46 
50 
54 
56 
63  class KRATOS_API(EXAQUTE_SANDBOX_APPLICATION) WeightedDivergenceCalculationProcess : public Process
64  {
65  public:
68 
71 
75 
77 
83  ModelPart& rModelPart,
84  Parameters ThisParameters = Parameters(R"({})")
85  );
86 
89 
92 
96 
100 
104  void ExecuteInitialize() override;
105 
109  void ExecuteFinalizeSolutionStep() override;
110 
114 
118 
122 
124  std::string Info() const override;
125 
127  void PrintInfo(std::ostream& rOStream) const override;
128 
130  void PrintData(std::ostream& rOStream) const override;
131 
135 
137 
138  protected:
141 
142 
146 
147 
151 
152 
156 
157  double ComputeAuxiliaryElementDivergence(Vector& grad_x, Vector& grad_y, Vector& grad_z);
158  double ComputeAuxiliaryElementVelocitySeminorm(Vector& grad_x, Vector& grad_y, Vector& grad_z);
159  double ComputeWeightedTimeAverage(const double& old_average, const double& current_value);
160 
164 
165 
169 
170 
174 
175 
177 
178  private:
181 
185 
186  const ModelPart& mrModelPart;
187  double mTimeCoefficient;
188 
192 
196 
199 
201 
202  }; // Class Process
203 
205 
208 
212 
214  inline std::istream& operator >> (std::istream& rIStream,
216 
218  inline std::ostream& operator << (std::ostream& rOStream,
220 
222 
223 } // namespace Kratos
224 
225 #endif // KRATOS_WEIGHTED_DIVERGENCE_CALCULATION_PROCESS_H
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: periodic_interface_process.hpp:55
void ExecuteInitialize() override
Definition: periodic_interface_process.hpp:37
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
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
The base class for all processes in Kratos.
Definition: process.h:49
Process to compute element time average of the divergence.
Definition: weighted_divergence_calculation_process.h:64
KRATOS_CLASS_POINTER_DEFINITION(WeightedDivergenceCalculationProcess)
Pointer definition of Process.
WeightedDivergenceCalculationProcess & operator=(WeightedDivergenceCalculationProcess const &rOther)=delete
Assignment operator.
~WeightedDivergenceCalculationProcess() override=default
Destructor.
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432