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.
hybrid_bashforth_scheme.h
Go to the documentation of this file.
1 //
2 // Author: Guillermo Casas gcasas@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_HYBRID_BASHFORTH_SCHEME_H_INCLUDED )
6 #define KRATOS_HYBRID_BASHFORTH_SCHEME_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
11 #include <cfloat>
12 
13 // Project includes
14 #include "includes/define.h"
15 #include "utilities/openmp_utils.h"
16 #include "includes/model_part.h"
19 #include "utilities/quaternion.h"
20 
21 namespace Kratos {
22 
23  class KRATOS_API(SWIMMING_DEM_APPLICATION) HybridBashforthScheme : public SymplecticEulerScheme {
24  public:
25 
27 
30 
33  mOldVelocity[0] = 0.0;
34  mOldVelocity[1] = 0.0;
35  mOldVelocity[2] = 0.0;
36  }
37 
40 
41  DEMIntegrationScheme* CloneRaw() const override {
42  DEMIntegrationScheme* cloned_scheme(new HybridBashforthScheme(*this));
43  return cloned_scheme;
44  }
45 
46  DEMIntegrationScheme::Pointer CloneShared() const override {
47  DEMIntegrationScheme::Pointer cloned_scheme(new HybridBashforthScheme(*this));
48  return cloned_scheme;
49  }
50 
51  void UpdateTranslationalVariables(
52  int StepFlag,
53  Node & i,
55  array_1d<double, 3 >& displ,
56  array_1d<double, 3 >& delta_displ,
58  const array_1d<double, 3 >& initial_coor,
59  const array_1d<double, 3 >& force,
60  const double force_reduction_factor,
61  const double mass,
62  const double delta_t,
63  const bool Fix_vel[3]) override;
64 
66 
67  virtual std::string Info() const override {
68  std::stringstream buffer;
69  buffer << "HybridBashforthScheme";
70  return buffer.str();
71  }
72 
74 
75  virtual void PrintInfo(std::ostream& rOStream) const override {
76  rOStream << "SymplecticEulerScheme";
77  }
78 
80 
81  virtual void PrintData(std::ostream& rOStream) const override {
82  }
83 
84 
85  protected:
86 
87 
88  private:
89 
91 
93  return *this;
94  }
95 
97 
98  HybridBashforthScheme(HybridBashforthScheme const& rOther) {
99  *this = rOther;
100  }
101 
102  array_1d<double, 3 > mOldVelocity;
103 
105 
106  }; // Class HybridBashforthScheme
107 
108  inline std::istream& operator>>(std::istream& rIStream,
109  HybridBashforthScheme& rThis) {
110  return rIStream;
111  }
112 
113  inline std::ostream& operator<<(std::ostream& rOStream,
114  const HybridBashforthScheme& rThis) {
115  rThis.PrintInfo(rOStream);
116  rOStream << std::endl;
117  rThis.PrintData(rOStream);
118 
119  return rOStream;
120  }
121 
122 } // namespace Kratos.
123 
124 #endif // KRATOS_HYBRID_BASHFORTH_SCHEME_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: dem_integration_scheme.h:24
Definition: hybrid_bashforth_scheme.h:23
virtual ~HybridBashforthScheme()
Destructor.
Definition: hybrid_bashforth_scheme.h:39
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: hybrid_bashforth_scheme.h:75
DEMIntegrationScheme::Pointer CloneShared() const override
Definition: hybrid_bashforth_scheme.h:46
HybridBashforthScheme()
Default constructor.
Definition: hybrid_bashforth_scheme.h:32
virtual std::string Info() const override
Turn back information as a string.
Definition: hybrid_bashforth_scheme.h:67
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: hybrid_bashforth_scheme.h:81
KRATOS_CLASS_POINTER_DEFINITION(HybridBashforthScheme)
Pointer definition of HybridBashforthScheme.
ModelPart::NodesContainerType NodesArrayType
Definition: hybrid_bashforth_scheme.h:26
DEMIntegrationScheme * CloneRaw() const override
Definition: hybrid_bashforth_scheme.h:41
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: symplectic_euler_scheme.h:23
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
vel
Definition: pure_conduction.py:76
float delta_t
Definition: rotatingcone_PureConvectionBenchmarking.py:129
integer i
Definition: TensorModule.f:17