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.
calulate_levelset_consistent_nodal_gradient_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: Mohammad R. Hashemi
11 //
12 
13 #ifndef KRATOS_LEVELSET_CONSISTENT_NODAL_GRADIENT_H
14 #define KRATOS_LEVELSET_CONSISTENT_NODAL_GRADIENT_H
15 
16 // Project includes
17 #include "processes/process.h"
18 
19 
20 namespace Kratos
21 {
24 
27 
31 
35 
39 
43 
45 
46 class KRATOS_API(FLUID_DYNAMICS_APPLICATION) CalulateLevelsetConsistentNodalGradientProcess : public Process
47 {
48 public:
51 
54 
58 
62 
69  ModelPart& rModelPart);
70 
73  ModelPart& rModelPart,
75 
78  Model& rModel,
80 
83 
87 
91 
95 
99  void Execute() override;
100 
104  const Parameters GetDefaultParameters() const override;
105 
106  // ///@}
107  // ///@name Inquiry
108  // ///@{
109 
110  // ///@}
111  // ///@name Input and output
112  // ///@{
113 
115  std::string Info() const override
116  {
117  std::stringstream buffer;
118  buffer << "CalulateLevelsetConsistentNodalGradientProcess";
119  return buffer.str();
120  }
121 
123  void PrintInfo(std::ostream& rOStream) const override {rOStream << "CalulateLevelsetConsistentNodalGradientProcess";}
124 
126  void PrintData(std::ostream& rOStream) const override {}
127 
131 
133 
134 private:
137 
138 
142 
143  // Reference to the model part
144  ModelPart& mrModelPart;
145 
149 
150 
154 
155  bool IsSplit(const Vector& rDistances);
156 
157  TLSContainerType2D SetTLSContainer2D();
158 
159  TLSContainerType3D SetTLSContainer3D();
160 
161  std::function<void(Element& rElement, TLSContainerType2D& rTLSContainer)> GetScalarNodalGradientElementFunction2D();
162 
163  std::function<void(Element& rElement, TLSContainerType3D& rTLSContainer)> GetScalarNodalGradientElementFunction3D();
164 
165  template<class TTLSContainer>
166  void CalculateScalarNodalGradientElementContribution(
167  Element& rElement,
168  TTLSContainer& rTLSContainer);
169 
173 
174 
178 
179 
183 
184 
186 
187 }; // Class CalulateLevelsetConsistentNodalGradientProcess
188 
192 
196 
198 
200 
201 }; // namespace Kratos.
202 
203 #endif // KRATOS_LEVELSET_CONSISTENT_NODAL_GRADIENT_H
Utility to calculate the nodal gradient separately for the positive and negative sides of the zero le...
Definition: calulate_levelset_consistent_nodal_gradient_process.h:47
std::tuple< BoundedMatrix< double, 3, 2 >, array_1d< double, 3 >, array_1d< double, 3 >, array_1d< double, 3 >, array_1d< double, 3 >, array_1d< double, 3 > > TLSContainerType2D
Auxiliary container to be used as TLS.
Definition: calulate_levelset_consistent_nodal_gradient_process.h:56
std::string Info() const override
Turn back information as a string.
Definition: calulate_levelset_consistent_nodal_gradient_process.h:115
std::tuple< BoundedMatrix< double, 4, 3 >, array_1d< double, 4 >, array_1d< double, 4 >, array_1d< double, 4 >, array_1d< double, 3 >, array_1d< double, 4 > > TLSContainerType3D
Definition: calulate_levelset_consistent_nodal_gradient_process.h:57
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: calulate_levelset_consistent_nodal_gradient_process.h:123
~CalulateLevelsetConsistentNodalGradientProcess() override
Destructor.
Definition: calulate_levelset_consistent_nodal_gradient_process.h:82
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: calulate_levelset_consistent_nodal_gradient_process.h:126
KRATOS_CLASS_POINTER_DEFINITION(CalulateLevelsetConsistentNodalGradientProcess)
Pointer definition of LumpedInterfacePositiveNegativePressureGradient.
Base class for all Elements.
Definition: element.h:60
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21