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.
find_nodal_h_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 Rossi
11 // Collaborator: Vicente Mataix Ferrandiz
12 //
13 //
14 
15 #pragma once
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/define.h"
23 #include "processes/process.h"
24 #include "includes/model_part.h"
25 
26 namespace Kratos
27 {
28 
31 
35 
39 
43 
47 
52 {
53  // Defining clearer options
54  constexpr static bool SaveAsHistoricalVariable = true;
55  constexpr static bool SaveAsNonHistoricalVariable = false;
56 };
57 
66 template<bool THistorical = true>
67 class KRATOS_API(KRATOS_CORE) FindNodalHProcess
68  : public Process
69 {
70 public:
73 
75  typedef std::size_t IndexType;
76 
78  typedef std::size_t SizeType;
79 
81  typedef Node NodeType;
82 
85 
88 
92 
94  explicit FindNodalHProcess(ModelPart& rModelPart)
95  : mrModelPart(rModelPart)
96  {
97  }
98 
100  ~FindNodalHProcess() override = default;
101 
105 
106  void operator()()
107  {
108  Execute();
109  }
110 
114 
115  void Execute() override;
116 
120 
124 
128 
130  std::string Info() const override
131  {
132  return "FindNodalHProcess";
133  }
134 
136  void PrintInfo(std::ostream& rOStream) const override
137  {
138  rOStream << "FindNodalHProcess";
139  }
140 
142  void PrintData(std::ostream& rOStream) const override
143  {
144  }
145 
149 
151 private:
154 
158 
159  ModelPart& mrModelPart;
160 
164 
168 
174  double& GetHValue(NodeType& rNode);
175 
179 
183 
187 
190 
192  //FindNodalHProcess(FindNodalHProcess const& rOther);
193 
195 }; // Class FindNodalHProcess
196 
200 
201 
205 
206 
208 template<bool THistorical>
209 inline std::istream& operator >> (std::istream& rIStream,
211 
213 template<bool THistorical>
214 inline std::ostream& operator << (std::ostream& rOStream,
215  const FindNodalHProcess<THistorical>& rThis)
216 {
217  rThis.PrintInfo(rOStream);
218  rOStream << std::endl;
219  rThis.PrintData(rOStream);
220 
221  return rOStream;
222 }
224 
225 } // namespace Kratos.
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Computes NODAL_H.
Definition: find_nodal_h_process.h:69
void operator()()
Definition: find_nodal_h_process.h:106
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: find_nodal_h_process.h:142
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: find_nodal_h_process.h:136
std::size_t SizeType
Size type definition.
Definition: find_nodal_h_process.h:78
FindNodalHProcess(ModelPart &rModelPart)
Default constructor.
Definition: find_nodal_h_process.h:94
KRATOS_CLASS_POINTER_DEFINITION(FindNodalHProcess)
Pointer definition of FindNodalHProcess.
std::string Info() const override
Turn back information as a string.
Definition: find_nodal_h_process.h:130
Node NodeType
The definition of the node.
Definition: find_nodal_h_process.h:81
std::size_t IndexType
Index type definition.
Definition: find_nodal_h_process.h:75
ModelPart::NodeIterator NodeIterator
The definition of the node iterator.
Definition: find_nodal_h_process.h:84
~FindNodalHProcess() override=default
Destructor.
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
This class defines the node.
Definition: node.h:65
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
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
This struct is used in order to identify when using the hitorical and non historical variables.
Definition: find_nodal_h_process.h:52
constexpr static bool SaveAsNonHistoricalVariable
Definition: find_nodal_h_process.h:55
constexpr static bool SaveAsHistoricalVariable
Definition: find_nodal_h_process.h:54