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.
static_method.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosSolidMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: November 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_STATIC_METHOD_H_INCLUDED)
11 #define KRATOS_STATIC_METHOD_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
24 
27 
31 
35 
39 
43 
44 
46 
49  template<class TVariableType, class TValueType>
50  class KRATOS_API(SOLID_MECHANICS_APPLICATION) StaticMethod : public TimeIntegrationMethod<TVariableType,TValueType>
51  {
52  public:
53 
56 
59 
61  typedef typename BaseType::Pointer BasePointerType;
62 
64  typedef typename BaseType::NodeType NodeType;
65 
68 
70 
74 
75 
78 
80  StaticMethod(const TVariableType& rVariable) : BaseType(rVariable) {}
81 
83  StaticMethod(const TVariableType& rVariable, const TVariableType& rFirstDerivative, const TVariableType& rSecondDerivative) : BaseType(rVariable,rFirstDerivative,rSecondDerivative) {}
84 
86  StaticMethod(const TVariableType& rVariable, const TVariableType& rFirstDerivative, const TVariableType& rSecondDerivative, const TVariableType& rPrimaryVariable) : BaseType(rVariable,rFirstDerivative,rSecondDerivative,rPrimaryVariable) {}
87 
89  StaticMethod(StaticMethod& rOther) : BaseType(rOther) {}
90 
93  {
94  return BasePointerType( new StaticMethod(*this) );
95  }
96 
98  ~StaticMethod() override{}
99 
103 
107 
108 
109  // assign
110  void Assign(NodeType& rNode) override
111  {
112 
113  }
114 
115  // predict
116  void Predict(NodeType& rNode) override
117  {
118 
119  }
120 
121  // update
122  void Update(NodeType& rNode) override
123  {
124 
125  }
126 
130 
134 
138 
139 
141  std::string Info() const override
142  {
143  std::stringstream buffer;
144  buffer << "StaticMethod";
145  return buffer.str();
146  }
147 
149  void PrintInfo(std::ostream& rOStream) const override
150  {
151  rOStream << "StaticMethod";
152  }
153 
155  void PrintData(std::ostream& rOStream) const override
156  {
157  rOStream << "StaticMethod Data";
158  }
159 
160 
164 
165 
167 
168  protected:
169 
172 
176 
180 
184 
188 
192 
196 
198 
199  private:
200 
203 
207 
211 
215 
219 
223  friend class Serializer;
224 
225  void save(Serializer& rSerializer) const override
226  {
228  };
229 
230  void load(Serializer& rSerializer) override
231  {
232  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType )
233  };
234 
238 
242 
244 
245  }; // Class StaticMethod
246 
248 
251 
252 
256 
257  template<class TVariableType, class TValueType>
258  inline std::istream & operator >> (std::istream & rIStream, StaticMethod<TVariableType,TValueType>& rThis)
259  {
260  return rIStream;
261  }
262 
263  template<class TVariableType, class TValueType>
264  inline std::ostream & operator << (std::ostream & rOStream, const StaticMethod<TVariableType,TValueType>& rThis)
265  {
266  return rOStream << rThis.Info();
267  }
268 
270 
272 
273 } // namespace Kratos.
274 
275 #endif // KRATOS_STATIC_METHOD_H_INCLUDED defined
This class defines the node.
Definition: node.h:65
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Short class definition.
Definition: static_method.hpp:51
StaticMethod(StaticMethod &rOther)
Copy Constructor.
Definition: static_method.hpp:89
void Predict(NodeType &rNode) override
Definition: static_method.hpp:116
BaseType::VariablePointer VariablePointer
KratosVariable or KratosVariableComponent.
Definition: static_method.hpp:67
BaseType::NodeType NodeType
NodeType.
Definition: static_method.hpp:64
BasePointerType Clone() override
Clone.
Definition: static_method.hpp:92
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: static_method.hpp:149
void Assign(NodeType &rNode) override
Definition: static_method.hpp:110
StaticMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative)
Constructor.
Definition: static_method.hpp:83
std::string Info() const override
Turn back information as a string.
Definition: static_method.hpp:141
void Update(NodeType &rNode) override
Definition: static_method.hpp:122
BaseType::Pointer BasePointerType
BasePointerType.
Definition: static_method.hpp:61
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: static_method.hpp:155
~StaticMethod() override
Destructor.
Definition: static_method.hpp:98
TimeIntegrationMethod< TVariableType, TValueType > BaseType
BaseType.
Definition: static_method.hpp:58
StaticMethod()
Default Constructor.
Definition: static_method.hpp:77
KRATOS_CLASS_POINTER_DEFINITION(StaticMethod)
StaticMethod(const TVariableType &rVariable, const TVariableType &rFirstDerivative, const TVariableType &rSecondDerivative, const TVariableType &rPrimaryVariable)
Constructor.
Definition: static_method.hpp:86
StaticMethod(const TVariableType &rVariable)
Constructor.
Definition: static_method.hpp:80
Short class definition.
Definition: time_integration_method.hpp:55
const TVariableType * VariablePointer
KratosVariable or KratosVariableComponent.
Definition: time_integration_method.hpp:65
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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
def load(f)
Definition: ode_solve.py:307