NeoPZ
TPZElasticCriterion.h
Go to the documentation of this file.
1 /*
2  * TPZElasticCriterion
3  *
4  * Created by Nathan Shauer on 5/4/14.
5  * Copyright 2014 __LabMeC__. All rights reserved.
6  *
7  */
8 
9 #ifndef TPZElasticResponse_h
10 #define TPZElasticResponse_h
11 
12 #include "TPZPlasticState.h"
13 #include "TPZPlasticStep.h"
14 #include "TPZElasticResponse.h"
15 
17 {
18 
19 public:
20 
21  enum {NYield=3};
22 
24 
27 
30 
31 public:
32 
38  virtual int ClassId() const override;
39 
44 
49 
54 
55 
62  void Read(TPZStream& buf, void* context) override;
63 
64 
71  void Write(TPZStream& buf, int withclassid) const override;
72 
81  virtual int IntegrationSteps()const override;
82 
83 
89  virtual const char * Name() const override
90  {
91  return "TPZElasticCriterion";
92  }
93 
94 
100  virtual void Print(std::ostream & out) const override
101  {
102  out << "Classe: " << this->Name();
103  fN.Print(out);
104  }
105 
111  virtual void ApplyStrain(const TPZTensor<REAL> &epsTotal) override;
112 
120  virtual void ApplyStrainComputeSigma(const TPZTensor<REAL> &epsTotal, TPZTensor<REAL> &sigma, TPZFMatrix<REAL> * De = NULL) override;
121 
122 
130  virtual void ApplyStrainComputeDep(const TPZTensor<REAL> &epsTotal, TPZTensor<REAL> &sigma, TPZFMatrix<REAL> &De) override {
131  std::cerr << "Deprecated gradient calculation is incorporated on ApplyStrainComputeSigma method." << std::endl;
132  DebugStop();
133  }
134 
141  virtual void ApplyLoad(const TPZTensor<REAL> & sigma, TPZTensor<REAL> &epsTotal) override;
142 
143 
149  virtual void SetState(const TPZPlasticState<REAL> &state) override;
150 
156  virtual TPZPlasticState<REAL> GetState() const override;
157 
158 
165  virtual void Phi(const TPZTensor<REAL> &epsTotal, TPZVec<REAL> &phi) const override;
166 
167 
173  virtual void SetElasticResponse(TPZElasticResponse &ER) override
174  {
175  fER = ER;
176  }
177 
178 
184  virtual TPZElasticResponse GetElasticResponse() const override
185  {
186  return fER;
187  }
188 
189 
196  return *this;
197  }
198 
199 
207  void YieldFunction(const TPZVec<STATE>& sigma, STATE hardening, TPZVec<STATE>& yield) const override{
208  TPZTensor<STATE> sigmaTensor;
209  sigmaTensor.XX() = sigma[0];
210  sigmaTensor.YY() = sigma[1];
211  sigmaTensor.ZZ() = sigma[2];
212  Phi(sigmaTensor, yield);
213  }
214 
220  virtual int GetNYield() const override {
221  return as_integer(NYield);
222  }
223 
224 
225 };
226 
227 
228 #endif /* TPZElasticCriterion_h */
TPZElasticCriterion & operator=(const TPZElasticCriterion &cp)
virtual int IntegrationSteps() const override
Return.
virtual void ApplyStrainComputeDep(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &De) override
virtual int GetNYield() const override
virtual void Phi(const TPZTensor< REAL > &epsTotal, TPZVec< REAL > &phi) const override
void Print(std::ostream &Out, int fadDerivatives=1) const
More complete then Operator << because it allows derivatives supression.
virtual void ApplyLoad(const TPZTensor< REAL > &sigma, TPZTensor< REAL > &epsTotal) override
void Write(TPZStream &buf, int withclassid) const override
virtual int ClassId() const override
TPZPlasticState< STATE > fN
Plastic state.
std::underlying_type< Enumeration >::type as_integer(const Enumeration value)
Definition: pzreal.h:37
T & YY() const
Definition: TPZTensor.h:578
TPZElasticResponse fER
Elastic response.
virtual const char * Name() const override
TPZElasticCriterion fNYields
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
virtual TPZPlasticState< REAL > GetState() const override
virtual TPZElasticResponse GetElasticResponse() const override
virtual void ApplyStrain(const TPZTensor< REAL > &epsTotal) override
virtual void Print(std::ostream &out) const override
virtual void ApplyStrainComputeSigma(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > *De=NULL) override
TPZPlasticCriterion & GetYC() override
T & XX() const
Definition: TPZTensor.h:566
void Read(TPZStream &buf, void *context) override
T & ZZ() const
Definition: TPZTensor.h:586
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
virtual void SetElasticResponse(TPZElasticResponse &ER) override
virtual void SetState(const TPZPlasticState< REAL > &state) override
void YieldFunction(const TPZVec< STATE > &sigma, STATE hardening, TPZVec< STATE > &yield) const override