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.
glued_to_wall_scheme.h
Go to the documentation of this file.
1 //
2 // Author: Miguel Angel Celigueta maceli@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_GLUED_TO_WALL_SCHEME_H_INCLUDED )
6 #define KRATOS_GLUED_TO_WALL_SCHEME_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
11 #include <cfloat>
12 
13 // Project includes
14 #include "dem_integration_scheme.h"
15 #include "includes/define.h"
16 #include "utilities/openmp_utils.h"
17 #include "includes/model_part.h"
20 
21 namespace Kratos {
22 
23  class KRATOS_API(DEM_APPLICATION) GluedToWallScheme : public DEMIntegrationScheme {
24  public:
25 
27 
30 
33 
34  GluedToWallScheme(Condition* p_wall, SphericParticle* p_sphere);
35 
36  GluedToWallScheme(Condition* p_wall, SphericParticle* p_sphere, bool& is_inside);
37 
39  virtual ~GluedToWallScheme() {}
40 
41  DEMIntegrationScheme* CloneRaw() const override {
42  DEMIntegrationScheme* cloned_scheme(new GluedToWallScheme(*this));
43  return cloned_scheme;
44  }
45 
46  DEMIntegrationScheme::Pointer CloneShared() const override {
47  DEMIntegrationScheme::Pointer cloned_scheme(new GluedToWallScheme(*this));
48  return cloned_scheme;
49  }
50 
51  void SetTranslationalIntegrationSchemeInProperties(Properties::Pointer pProp, bool verbose = true) const override;
52  void SetRotationalIntegrationSchemeInProperties(Properties::Pointer pProp, bool verbose = true) const override;
53 
54  void Move(Node & i, const double delta_t, const double force_reduction_factor, const int StepFlag) override;
55  void Rotate(Node & i, const double delta_t, const double moment_reduction_factor, const int StepFlag) override;
56 
58  return mCondition;
59  }
60 
62  return mShapeFunctionsValues;
63  }
64 
66  return mDistanceSignedWithNormal;
67  }
68 
69 
71  virtual std::string Info() const override {
72  std::stringstream buffer;
73  buffer << "GluedToWallScheme";
74  return buffer.str();
75  }
76 
78 
79  virtual void PrintInfo(std::ostream& rOStream) const override {
80  rOStream << "GluedToWallScheme";
81  }
82 
84 
85  virtual void PrintData(std::ostream& rOStream) const override {
86  }
87 
88 
89  protected:
90 
91 
92  private:
93  Condition* mCondition;
94  Vector mShapeFunctionsValues;
95  double mDistanceSignedWithNormal = 0.0;
96  array_1d<double, 3> mInitialNormalToWall;
97  array_1d<double, 3> mCurrentNormalToWall;
98 
101  return *this;
102  }
103 
105 
106  GluedToWallScheme(GluedToWallScheme const& rOther) {
107  *this = rOther;
108  }
109 
110  bool ShapeFunctionsValuesAreBetween0and1();
112 
113  }; // Class GluedToWallScheme
114 
115  inline std::istream& operator>>(std::istream& rIStream,
116  GluedToWallScheme& rThis) {
117  return rIStream;
118  }
119 
120  inline std::ostream& operator<<(std::ostream& rOStream,
121  const GluedToWallScheme& rThis) {
122  rThis.PrintInfo(rOStream);
123  rOStream << std::endl;
124  rThis.PrintData(rOStream);
125 
126  return rOStream;
127  }
128 
129 } // namespace Kratos.
130 
131 #endif // KRATOS_GLUED_TO_WALL_SCHEME_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Conditions.
Definition: condition.h:59
Definition: dem_integration_scheme.h:24
Definition: glued_to_wall_scheme.h:23
double GetDistanceSignedWithNormal()
Definition: glued_to_wall_scheme.h:65
Vector & GetShapeFunctionsValues()
Definition: glued_to_wall_scheme.h:61
Condition * pGetCondition()
Definition: glued_to_wall_scheme.h:57
KRATOS_CLASS_POINTER_DEFINITION(GluedToWallScheme)
Pointer definition of GluedToWallScheme.
GluedToWallScheme()
Default constructor.
Definition: glued_to_wall_scheme.h:32
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: glued_to_wall_scheme.h:79
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: glued_to_wall_scheme.h:85
ModelPart::NodesContainerType NodesArrayType
Definition: glued_to_wall_scheme.h:26
DEMIntegrationScheme * CloneRaw() const override
Definition: glued_to_wall_scheme.h:41
DEMIntegrationScheme::Pointer CloneShared() const override
Definition: glued_to_wall_scheme.h:46
virtual std::string Info() const override
Turn back information as a string.
Definition: glued_to_wall_scheme.h:71
virtual ~GluedToWallScheme()
Destructor.
Definition: glued_to_wall_scheme.h:39
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class defines the node.
Definition: node.h:65
Definition: spheric_particle.h:31
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
float delta_t
Definition: rotatingcone_PureConvectionBenchmarking.py:129
integer i
Definition: TensorModule.f:17