19 return fMemory.get()->operator [](i);
30 int updatemem = fUpdateMem;
31 buf.
Write(&updatemem);
32 fDefaultMem.Write(buf, 0);
46 fDefaultMem.Read(buf, 0);
62 int index = fMemory->AllocateNewElement();
63 if (sourceIndex < 0) {
64 this->ResetMemItem(index);
66 this->MemItem(index) = this->MemItem(sourceIndex);
73 fMemory->SetFree(index);
78 fDefaultMem = defaultMem;
94 this->Contribute(data, weight, ek_fake, ef);
102 template <
class TMEM>
105 this->Contribute(datavec, weight, ek_fake, ef);
108 #define IMPLEMENTTPZBNDCONDWITHMEM(TMEM) \ 111 TPZRestoreClass< TPZBndCondWithMem<TMEM> >; int ClassId() const override
Unique identifier for serialization purposes.
virtual int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
This class implements a simple vector storage scheme for a templated class T. Utility.
Implements a chunk vector with free store administration. Utility.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Contribute methods.
virtual void SetUpdateMem(bool update=1)
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
virtual int PushMemItem(int sourceIndex=-1) override
Pushes a new entry in the context of materials with memory, returning its index at the internal stora...
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to the stiffness matrix and load vector at one integration point...
virtual void Write(const bool val)
std::shared_ptr< TPZAdmChunkVector< TMEM > > & GetMemory()
int64_t Rows() const
Returns number of rows.
static std::shared_ptr< TPZSavable > GetSharedPointer(const int64_t &objId)
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
void Print(std::ostream &out=std::cout) override
Prints out the data associated with the material.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
virtual void FreeMemItem(int index) override
Frees an entry in the material with memory internal history storage.
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
int32_t Hash(std::string str)
void SetMemory(std::shared_ptr< TPZAdmChunkVector< TMEM >> &memory)
virtual void SetDefaultMem(TMEM &defaultMem)
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
Defines the interface for saving and reading data. Persistency.
virtual TMEM & MemItem(const int i) const
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
virtual void Read(bool &val)