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_center_of_gravity_process.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Philipp Bucher
10 // Salman Yousaf
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 #include "processes/process.h"
21 #include "includes/model_part.h"
22 
23 namespace Kratos
24 {
27 
31 
35 
39 
50 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) ComputeCenterOfGravityProcess
51  : public Process
52 {
53 public:
56 
59 
63 
66  ModelPart& rThisModelPart
67  ):mrThisModelPart(rThisModelPart)
68  {
70 
71  KRATOS_CATCH("")
72  }
73 
76  = default;
77 
81 
85 
89 
93 
97 
101 
102  void Execute() override;
103 
107 
108 
112 
113 
117 
119  std::string Info() const override
120  {
121  return "ComputeCenterOfGravityProcess";
122  }
123 
125  void PrintInfo(std::ostream& rOStream) const override
126  {
127  rOStream << "ComputeCenterOfGravityProcess";
128  }
129 
131  void PrintData(std::ostream& rOStream) const override
132  {
133  }
134 
138 
139 
141 
142 protected:
145 
146 
150 
151 
155 
156 
160 
164 
165 
169 
170 
174 
175 
177 
178 private:
181 
182 
186 
187  ModelPart& mrThisModelPart; // The main model part
188 
192 
196 
197 
201 
202 
206 
207 
211 
214 
217 
218 
220 
221 }; // Class ComputeCenterOfGravityProcess
222 
224 
227 
228 
232 
234 // inline std::istream& operator >> (std::istream& rIStream,
235 // ComputeCenterOfGravityProcess& rThis);
236 //
237 // /// output stream function
238 // inline std::ostream& operator << (std::ostream& rOStream,
239 // const ComputeCenterOfGravityProcess& rThis)
240 // {
241 // rThis.PrintInfo(rOStream);
242 // rOStream << std::endl;
243 // rThis.PrintData(rOStream);
244 //
245 // return rOStream;
246 // }
247 
248 }
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This method computes the center of gravity.
Definition: compute_center_of_gravity_process.h:52
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: compute_center_of_gravity_process.h:131
std::string Info() const override
Turn back information as a string.
Definition: compute_center_of_gravity_process.h:119
KRATOS_CLASS_POINTER_DEFINITION(ComputeCenterOfGravityProcess)
Pointer definition of ComputeCenterOfGravityProcess.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: compute_center_of_gravity_process.h:125
~ComputeCenterOfGravityProcess() override=default
Destructor.
ComputeCenterOfGravityProcess(ModelPart &rThisModelPart)
Default constructor.
Definition: compute_center_of_gravity_process.h:65
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
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21