NeoPZ
pzporoelastoplasticmem.cpp
Go to the documentation of this file.
1 //$Id: pzporoelastoplasticmem.cpp,v 1.3 2009-10-06 01:00:06 erick Exp $
2 
4 
5 
7  fPorePressure(0), fdPorePressure(3,0.) { }
8 
12 {
13 }
14 
15 
17 
18 void TPZPoroElastoPlasticMem::Write(TPZStream &buf, int withclassid) const
19 {
20  TPZElastoPlasticMem::Write(buf,withclassid);
21 
22  buf.Write(&fPorePressure,1);
23  buf.Write(&fdPorePressure[0],3);
24  buf.Write(&fv[0],3);
25 }
26 
27 void TPZPoroElastoPlasticMem::Read(TPZStream &buf, void *context)
28 {
29  TPZElastoPlasticMem::Read(buf,context);
30  buf.Read(&fPorePressure,1);
32  buf.Read(&fdPorePressure[0],3);
33  fv.Resize(3);
34  buf.Read(&fv[0],3);
35 }
36 
37 void TPZPoroElastoPlasticMem::Print(std::ostream &out)const
38 {
39  out << Name();
40  out << "\n fPorePressure = " << fPorePressure;
41  out << "\n fdPorePressure = " << fdPorePressure;
42  out << "\n fv = " << fv;
43  out << "\n Parent Class Data:";
45 }
46 
47 const std::string TPZPoroElastoPlasticMem::Name()const
48 {
49  return "TPZPoroElastoPlasticMem";
50 }
51 
53  return Hash("TPZPoroElastoPlasticMem") ^ TPZElastoPlasticMem::ClassId() << 1;
54 }
55 
57 {
61 
62  return *this;
63 }
const std::string Name() const
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
const TPZElastoPlasticMem & operator=(const TPZElastoPlasticMem &other)
int ClassId() const override
Define the class id associated with the class.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Definition: pzvec.h:373
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.
const TPZPoroElastoPlasticMem & operator=(const TPZPoroElastoPlasticMem &source)
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
virtual void Print(std::ostream &out=std::cout) const override
void Read(TPZStream &buf, void *context) override
read objects from the stream
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
virtual void Print(std::ostream &out=std::cout) const
int ClassId() const override
Define the class id associated with the class.
virtual void Read(bool &val)
Definition: TPZStream.cpp:91