NeoPZ
TPZPorousElasticCriterion.h
Go to the documentation of this file.
1 //
2 // TPZPorousElasticCriterion.h
3 // pz
4 //
5 // Created by Omar DurĂ¡n on 1/16/19.
6 //
7 
8 #ifndef TPZPorousElasticCriterion_h
9 #define TPZPorousElasticCriterion_h
10 
11 #include "TPZPlasticState.h"
12 #include "TPZPlasticStep.h"
13 #include "TPZElasticResponse.h"
15 
17 {
18 
19 public:
20  enum {NYield=3};
21 
22 public:
23 
25 
27 
29 
31 
32 public:
33 
35 
37 
39 
40  void Read(TPZStream& buf, void* context) override;
41 
42  void Write(TPZStream& buf, int withclassid) const override;
43 
44  virtual int IntegrationSteps()const override;
45 
46  virtual const char * Name() const override
47  {
48  return "TPZPorousElasticCriterion";
49  }
50 
51  virtual void Print(std::ostream & out) const override
52  {
53  out << "Classe: " << this->Name();
54  fN.Print(out);
55  }
56 
57  virtual void ApplyStrain(const TPZTensor<REAL> &epsTotal) override;
58 
59  virtual void ApplyStrainComputeSigma(const TPZTensor<REAL> &eps, TPZTensor<REAL> &sigma, TPZFMatrix<REAL> * tangent = NULL) override;
60 
61  virtual void ApplyStrainComputeDep(const TPZTensor<REAL> &eps, TPZTensor<REAL> &sigma, TPZFMatrix<REAL> &Dep) override {
62  std::cerr << "Deprecated gradient calculation is incorporated on ApplyStrainComputeSigma method." << std::endl;
63  DebugStop();
64  }
65 
66  virtual void ApplyLoad(const TPZTensor<REAL> & sigma, TPZTensor<REAL> &eps) override;
67 
68  virtual TPZPlasticState<REAL> GetState() const override;
69 
70  virtual void Phi(const TPZTensor<REAL> &eps, TPZVec<REAL> &phi) const override;
71 
72  virtual void SetElasticResponse(TPZElasticResponse &ER) override
73  {
74  fER = ER;
75  }
76 
77  virtual TPZElasticResponse GetElasticResponse() const override
78  {
79  return fER;
80  }
81 
83  {
84  fPER = PER;
85  }
86 
88  {
89  return fPER;
90  }
91 
92  virtual void SetState(const TPZPlasticState<REAL> &state) override;
93 
94 
95  virtual int ClassId() const override;
96 
98  return *this;
99  }
100 
101  void YieldFunction(const TPZVec<STATE>& sigma, STATE kprev, TPZVec<STATE>& yield) const override{
102  TPZTensor<STATE> sigmaTensor;
103  sigmaTensor.XX() = sigma[0];
104  sigmaTensor.YY() = sigma[1];
105  sigmaTensor.ZZ() = sigma[2];
106  Phi(sigmaTensor, yield);
107  }
108 
109  virtual int GetNYield() const override {
110  return as_integer(NYield);
111  }
112 
113 
114 };
115 
116 
117 #endif /* TPZPorousElasticCriterion_h */
void Print(std::ostream &Out, int fadDerivatives=1) const
More complete then Operator << because it allows derivatives supression.
virtual void SetState(const TPZPlasticState< REAL > &state) override
std::underlying_type< Enumeration >::type as_integer(const Enumeration value)
Definition: pzreal.h:37
T & YY() const
Definition: TPZTensor.h:578
virtual int ClassId() const override
Define the class id associated with the class.
virtual void ApplyStrain(const TPZTensor< REAL > &epsTotal) override
virtual const char * Name() const override
virtual void ApplyStrainComputeSigma(const TPZTensor< REAL > &eps, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > *tangent=NULL) override
virtual void SetPorousElasticResponse(TPZPorousElasticResponse &PER)
virtual void SetElasticResponse(TPZElasticResponse &ER) override
virtual TPZElasticResponse GetElasticResponse() const override
TPZPorousElasticCriterion & operator=(const TPZPorousElasticCriterion &cp)
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
virtual void ApplyStrainComputeDep(const TPZTensor< REAL > &eps, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &Dep) override
virtual void ApplyLoad(const TPZTensor< REAL > &sigma, TPZTensor< REAL > &eps) override
virtual int IntegrationSteps() const override
virtual TPZPlasticState< REAL > GetState() const override
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
virtual TPZPorousElasticResponse GetPorousElasticResponse() const
virtual int GetNYield() const override
void YieldFunction(const TPZVec< STATE > &sigma, STATE kprev, TPZVec< STATE > &yield) const override
virtual void Phi(const TPZTensor< REAL > &eps, TPZVec< REAL > &phi) const override
T & XX() const
Definition: TPZTensor.h:566
T & ZZ() const
Definition: TPZTensor.h:586
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) const override
TPZPlasticCriterion & GetYC() override
TPZPorousElasticResponse fPER
TPZPorousElasticCriterion fNYields