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.
set_eulerian_inlet_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosPfemFluidDynamicsApplication $
3 // Created by: $Author: AFranci $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: October 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_SET_EULERIAN_INLET_PROCESS_H_INCLUDED)
11 #define KRATOS_SET_EULERIAN_INLET_PROCESS_H_INCLUDED
12 
13 // External includes
14 
15 // System includes
16 
17 // Project includes
20 
21 #include "includes/model_part.h"
24 
26 // Data:
27 // Flags: (checked)
28 // (set)
29 // (modified)
30 // (reset)
31 //(set):=(set in this process)
32 
33 namespace Kratos
34 {
35 
38 
40 
45  : public Process
46  {
47  public:
50 
53 
58 
62 
65  int EchoLevel)
66  : mrModelPart(rModelPart)
67  {
68  KRATOS_INFO("SetEulerianInletProcess") << " activated " << std::endl;
69 
70  mEchoLevel = EchoLevel;
71  }
72 
75 
79 
81  void operator()()
82  {
83  Execute();
84  }
85 
89 
91  void Execute() override
92  {
94 
95  if (mEchoLevel > 1)
96  std::cout << " SET EULERIAN INLET PROCESS ]; " << std::endl;
97 
98  for (ModelPart::NodesContainerType::iterator i_node = mrModelPart.NodesBegin(); i_node != mrModelPart.NodesEnd(); i_node++)
99  {
100  i_node->Set(INLET);
101  i_node->Set(RIGID);
102  i_node->Reset(FREE_SURFACE);
103  i_node->Set(PFEMFlags::EULERIAN_INLET);
104  }
105 
106  KRATOS_CATCH(" ")
107  }
108 
112 
116 
120 
122  std::string Info() const override
123  {
124  return "SetEulerianInletProcess";
125  }
126 
128  void PrintInfo(std::ostream &rOStream) const override
129  {
130  rOStream << "SetEulerianInletProcess";
131  }
132 
136 
138 
139  private:
142 
146  ModelPart &mrModelPart;
147 
148  MesherUtilities mMesherUtilities;
149 
150  int mEchoLevel;
151 
155 
159 
163 
167 
171 
173  SetEulerianInletProcess &operator=(SetEulerianInletProcess const &rOther);
174 
176 
178  // Process(Process const& rOther);
179 
181 
182  }; // Class Process
183 
185 
188 
192 
194  inline std::istream &operator>>(std::istream &rIStream,
195  SetEulerianInletProcess &rThis);
196 
198  inline std::ostream &operator<<(std::ostream &rOStream,
199  const SetEulerianInletProcess &rThis)
200  {
201  rThis.PrintInfo(rOStream);
202  rOStream << std::endl;
203  rThis.PrintData(rOStream);
204 
205  return rOStream;
206  }
208 
209 } // namespace Kratos.
210 
211 #endif // KRATOS_SET_EULERIAN_INLET_PROCESS_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
Geometry base class.
Definition: geometry.h:71
Short class definition.
Definition: mesher_utilities.hpp:49
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
This class defines the node.
Definition: node.h:65
The base class for all processes in Kratos.
Definition: process.h:49
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: process.h:210
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
Refine Mesh Elements Process 2D and 3D.
Definition: set_eulerian_inlet_process.hpp:46
std::string Info() const override
Turn back information as a string.
Definition: set_eulerian_inlet_process.hpp:122
ModelPart::PropertiesType PropertiesType
Definition: set_eulerian_inlet_process.hpp:56
ModelPart::NodeType NodeType
Definition: set_eulerian_inlet_process.hpp:54
SetEulerianInletProcess(ModelPart &rModelPart, int EchoLevel)
Default constructor.
Definition: set_eulerian_inlet_process.hpp:64
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: set_eulerian_inlet_process.hpp:128
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: set_eulerian_inlet_process.hpp:81
ModelPart::ConditionType ConditionType
Definition: set_eulerian_inlet_process.hpp:55
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: set_eulerian_inlet_process.hpp:91
virtual ~SetEulerianInletProcess()
Destructor.
Definition: set_eulerian_inlet_process.hpp:74
KRATOS_CLASS_POINTER_DEFINITION(SetEulerianInletProcess)
Pointer definition of Process.
ConditionType::GeometryType GeometryType
Definition: set_eulerian_inlet_process.hpp:57
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_INFO(label)
Definition: logger.h:250
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
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