NeoPZ
TPZPorousElastoPlasticMem.cpp
Go to the documentation of this file.
1 //
2 // TPZPorousElastoPlasticMem.cpp
3 // pz
4 //
5 // Created by Omar DurĂ¡n on 2/11/19.
6 //
7 
9 
10 TPZPorousElastoPlasticMem::TPZPorousElastoPlasticMem(): m_sigma(), m_elastoplastic_state(), m_plastic_steps(0),m_phi(0.), m_u(3,0.)
11 {
12 }
13 
16 
17 }
18 
19 
21 
22 }
23 
24 void TPZPorousElastoPlasticMem::Write(TPZStream &buf, int withclassid) const
25 {
26  m_sigma.Write(buf, withclassid);
27  m_elastoplastic_state.Write(buf, withclassid);
28  buf.Write(&m_plastic_steps);
29  buf.Write(m_u);
30  m_ER.Write(buf, withclassid);
31 }
32 
33 void TPZPorousElastoPlasticMem::Read(TPZStream &buf, void *context)
34 {
35  m_sigma.Read(buf, context);
36  m_elastoplastic_state.Read(buf, context);
37  buf.Read(&m_plastic_steps);
38  buf.Read(m_u);
39  m_ER.Read(buf, context);
40 }
41 
42 void TPZPorousElastoPlasticMem::Print(std::ostream &out)const
43 {
44  out << Name();
45  out << "\nm_sigma = " << m_sigma;
46  out << "\nm_elastoplastic_state = " << m_elastoplastic_state;
47  out << "\nm_plastic_steps = " << m_plastic_steps;
48  out << "\nm_u = " << m_u;
49  out << "\nm_phi = " << m_phi;
50  m_ER.Print(out);
51 }
52 
53 const std::string TPZPorousElastoPlasticMem::Name()const
54 {
55  return "TPZPorousElastoPlasticMem";
56 }
57 
59  return Hash("TPZPorousElastoPlasticMem");
60 }
61 
63 {
64 
66  if(&other == this){
67  return *this;
68  }
69 
70  m_sigma = other.m_sigma;
73  m_phi = other.m_phi;
74  m_u = other.m_u;
75  m_ER = other.m_ER;
76 
77  return *this;
78 }
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
virtual void Print(std::ostream &out=std::cout) const
TPZPlasticState< REAL > m_elastoplastic_state
Elastoplastic strain state.
void Write(TPZStream &buf, int withclassid) const override
Method to write to a pzstream.
Definition: TPZTensor.h:688
void Print(std::ostream &out) const
void Read(TPZStream &buf, void *context) override
Method to read the object from a pzstream.
Definition: TPZTensor.h:683
void Read(TPZStream &buf, void *context) override
read objects from the stream
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int ClassId() const override
Define the class id associated with the class.
TPZManVector< REAL, 3 > m_u
Displacement field.
const std::string Name() const
virtual void Write(const bool val)
Definition: TPZStream.cpp:8
const TPZPorousElastoPlasticMem & operator=(const TPZPorousElastoPlasticMem &other)
void Read(TPZStream &buf, void *context) override
read objects from the stream
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
void Read(TPZStream &buf, void *context) override
REAL m_phi
Yield function value.
TPZPorousElasticResponse m_ER
Porous Elastoplastic response (It is required when elasti response depends on spatial variables) ...
TPZTensor< REAL > m_sigma
Stress state.
int m_plastic_steps
Number of plastic steps.
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
void Write(TPZStream &buf, int withclassid) const override
virtual void Read(bool &val)
Definition: TPZStream.cpp:91