NeoPZ
TPZMatElastoPlasticTranslator.h
Go to the documentation of this file.
1 /*
2  * File: TPZMatElastoPlasticTranslator.h
3  * Author: thiago
4  *
5  * Created on 12 de Março de 2018, 18:35
6  */
7 
8 #ifndef TPZMATELASTOPLASTICTRANSLATOR_H
9 #define TPZMATELASTOPLASTICTRANSLATOR_H
10 
13 
14 template <class TTranslator, class TMEMTranslator = TPZElastoPlasticMemTranslator>
16 public:
19 
20  virtual void UpdateStream(TPZChunkInTranslation& chunk, const std::map<std::string, uint64_t>& toVersion) override;
21 
22  virtual void UpdateAttributes(TPZChunkInTranslation& chunk, const std::map<std::string, uint64_t>& toVersion) override;
23 
25 private:
26  TTranslator tTranslator;
28 };
29 
30 
31 template <class TTranslator, class TMEMTranslator>
33 }
34 
35 template <class TTranslator, class TMEMTranslator>
37 }
38 
39 template <class TTranslator, class TMEMTranslator>
40 void TPZMatElastoPlasticTranslator<TTranslator, TMEMTranslator>::UpdateAttributes(TPZChunkInTranslation& chunk, const std::map<std::string, uint64_t>& toVersion){
41  parentTranslator.UpdateStream(chunk, toVersion);
42  TPZManVector<REAL, 3> fForce(3);
43  chunk.mOldStream.Read(&fForce[0], 3);
44  chunk.mNewStream.Write(&fForce[0], 3);
45  TPZManVector<REAL,3> fPostProcessDirection(3);
46  chunk.mOldStream.Read(&fPostProcessDirection[0], 3);
47  chunk.mNewStream.Write(&fPostProcessDirection[0], 3);
48  tTranslator.UpdateStream(chunk, toVersion);
49  REAL fTol;
50  chunk.mOldStream.Read(&fTol);
51  chunk.mNewStream.Write(&fTol);
52 }
53 
54 
55 template <class TTranslator, class TMEMTranslator>
57 }
58 
59 template <class TTranslator, class TMEMTranslator>
60 void TPZMatElastoPlasticTranslator<TTranslator, TMEMTranslator>::UpdateStream(TPZChunkInTranslation& chunk, const std::map<std::string, uint64_t>& toVersion) {
61  this->UpdateAttributes(chunk, toVersion);
62 }
63 
64 
65 #endif /* TPZMATELASTOPLASTICTRANSLATOR_H */
66 
virtual void Read(int *p, int howMany=1)
virtual void UpdateStream(TPZChunkInTranslation &chunk, const std::map< std::string, uint64_t > &toVersion)
virtual void Write(const int *p, int howMany=1)
TPZContBufferedStream mOldStream
TPZMatWithMemTranslator< TMEMTranslator > parentTranslator
virtual void UpdateAttributes(TPZChunkInTranslation &chunk, const std::map< std::string, uint64_t > &toVersion) override
virtual void UpdateStream(TPZChunkInTranslation &chunk, const std::map< std::string, uint64_t > &toVersion) override
TPZContBufferedStream mNewStream