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.
strain_rate_3D_law.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined (KRATOS_STRAIN_RATE_3D_LAW_H_INCLUDED)
11 #define KRATOS_STRAIN_RATE_3D_LAW_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
20 
21 namespace Kratos
22 {
27  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) StrainRate3DLaw : public Constitutive3DLaw
28  {
29  public:
30 
33 
34  typedef ConstitutiveModel ModelType; //strain_rate model
35  typedef ModelType::Pointer ModelTypePointer;
36 
39 
43 
46 
49 
51  StrainRate3DLaw(const StrainRate3DLaw& rOther);
52 
55 
57  ConstitutiveLaw::Pointer Clone() const override;
58 
60  ~StrainRate3DLaw() override;
61 
65 
66 
70 
74  void InitializeMaterial(const Properties& rProperties,
75  const GeometryType& rElementGeometry,
76  const Vector& rShapeFunctionsValues ) override;
77 
78 
85  void CalculateMaterialResponseKirchhoff (Parameters & rValues) override;
86 
87 
92  void GetLawFeatures(Features& rFeatures) override;
93 
94 
99  void GetModelFeatures(Features& rFeatures);
100 
101 
111  int Check(const Properties& rProperties, const GeometryType& rElementGeometry, const ProcessInfo& rCurrentProcessInfo) const override;
112 
116 
121  bool Has( const Variable<double>& rThisVariable ) override;
122 
127  void SetValue( const Variable<double>& rVariable,
128  const double& rValue,
129  const ProcessInfo& rCurrentProcessInfo ) override;
130 
131  void SetValue( const Variable<Vector>& rVariable,
132  const Vector& rValue,
133  const ProcessInfo& rCurrentProcessInfo ) override;
134 
135  void SetValue( const Variable<Matrix>& rVariable,
136  const Matrix& rValue,
137  const ProcessInfo& rCurrentProcessInfo ) override;
138 
143  double& GetValue( const Variable<double>& rThisVariable, double& rValue ) override;
144 
148 
152 
154  std::string Info() const override
155  {
156  std::stringstream buffer;
157  buffer << "StrainRate3DLaw";
158  return buffer.str();
159  }
160 
162  void PrintInfo(std::ostream& rOStream) const override
163  {
164  rOStream << "StrainRate3DLaw";
165  }
166 
168  void PrintData(std::ostream& rOStream) const override
169  {
170  rOStream << "StrainRate3DLaw Data";
171  mpModel->PrintData(rOStream);
172  }
173 
174 
178 
179 
181 
182 
183  protected:
184 
187 
191 
192  //constitutive model
194 
198 
202 
203 
211  void CalculateMaterialResponseKirchhoff (Parameters & rValues, ModelDataType& rModelValues) override;
212 
213 
217  void InitializeModelData(Parameters& rValues, ModelDataType& rModelValues) override;
218 
219 
223  void FinalizeModelData(Parameters& rValues, ModelDataType& rModelValues) override;
224 
230  virtual void CalculateStressVector(ModelDataType& rModelValues, Vector& rStressVector);
231 
232 
238  virtual void CalculateConstitutiveMatrix(ModelDataType& rModelValues, Matrix& rConstitutiveMatrix);
239 
240 
247  virtual void CalculateStressVectorAndConstitutiveMatrix(ModelDataType& rModelValues, Vector& rStressVector, Matrix& rConstitutiveMatrix);
248 
249 
251 
252  private:
253 
259 
263 
267 
272 
276  friend class Serializer;
277 
278  void save(Serializer& rSerializer) const override
279  {
281 
282  rSerializer.save("mpModel",mpModel);
283  }
284 
285  void load(Serializer& rSerializer) override
286  {
288 
289  rSerializer.load("mpModel",mpModel);
290  }
291 
292 
296 
297 
301 
302 
304  }; // Class StrainRate3DLaw
305 
307 
310 
311 
315 
317 
319 
320 } // namespace Kratos.
321 #endif // KRATOS_STRAIN_RATE_3D_LAW_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_3D_law.hpp:30
Short class definition.
Definition: constitutive_model.hpp:52
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
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Definition: strain_rate_3D_law.hpp:28
ConstitutiveModel ModelType
Definition: strain_rate_3D_law.hpp:34
ModelTypePointer mpModel
Definition: strain_rate_3D_law.hpp:193
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: strain_rate_3D_law.hpp:162
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: strain_rate_3D_law.hpp:168
std::string Info() const override
Turn back information as a string.
Definition: strain_rate_3D_law.hpp:154
ModelType::Pointer ModelTypePointer
Definition: strain_rate_3D_law.hpp:35
KRATOS_CLASS_POINTER_DEFINITION(StrainRate3DLaw)
Pointer definition of StrainRate3DLaw.
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def SetValue(entity, variable, value)
Definition: coupling_interface_data.py:256
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:137
Definition: constitutive_law.h:189
Definition: constitutive_model_data.hpp:383