NeoPZ
|
Implements an abstract class implementing the memory features. More...
#include <TPZMatWithMem.h>
Public Member Functions | |
TPZMatWithMem () | |
Default constructor. More... | |
TPZMatWithMem (int id) | |
Creates a material object and inserts it in the vector of material pointers of the mesh. More... | |
TPZMatWithMem (const TPZMatWithMem< TMEM, TFather > &mat) | |
Creates a material object based on the referred object and inserts it in the vector of material pointers of the mesh. More... | |
virtual | ~TPZMatWithMem () |
virtual std::string | Name () override |
Returns the name of the material. More... | |
virtual void | PrintMem (std::ostream &out=std::cout, const int memory=0) |
Prints out the data associated with the material. More... | |
virtual void | Print (std::ostream &out) override |
Prints out the data associated with the material. More... | |
virtual TMEM & | MemItem (const int i) const |
int | ClassId () const override |
Unique identifier for serialization purposes. More... | |
void | Write (TPZStream &buf, int withclassid) const override |
void | Read (TPZStream &buf, void *context) override |
std::shared_ptr< TPZAdmChunkVector< TMEM > > & | GetMemory () |
void | SetMemory (std::shared_ptr< TPZAdmChunkVector< TMEM >> &memory) |
virtual int | PushMemItem (int sourceIndex=-1) override |
Pushes a new entry in the context of materials with memory. More... | |
virtual void | FreeMemItem (int index) override |
Frees an entry in the material with memory internal history storage. More... | |
void | ResetMemItem (int index) |
void | ResetMemory () |
Reset all memory items. More... | |
virtual void | SetDefaultMem (TMEM &defaultMem) |
Sets the default memory settings for initialization. More... | |
virtual TMEM & | GetDefaultMemory () |
Access the default memory settings for initislization. More... | |
virtual void | SetUpdateMem (bool update=1) |
Sets/Unsets the internal memory data to be updated in the next assemble/contribute call. More... | |
virtual bool | GetUpdateMem () |
Gets the internal memory data to be updated in the next assemble/contribute call. More... | |
Protected Attributes | |
std::shared_ptr< TPZAdmChunkVector< TMEM > > | fMemory |
Shared pointer to material memory. More... | |
TMEM | fDefaultMem |
Default memory settings. More... | |
bool | fUpdateMem |
Flag to indicate whether the memory data are to be updated in an assemble loop. More... | |
Implements an abstract class implementing the memory features.
Materials that aim to use memory shoud be derived from this class.
Definition at line 23 of file TPZMatWithMem.h.
TPZMatWithMem< TMEM, TFather >::TPZMatWithMem | ( | ) |
Default constructor.
Definition at line 119 of file TPZMatWithMem.h.
TPZMatWithMem< TMEM, TFather >::TPZMatWithMem | ( | int | id | ) |
Creates a material object and inserts it in the vector of material pointers of the mesh.
Upon return vectorindex contains the index of the material object within the vector
Definition at line 126 of file TPZMatWithMem.h.
TPZMatWithMem< TMEM, TFather >::TPZMatWithMem | ( | const TPZMatWithMem< TMEM, TFather > & | mat | ) |
Creates a material object based on the referred object and inserts it in the vector of material pointers of the mesh.
Upon return vectorindex contains the index of the material object within the vector
Definition at line 133 of file TPZMatWithMem.h.
|
virtual |
Definition at line 141 of file TPZMatWithMem.h.
|
override |
Unique identifier for serialization purposes.
Definition at line 177 of file TPZMatWithMem.h.
Referenced by TPZMatElastoPlastic< T, TMEM >::ClassId(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name().
|
overridevirtual |
Frees an entry in the material with memory internal history storage.
Definition at line 227 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name().
|
inlinevirtual |
Access the default memory settings for initislization.
Definition at line 95 of file TPZMatWithMem.h.
std::shared_ptr< TPZAdmChunkVector< TMEM > > & TPZMatWithMem< TMEM, TFather >::GetMemory | ( | ) |
Definition at line 206 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name().
|
virtual |
Gets the internal memory data to be updated in the next assemble/contribute call.
Definition at line 242 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::GetDefaultMemory().
|
virtual |
Definition at line 172 of file TPZMatWithMem.h.
Referenced by TPZMatElastoPlastic2D< T, TMEM >::Contribute(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Print(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::PrintMem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::PushMemItem(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::ResetMemItem().
|
inlineoverridevirtual |
Returns the name of the material.
Reimplemented in TPZMatElastoPlastic< T, TMEM >, TPZMatPorous< T, TMEM >, and TPZMatElastoPlastic2D< T, TMEM >.
Definition at line 43 of file TPZMatWithMem.h.
|
overridevirtual |
Prints out the data associated with the material.
Reimplemented in TPZMatElastoPlastic< T, TMEM >, and TPZMatElastoPlastic2D< T, TMEM >.
Definition at line 145 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name(), and TPZMatElastoPlastic< T, TMEM >::Print().
|
virtual |
Prints out the data associated with the material.
Definition at line 161 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name(), and TPZMatElastoPlastic< T, TMEM >::Print().
|
overridevirtual |
Pushes a new entry in the context of materials with memory.
Definition at line 216 of file TPZMatWithMem.h.
Referenced by InsertViscoElasticity(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name().
|
override |
Definition at line 191 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name(), and TPZMatElastoPlastic< T, TMEM >::Read().
|
inline |
@ Reset the memory index to its default value
Definition at line 79 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::PushMemItem(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::ResetMemory().
|
inline |
Reset all memory items.
Definition at line 84 of file TPZMatWithMem.h.
|
virtual |
Sets the default memory settings for initialization.
Definition at line 232 of file TPZMatWithMem.h.
Referenced by InsertViscoElasticity(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::ResetMemory().
void TPZMatWithMem< TMEM, TFather >::SetMemory | ( | std::shared_ptr< TPZAdmChunkVector< TMEM >> & | memory | ) |
Definition at line 211 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name().
|
virtual |
Sets/Unsets the internal memory data to be updated in the next assemble/contribute call.
Definition at line 237 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::GetDefaultMemory(), main(), PYBIND11_MODULE(), and TPZElastoPlasticAnalysis::SetUpdateMem().
|
override |
Definition at line 182 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Name(), and TPZMatElastoPlastic< T, TMEM >::Write().
|
protected |
Default memory settings.
Definition at line 112 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::GetDefaultMemory(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Print(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Read(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::ResetMemItem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::SetDefaultMem(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Write().
|
protected |
Shared pointer to material memory.
Definition at line 109 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::FreeMemItem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::GetMemory(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::MemItem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Print(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::PrintMem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::PushMemItem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Read(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::ResetMemory(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::SetMemory(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::TPZMatWithMem(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Write().
|
protected |
Flag to indicate whether the memory data are to be updated in an assemble loop.
Definition at line 115 of file TPZMatWithMem.h.
Referenced by TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::GetUpdateMem(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Print(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Read(), TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::SetUpdateMem(), and TPZMatWithMem< TPZFMatrix< REAL >, TPZElasticity3D >::Write().