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_lagrangian_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_LAGRANGIAN_INLET_PROCESS_H_INCLUDED)
11 #define KRATOS_SET_LAGRANGIAN_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("SetLagrangianInletProcess") << " 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 LAGRANGIAN 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->Set(PFEMFlags::LAGRANGIAN_INLET);
103  }
104 
105  KRATOS_CATCH(" ")
106  }
107 
111 
115 
119 
121  std::string Info() const override
122  {
123  return "SetLagrangianInletProcess";
124  }
125 
127  void PrintInfo(std::ostream &rOStream) const override
128  {
129  rOStream << "SetLagrangianInletProcess";
130  }
131 
135 
137 
138  private:
141 
145  ModelPart &mrModelPart;
146 
147  MesherUtilities mMesherUtilities;
148 
149  int mEchoLevel;
150 
154 
158 
162 
166 
170 
172  SetLagrangianInletProcess &operator=(SetLagrangianInletProcess const &rOther);
173 
175 
177  // Process(Process const& rOther);
178 
180 
181  }; // Class Process
182 
184 
187 
191 
193  inline std::istream &operator>>(std::istream &rIStream,
195 
197  inline std::ostream &operator<<(std::ostream &rOStream,
198  const SetLagrangianInletProcess &rThis)
199  {
200  rThis.PrintInfo(rOStream);
201  rOStream << std::endl;
202  rThis.PrintData(rOStream);
203 
204  return rOStream;
205  }
207 
208 } // namespace Kratos.
209 
210 #endif // KRATOS_SET_LAGRANGIAN_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_lagrangian_inlet_process.hpp:46
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: set_lagrangian_inlet_process.hpp:81
ModelPart::NodeType NodeType
Definition: set_lagrangian_inlet_process.hpp:54
KRATOS_CLASS_POINTER_DEFINITION(SetLagrangianInletProcess)
Pointer definition of Process.
ModelPart::PropertiesType PropertiesType
Definition: set_lagrangian_inlet_process.hpp:56
SetLagrangianInletProcess(ModelPart &rModelPart, int EchoLevel)
Default constructor.
Definition: set_lagrangian_inlet_process.hpp:64
virtual ~SetLagrangianInletProcess()
Destructor.
Definition: set_lagrangian_inlet_process.hpp:74
ConditionType::GeometryType GeometryType
Definition: set_lagrangian_inlet_process.hpp:57
std::string Info() const override
Turn back information as a string.
Definition: set_lagrangian_inlet_process.hpp:121
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: set_lagrangian_inlet_process.hpp:127
ModelPart::ConditionType ConditionType
Definition: set_lagrangian_inlet_process.hpp:55
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: set_lagrangian_inlet_process.hpp:91
#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