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.
chezy_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_CHEZY_LAW_H_INCLUDED
14 #define KRATOS_CHEZY_LAW_H_INCLUDED
15 
16 
17 // System includes
18 
19 
20 // External includes
21 
22 
23 // Project includes
24 #include "friction_law.h"
25 
26 
27 namespace Kratos
28 {
31 
34 
38 
42 
46 
50 
51 
59 class ChezyLaw : public FrictionLaw
60 {
61 public:
64 
66 
70 
74  ChezyLaw() {}
75 
79  ChezyLaw(
80  const GeometryType& rGeometry,
81  const Properties& rProperty,
82  const ProcessInfo& rProcessInfo);
83 
87  virtual ~ChezyLaw() {}
88 
92 
93 
97 
101  void Initialize(
102  const GeometryType& rGeometry,
103  const Properties& rProperty,
104  const ProcessInfo& rProcessInfo) override;
105 
112  double CalculateLHS(const double& rHeight, const array_1d<double,3>& rVelocity) override;
113 
120  array_1d<double,3> CalculateRHS(const double& rHeight, const array_1d<double,3>& rVelocity) override;
121 
125 
126 
130 
131 
135 
139  std::string Info() const override
140  {
141  std::stringstream buffer;
142  buffer << "ChezyLaw";
143  return buffer.str();
144  }
145 
149 
150 
152 
153 private:
154 
157 
158  double mCoefficient;
159 
160  double mEpsilon;
161 
165 
167  ChezyLaw& operator=(ChezyLaw const& rOther)
168  {
169  return *this;
170  }
171 
173  ChezyLaw(ChezyLaw const& rOther) {}
174 
175 
177 
178 }; // Class ChezyLaw
179 
181 
184 
185 
189 
191 inline std::ostream& operator << (std::ostream& rOStream,
192  const ChezyLaw& rThis)
193 {
194  rThis.PrintInfo(rOStream);
195  rOStream << std::endl;
196  rThis.PrintData(rOStream);
197 
198  return rOStream;
199 }
200 
202 
204 
205 } // namespace Kratos.
206 
207 #endif // KRATOS_CHEZY_LAW_H_INCLUDED defined
The base class for the bottom and surface friction laws.
Definition: chezy_law.h:60
double CalculateLHS(const double &rHeight, const array_1d< double, 3 > &rVelocity) override
Calculate the LHS coefficient for the given data.
Definition: chezy_law.cpp:46
ChezyLaw()
Default Constructor.
Definition: chezy_law.h:74
std::string Info() const override
Turn back information as a string.
Definition: chezy_law.h:139
array_1d< double, 3 > CalculateRHS(const double &rHeight, const array_1d< double, 3 > &rVelocity) override
Calculate the RHS coefficient for the given data.
Definition: chezy_law.cpp:52
KRATOS_CLASS_POINTER_DEFINITION(ChezyLaw)
void Initialize(const GeometryType &rGeometry, const Properties &rProperty, const ProcessInfo &rProcessInfo) override
Initialize the friction law variables.
Definition: chezy_law.cpp:36
virtual ~ChezyLaw()
Destructor.
Definition: chezy_law.h:87
Short class definition.
Definition: friction_law.hpp:52
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: friction_law.hpp:170
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: friction_law.hpp:164
Geometry base class.
Definition: geometry.h:71
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
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432