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.
compute_nodal_value_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: Marc Nunez, Inigo Lopez based on R.Rossi and V.Mataix work
11 //
12 //
13 
14 #if !defined(KRATOS_COMPUTE_NODAL_VALUE_PROCESS_INCLUDED)
15 #define KRATOS_COMPUTE_NODAL_VALUE_PROCESS_INCLUDED
16 
17 // Project includes
18 #include "includes/define.h"
19 #include "processes/process.h"
20 #include "includes/model_part.h"
21 
22 namespace Kratos
23 {
24 
27 
28 
29 class KRATOS_API(COMPRESSIBLE_POTENTIAL_FLOW_APPLICATION) ComputeNodalValueProcess
30  : public Process
31 {
32 public:
35 
38 
42 
45  ModelPart& rModelPart,
46  const std::vector<std::string>& rVariableStringArray);
47 
50  {
51  }
52 
53 
57 
59  void operator()()
60  {
61  Execute();
62  }
63 
64 
68 
73  void Execute() override;
74 
78 
80  std::string Info() const override
81  {
82  return "ComputeNodalValueProcess";
83  }
84 
86  void PrintInfo(std::ostream& rOStream) const override
87  {
88  rOStream << "ComputeNodalValueProcess";
89  }
90 
92  void PrintData(std::ostream& rOStream) const override
93  {
94  }
96 
97 private:
100 
101  ModelPart& mrModelPart; // The main model part
102  std::vector<const Variable<array_1d<double, 3>>*> mArrayVariablesList;
103  std::vector<const Variable<double>*> mDoubleVariablesList;
104 
108 
109  // TODO: Try to use enable_if!!!
110 
117  void StoreVariableList(const std::vector<std::string>& rVariableStringArray);
118 
122  void InitializeNodalVariables();
123 
127  template< typename TValueType >
128  void AddElementsContribution(const Variable<TValueType>& rVariable);
129 
133  void UpdateNodalValue(Element::NodeType& rNode,
134  const Variable<array_1d<double, 3>>& rVariable,
135  const double& rN,
136  const double& rGaussPointVolume,
137  const array_1d<double, 3>& rGaussPointValue);
138 
142  void UpdateNodalValue(Element::NodeType& rNode,
143  const Variable<double>& rVariable,
144  const double& rN,
145  const double& rGaussPointVolume,
146  const double& rGaussPointValue);
147 
151  void PonderateNodalValues();
152 
156 
159 
161  //ComputeNodalValueProcess(ComputeNodalValueProcess const& rOther);
162 
163 
165 
166 }; // Class ComputeNodalValueProcess
167 
169 } // namespace Kratos.
170 
171 #endif // KRATOS_COMPUTE_NODAL_VALUE_PROCESS_INCLUDED defined
172 
173 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: compute_nodal_value_process.h:31
~ComputeNodalValueProcess() override
Destructor.
Definition: compute_nodal_value_process.h:49
std::string Info() const override
Turn back information as a string.
Definition: compute_nodal_value_process.h:80
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: compute_nodal_value_process.h:86
KRATOS_CLASS_POINTER_DEFINITION(ComputeNodalValueProcess)
Pointer definition of ComputeNodalValueProcess.
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: compute_nodal_value_process.h:59
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: compute_nodal_value_process.h:92
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
The base class for all processes in Kratos.
Definition: process.h:49
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21