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_neighbours_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 //
12 
13 #if !defined(KRATOS_FIND_NODAL_NEIGHBOURS_PROCESS_H_INCLUDED )
14 #define KRATOS_FIND_NODAL_NEIGHBOURS_PROCESS_H_INCLUDED
15 
16 // System includes
17 #include <string>
18 #include <iostream>
19 
20 // External includes
21 
22 // Project includes
23 #include "includes/define.h"
24 #include "processes/process.h"
27 
28 namespace Kratos
29 {
30 
33 
37 
41 
45 
49 
57 class KRATOS_API(KRATOS_CORE) FindNodalNeighboursProcess
58  : public Process
59 {
60 public:
63 
65  typedef std::size_t IndexType;
66 
68  typedef std::size_t SizeType;
69 
72 
76 
82 
90  ModelPart& rModelPart,
91  const SizeType AverageElements,
92  const SizeType AverageNodes
93  );
94 
97  {
98  }
99 
100 
104 
105  void operator()()
106  {
107  Execute();
108  }
109 
113 
117  void Execute() override;
118 
122  void ClearNeighbours();
123 
127 
128 
132 
133 
137 
139  std::string Info() const override
140  {
141  return "FindNodalNeighboursProcess";
142  }
143 
145  void PrintInfo(std::ostream& rOStream) const override
146  {
147  rOStream << "FindNodalNeighboursProcess";
148  }
149 
151  void PrintData(std::ostream& rOStream) const override
152  {
153  }
154 
155 
159 
160 
162 
163 protected:
166 
167 
171 
172 
176 
177 
181 
182 
186 
187 
191 
192 
196 
197 
199 
200 private:
203 
204 
208 
209  ModelPart& mrModelPart;
210  std::unique_ptr<FindGlobalNodalEntityNeighboursProcess<ModelPart::ElementsContainerType>> mpElemNeighboursCalculator = nullptr;
211  std::unique_ptr<FindGlobalNodalNeighboursProcess> mpNodeNeighboursCalculator = nullptr;
212 
216 
220 
221 
225 
226 
230 
231 
235 
238 
240  //FindNodalNeighboursProcess(FindNodalNeighboursProcess const& rOther);
241 
242 
244 
245 }; // Class FindNodalNeighboursProcess
246 
248 
251 
252 
256 
257 
259 inline std::istream& operator >> (std::istream& rIStream,
261 
263 inline std::ostream& operator << (std::ostream& rOStream,
264  const FindNodalNeighboursProcess& rThis)
265 {
266  rThis.PrintInfo(rOStream);
267  rOStream << std::endl;
268  rThis.PrintData(rOStream);
269 
270  return rOStream;
271 }
273 
274 
275 } // namespace Kratos.
276 
277 #endif // KRATOS_FIND_NODAL_NEIGHBOURS_PROCESS_H_INCLUDED defined
278 
279 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This method allows to look for neighbours in a triangular or tetrahedral mesh.
Definition: find_nodal_neighbours_process.h:59
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: find_nodal_neighbours_process.h:151
std::string Info() const override
Turn back information as a string.
Definition: find_nodal_neighbours_process.h:139
void operator()()
Definition: find_nodal_neighbours_process.h:105
std::size_t IndexType
The index type.
Definition: find_nodal_neighbours_process.h:65
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: find_nodal_neighbours_process.h:145
~FindNodalNeighboursProcess() override
Destructor.
Definition: find_nodal_neighbours_process.h:96
std::size_t SizeType
The size type.
Definition: find_nodal_neighbours_process.h:68
KRATOS_CLASS_POINTER_DEFINITION(FindNodalNeighboursProcess)
Pointer definition of FindNodalNeighboursProcess.
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
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