NeoPZ
TPZElastoPlasticMem.cpp
Go to the documentation of this file.
1 //$Id: pzelastoplasticmem.cpp,v 1.6 2009-06-22 00:55:14 erick Exp $
2 
3 #include "TPZElastoPlasticMem.h"
5 
6 
7 TPZElastoPlasticMem::TPZElastoPlasticMem(): m_sigma(), m_elastoplastic_state(), m_plastic_steps(0),m_phi(0.), m_u(3,0.)
8 {
9 }
10 
13 
14 }
15 
16 
18 
19 }
20 
21 void TPZElastoPlasticMem::Write(TPZStream &buf, int withclassid) const
22 {
23  m_sigma.Write(buf, withclassid);
24  m_elastoplastic_state.Write(buf, withclassid);
25  buf.Write(&m_plastic_steps);
26  buf.Write(m_u);
27  m_ER.Write(buf, withclassid);
28 }
29 
30 void TPZElastoPlasticMem::Read(TPZStream &buf, void *context)
31 {
32  m_sigma.Read(buf, context);
33  m_elastoplastic_state.Read(buf, context);
34  buf.Read(&m_plastic_steps);
35  buf.Read(m_u);
36  m_ER.Read(buf, context);
37 }
38 
39 void TPZElastoPlasticMem::Print(std::ostream &out)const
40 {
41  out << Name();
42  out << "\nm_sigma = " << m_sigma;
43  out << "\nm_elastoplastic_state = " << m_elastoplastic_state;
44  out << "\nm_plastic_steps = " << m_plastic_steps;
45  out << "\nm_u = " << m_u;
46  out << "\nm_phi = " << m_phi;
47  m_ER.Print(out);
48 }
49 
50 const std::string TPZElastoPlasticMem::Name()const
51 {
52  return "TPZElastoPlasticMem";
53 }
54 
56  return Hash("TPZElastoPlasticMem");
57 }
58 
60 {
61 
63  if(&other == this){
64  return *this;
65  }
66 
67  m_sigma = other.m_sigma;
70  m_phi = other.m_phi;
71  m_u = other.m_u;
72  m_ER = other.m_ER;
73 
74  return *this;
75 }
76 
79 
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void Print(std::ostream &out) const
void Read(TPZStream &buf, void *context) override
void Write(TPZStream &buf, int withclassid) const override
Method to write to a pzstream.
Definition: TPZTensor.h:688
TPZTensor< REAL > m_sigma
Stress state.
void Read(TPZStream &buf, void *context) override
Method to read the object from a pzstream.
Definition: TPZTensor.h:683
const TPZElastoPlasticMem & operator=(const TPZElastoPlasticMem &other)
int m_plastic_steps
Number of plastic steps.
const std::string Name() const
virtual void Write(const bool val)
Definition: TPZStream.cpp:8
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void Read(TPZStream &buf, void *context) override
read objects from the stream
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
REAL m_phi
Yield function value.
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
void Read(TPZStream &buf, void *context) override
read objects from the stream
TPZManVector< REAL, 3 > m_u
Displacement field.
virtual void Print(std::ostream &out=std::cout) const
TPZElasticResponse m_ER
Elastoplastic response (It is required when elasti response depends on spatial variables) ...
TPZPlasticState< REAL > m_elastoplastic_state
Elastoplastic strain state.
int ClassId() const override
Define the class id associated with the class.
Implements an interface to register a class id and a restore function. Persistence.
Definition: TPZSavable.h:150
void Write(TPZStream &buf, int withclassid) const override
virtual void Read(bool &val)
Definition: TPZStream.cpp:91