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_plane_strain_2D_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 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_STRAIN_RATE_PLANE_STRAIN_2D_LAW_H_INCLUDED)
11 #define KRATOS_STRAIN_RATE_PLANE_STRAIN_2D_LAW_H_INCLUDED
12 
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
20 
21 namespace Kratos
22 {
25 
28 
32 
36 
40 
44 
46 
48  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) StrainRatePlaneStrain2DLaw : public StrainRate3DLaw
49  {
50  public:
53 
56 
60 
63 
65  StrainRatePlaneStrain2DLaw(ModelType::Pointer pModel) : StrainRate3DLaw(pModel) {}
66 
69 
72  {
74  return *this;
75  }
76 
78  ConstitutiveLaw::Pointer Clone() const override
79  {
80  return Kratos::make_shared<StrainRatePlaneStrain2DLaw>(*this);
81  }
82 
85 
86 
90 
92  SizeType WorkingSpaceDimension() override { return 2; }
93 
95  SizeType GetStrainSize() const override { return 3; }
96 
98  void GetLawFeatures(Features& rFeatures) override
99  {
100  KRATOS_TRY
101 
102  //Set the type of law
103  rFeatures.mOptions.Set( PLANE_STRAIN_LAW );
104  rFeatures.mOptions.Set( FINITE_STRAINS );
105  rFeatures.mOptions.Set( ISOTROPIC );
106 
107  //Get model features
108  GetModelFeatures(rFeatures);
109 
110  //Set strain measure required by the consitutive law
111  rFeatures.mStrainMeasures.push_back(StrainMeasure_Velocity_Gradient);
112 
113  //Set the strain size
114  rFeatures.mStrainSize = GetStrainSize();
115 
116  //Set the spacedimension
117  rFeatures.mSpaceDimension = WorkingSpaceDimension();
118 
119  KRATOS_CATCH(" ")
120  }
121 
125 
126 
130 
131 
135 
136 
140 
142  std::string Info() const override
143  {
144  std::stringstream buffer;
145  buffer << "StrainRatePlaneStrain2DLaw" ;
146  return buffer.str();
147  }
148 
150  void PrintInfo(std::ostream& rOStream) const override {rOStream << "StrainRatePlaneStrain2DLaw";}
151 
153  void PrintData(std::ostream& rOStream) const override {}
154 
155 
159 
160 
162 
163  protected:
164 
167 
168 
172 
173 
177 
178 
182 
183 
187 
192  {
193  return this->msIndexVoigt2D3C;
194  }
195 
199 
200 
204 
205 
207 
208  private:
211 
212 
216 
217 
221 
222 
226 
227 
231 
232 
236 
237 
241  friend class Serializer;
242 
243  void save(Serializer& rSerializer) const override
244  {
246  }
247 
248  void load(Serializer& rSerializer) override
249  {
251  }
252 
253 
257 
259 
260  }; // Class StrainRatePlaneStrain2DLaw
261 
263 
266 
267 
271 
272 
274 
276 
277 } // namespace Kratos.
278 
279 #endif // KRATOS_STRAIN_RATE_PLANE_STRAIN_2D_LAW_H_INCLUDED defined
const unsigned int(*)[2] VoigtIndexType
Definition: constitutive_3D_law.hpp:33
std::size_t SizeType
Definition: constitutive_law.h:82
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: strain_rate_3D_law.hpp:28
StrainRate3DLaw & operator=(StrainRate3DLaw const &rOther)
Assignment operator.
Definition: strain_rate_3D_law.cpp:57
Short class definition.
Definition: strain_rate_plane_strain_2D_law.hpp:49
~StrainRatePlaneStrain2DLaw() override
Destructor.
Definition: strain_rate_plane_strain_2D_law.hpp:84
ConstitutiveLaw::Pointer Clone() const override
Clone.
Definition: strain_rate_plane_strain_2D_law.hpp:78
SizeType WorkingSpaceDimension() override
Law Dimension.
Definition: strain_rate_plane_strain_2D_law.hpp:92
StrainRatePlaneStrain2DLaw(ModelType::Pointer pModel)
Constructor.
Definition: strain_rate_plane_strain_2D_law.hpp:65
StrainRatePlaneStrain2DLaw()
Default constructor.
Definition: strain_rate_plane_strain_2D_law.hpp:62
SizeType GetStrainSize() const override
Law Voigt Strain Size.
Definition: strain_rate_plane_strain_2D_law.hpp:95
KRATOS_CLASS_POINTER_DEFINITION(StrainRatePlaneStrain2DLaw)
Pointer definition of StrainRatePlaneStrain2DLaw.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: strain_rate_plane_strain_2D_law.hpp:150
VoigtIndexType GetVoigtIndexTensor() override
Definition: strain_rate_plane_strain_2D_law.hpp:191
void GetLawFeatures(Features &rFeatures) override
Law Features.
Definition: strain_rate_plane_strain_2D_law.hpp:98
StrainRatePlaneStrain2DLaw & operator=(StrainRatePlaneStrain2DLaw const &rOther)
Assignment operator.
Definition: strain_rate_plane_strain_2D_law.hpp:71
std::string Info() const override
Turn back information as a string.
Definition: strain_rate_plane_strain_2D_law.hpp:142
StrainRatePlaneStrain2DLaw(const StrainRatePlaneStrain2DLaw &rOther)
Copy constructor.
Definition: strain_rate_plane_strain_2D_law.hpp:68
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: strain_rate_plane_strain_2D_law.hpp:153
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#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
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:137
SizeType mStrainSize
Definition: constitutive_law.h:152
std::vector< StrainMeasure > mStrainMeasures
Definition: constitutive_law.h:154
SizeType mSpaceDimension
Definition: constitutive_law.h:153
Flags mOptions
Definition: constitutive_law.h:151