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.
rans_apply_exact_nodal_periodic_condition_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: Suneth Warnakulasuriya
11 //
12 
13 #if !defined(KRATOS_RANS_APPLY_EXACT_NODAL_PERIODIC_CONDITION_PROCESS_H_INCLUDED)
14 #define KRATOS_RANS_APPLY_EXACT_NODAL_PERIODIC_CONDITION_PROCESS_H_INCLUDED
15 
16 // System includes
17 #include <string>
18 #include <vector>
19 
20 // External includes
21 
22 // Project includes
23 #include "containers/model.h"
24 #include "processes/process.h"
25 
26 namespace Kratos
27 {
30 
33 
44 class KRATOS_API(RANS_APPLICATION) RansApplyExactNodalPeriodicConditionProcess : public Process
45 {
46 public:
49 
52 
56 
59  Model& rModel,
60  Parameters rParameters);
61 
64 
67 
70 
74 
75  void ExecuteInitialize() override;
76 
77  const Parameters GetDefaultParameters() const override;
78 
82 
84  std::string Info() const override;
85 
87  void PrintInfo(std::ostream& rOStream) const override;
88 
90  void PrintData(std::ostream& rOStream) const override;
91 
93 
94 private:
97 
98  Model& mrModel;
99 
100  int mEchoLevel;
101 
102  std::string mMasterModelPartName;
103  std::string mSlaveModelPartName;
104 
105  double mTolerance;
106 
107  // translation settings
108  array_1d<double, 3> mTranslationDirection;
109  double mTranslationMagnitude;
110 
111  // rotation settings
112  array_1d<double, 3> mRotationAxis;
113  array_1d<double, 3> mRotationCenter;
114  double mRotationAngle;
115 
116  bool mReorder;
117 
121 
133  void CreatePeriodicConditions();
134 
144  array_1d<double, 3> CalculateRotatedPosition(
145  const array_1d<double, 3>& rInitialPosition) const;
146 
155  BoundedMatrix<double, 3, 3>& rOutput) const;
156 
158 
159 }; // Class RansApplyExactNodalPeriodicConditionProcess
160 
162 
165 
167 inline std::ostream& operator<<(
168  std::ostream& rOStream,
170 
172 
174 
175 } // namespace Kratos.
176 
177 #endif // KRATOS_RANS_APPLY_EXACT_NODAL_PERIODIC_CONDITION_PROCESS_H_INCLUDED defined
void ExecuteInitialize() override
Definition: periodic_interface_process.hpp:37
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: amatrix_interface.h:41
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
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
A process to create periodic conditions between two boundaries.
Definition: rans_apply_exact_nodal_periodic_condition_process.h:45
~RansApplyExactNodalPeriodicConditionProcess() override=default
Destructor.
RansApplyExactNodalPeriodicConditionProcess(RansApplyExactNodalPeriodicConditionProcess const &rOther)=delete
Copy constructor.
RansApplyExactNodalPeriodicConditionProcess & operator=(RansApplyExactNodalPeriodicConditionProcess const &rOther)=delete
Assignment operator.
KRATOS_CLASS_POINTER_DEFINITION(RansApplyExactNodalPeriodicConditionProcess)
Pointer definition of RansApplyExactNodalPeriodicConditionProcess.
void CalculateRotationMatrix(const double Theta, MatrixType &rMatrix, const DenseVector< double > &rAxisOfRotationVector, const DenseVector< double > &rCenterOfRotation)
Calculate the transformation matrix which rotates the given vector around mAxisOfRotationVector and m...
Definition: geometrical_transformation_utilities.cpp:41
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432