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.
friction_law.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: Miguel Maso Sotomayor
11 //
12 
13 #ifndef KRATOS_FRICTION_LAW_H_INCLUDED
14 #define KRATOS_FRICTION_LAW_H_INCLUDED
15 
16 
17 // System includes
18 #include <string>
19 #include <iostream>
20 
21 
22 // External includes
23 
24 
25 // Project includes
26 #include "includes/node.h"
27 #include "includes/properties.h"
28 #include "includes/process_info.h"
29 #include "geometries/geometry.h"
30 
31 
32 namespace Kratos
33 {
36 
39 
43 
47 
51 
55 
63 class FrictionLaw
64 {
65 public:
68 
70 
71  typedef Node NodeType;
72 
74 
78 
81 
83  virtual ~FrictionLaw() {}
84 
88 
89 
93 
97  virtual int Check()
98  {
99  return 0;
100  }
101 
105  virtual void Initialize(
106  const GeometryType& rGeometry,
107  const Properties& rProperty,
108  const ProcessInfo& rProcessInfo) {}
109 
116  virtual double CalculateLHS(const double& rHeight, const array_1d<double,3>& rVelocity)
117  {
118  return 0.0;
119  }
120 
127  virtual array_1d<double,3> CalculateRHS(const double& rHeight, const array_1d<double,3>& rVelocity)
128  {
129  return ZeroVector(3);
130  }
131 
137  virtual double CalculateLHS(const array_1d<double,3>& rInnerLayer)
138  {
139  return 0.0;
140  }
141 
148  {
149  return ZeroVector(3);
150  }
151 
155 
156 
160 
164 
168  virtual std::string Info() const
169  {
170  std::stringstream buffer;
171  buffer << "FrictionLaw";
172  return buffer.str();
173  }
174 
178  virtual void PrintInfo(std::ostream& rOStream) const
179  {
180  rOStream << Info();
181  }
182 
186  virtual void PrintData(std::ostream& rOStream) const {}
187 
191 
192 
194 
195 private:
196 
199 
201  FrictionLaw& operator=(FrictionLaw const& rOther)
202  {
203  return *this;
204  }
205 
207  FrictionLaw(FrictionLaw const& rOther) {}
208 
209 
211 
212 }; // Class FrictionLaw
213 
215 
218 
219 
223 
224 
226 inline std::istream& operator >> (std::istream& rIStream,
227  FrictionLaw& rThis);
228 
230 inline std::ostream& operator << (std::ostream& rOStream,
231  const FrictionLaw& rThis)
232 {
233  rThis.PrintInfo(rOStream);
234  rOStream << std::endl;
235  rThis.PrintData(rOStream);
236 
237  return rOStream;
238 }
240 
242 
243 } // namespace Kratos.
244 
245 #endif // KRATOS_FRICTION_LAW_H_INCLUDED defined
Short class definition.
Definition: friction_law.hpp:52
FrictionLaw()
Default constructor.
Definition: friction_law.h:80
virtual std::string Info() const
Turn back information as a string.
Definition: friction_law.h:168
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: friction_law.h:186
virtual double CalculateLHS(const double &rHeight, const array_1d< double, 3 > &rVelocity)
Calculate the LHS coefficient for the given data.
Definition: friction_law.h:116
virtual double CalculateLHS(const array_1d< double, 3 > &rInnerLayer)
Calculate the LHS coefficient for the given data.
Definition: friction_law.h:137
virtual array_1d< double, 3 > CalculateRHS(const array_1d< double, 3 > &rInnerLayer)
Calculate the RHS coefficient for the given data.
Definition: friction_law.h:147
Node NodeType
Definition: friction_law.h:71
Geometry< NodeType > GeometryType
Definition: friction_law.h:73
virtual int Check()
Check on the completeness of the input.
Definition: friction_law.h:97
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: friction_law.h:178
KRATOS_CLASS_POINTER_DEFINITION(FrictionLaw)
virtual array_1d< double, 3 > CalculateRHS(const double &rHeight, const array_1d< double, 3 > &rVelocity)
Calculate the RHS coefficient for the given data.
Definition: friction_law.h:127
virtual void Initialize(const GeometryType &rGeometry, const Properties &rProperty, const ProcessInfo &rProcessInfo)
Initialize the friction law variables.
Definition: friction_law.h:105
virtual ~FrictionLaw()
Destructor.
Definition: friction_law.h:83
Geometry base class.
Definition: geometry.h:71
This class defines the node.
Definition: node.h:65
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
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