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.
entity_erase_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: Vicente Mataix Ferrandiz
11 //
12 
13 #if !defined(KRATOS_ENTITY_ERASE_PROCESS_INCLUDED )
14 #define KRATOS_ENTITY_ERASE_PROCESS_INCLUDED
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/define.h"
22 #include "processes/process.h"
23 #include "includes/model_part.h"
24 
25 namespace Kratos
26 {
27 
30 
34 
35 
39 
43 
47 
48 class KRATOS_API(KRATOS_CORE) EntitiesEraseProcessFlags
49 {
50 public:
51  // DEFINITION OF FLAGS TO CONTROL THE BEHAVIOUR
52  KRATOS_DEFINE_LOCAL_FLAG(REMOVE_FROM_ALL_LEVELS);
53  KRATOS_DEFINE_LOCAL_FLAG(ERASE_ALL_ENTITIES);
54 };
55 
67 template<class TEntity>
68 class KRATOS_API(KRATOS_CORE) EntitiesEraseProcess
69  : public Process
70 {
71 public:
74 
77 
81 
87  explicit EntitiesEraseProcess(
88  ModelPart& rModelPart,
89  const Flags Options = EntitiesEraseProcessFlags::REMOVE_FROM_ALL_LEVELS.AsFalse() | EntitiesEraseProcessFlags::ERASE_ALL_ENTITIES.AsFalse()
90  );
91 
97  explicit EntitiesEraseProcess(
98  ModelPart& rModelPart,
99  Parameters ThisParameters
100  );
101 
104  {
105  }
106 
110 
111  void operator()()
112  {
113  Execute();
114  }
115 
119 
120  void Execute() override;
121 
125  const Parameters GetDefaultParameters() const override;
126 
130 
131 
135 
136 
140 
142  std::string Info() const override
143  {
144  return "EntitiesEraseProcess";
145  }
146 
148  void PrintInfo(std::ostream& rOStream) const override
149  {
150  rOStream << "EntitiesEraseProcess";
151  }
152 
154  void PrintData(std::ostream& rOStream) const override
155  {
156  }
157 
161 
162 
164 
165 protected:
168 
169 
173 
174 
178 
179 
183 
184 
188 
189 
193 
194 
198 
199 
201 
202 private:
205 
206 
210 
211  ModelPart& mrModelPart;
212 
213  Flags mrOptions;
214 
218 
222 
226 
227 
231 
232 
236 
239 
241  //EntitiesEraseProcess(EntitiesEraseProcess const& rOther);
242 
243 
245 
246 }; // Class EntitiesEraseProcess
247 
249 
252 
256 
258 template<class TEntity>
259 inline std::istream& operator >> (std::istream& rIStream,
261 
263 template<class TEntity>
264 inline std::ostream& operator << (std::ostream& rOStream,
265  const EntitiesEraseProcess<TEntity>& rThis)
266 {
267  rThis.PrintInfo(rOStream);
268  rOStream << std::endl;
269  rThis.PrintData(rOStream);
270 
271  return rOStream;
272 }
274 
275 
276 } // namespace Kratos.
277 
278 #endif // KRATOS_ENTITY_ERASE_PROCESS_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: entity_erase_process.h:49
KRATOS_DEFINE_LOCAL_FLAG(ERASE_ALL_ENTITIES)
If the entities will be removed from all levels.
KRATOS_DEFINE_LOCAL_FLAG(REMOVE_FROM_ALL_LEVELS)
This process removes the entities from a model part with the flag TO_ERASE.
Definition: entity_erase_process.h:70
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: entity_erase_process.h:148
~EntitiesEraseProcess() override
Destructor.
Definition: entity_erase_process.h:103
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: entity_erase_process.h:154
void operator()()
Definition: entity_erase_process.h:111
std::string Info() const override
Turn back information as a string.
Definition: entity_erase_process.h:142
KRATOS_CLASS_POINTER_DEFINITION(EntitiesEraseProcess)
Pointer definition of EntitiesEraseProcess.
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: flags.h:58
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
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