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.
manning_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_MANNING_LAW_H_INCLUDED
14 #define KRATOS_MANNING_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 ManningLaw : public FrictionLaw
60 {
61 public:
64 
66 
70 
75 
79  ManningLaw(
80  const GeometryType& rGeometry,
81  const Properties& rProperty,
82  const ProcessInfo& rProcessInfo);
83 
87  virtual ~ManningLaw() {}
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 << "ManningLaw";
143  return buffer.str();
144  }
145 
147 
148 protected:
149 
152 
153  double mManning2;
154 
155  double mEpsilon;
156 
158 
159 private:
160 
163 
165  ManningLaw& operator=(ManningLaw const& rOther)
166  {
167  return *this;
168  }
169 
171  ManningLaw(ManningLaw const& rOther) {}
172 
173 
175 
176 }; // Class ManningLaw
177 
179 
182 
183 
187 
189 inline std::ostream& operator << (std::ostream& rOStream,
190  const ManningLaw& rThis)
191 {
192  rThis.PrintInfo(rOStream);
193  rOStream << std::endl;
194  rThis.PrintData(rOStream);
195 
196  return rOStream;
197 }
198 
200 
202 
203 } // namespace Kratos.
204 
205 #endif // KRATOS_MANNING_LAW_H_INCLUDED defined
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
The base class for the bottom and surface friction laws.
Definition: manning_law.h:60
virtual ~ManningLaw()
Initialize the friction law variables.
Definition: manning_law.h:87
void Initialize(const GeometryType &rGeometry, const Properties &rProperty, const ProcessInfo &rProcessInfo) override
Initialize the friction law variables.
Definition: manning_law.cpp:36
array_1d< double, 3 > CalculateRHS(const double &rHeight, const array_1d< double, 3 > &rVelocity) override
Calculate the RHS coefficient for the given data.
Definition: manning_law.cpp:52
std::string Info() const override
Turn back information as a string.
Definition: manning_law.h:139
double mEpsilon
Definition: manning_law.h:155
double CalculateLHS(const double &rHeight, const array_1d< double, 3 > &rVelocity) override
Calculate the LHS coefficient for the given data.
Definition: manning_law.cpp:46
double mManning2
Definition: manning_law.h:153
KRATOS_CLASS_POINTER_DEFINITION(ManningLaw)
ManningLaw()
Default Constructor.
Definition: manning_law.h:74
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