NeoPZ
pzpostprocmat.h
Go to the documentation of this file.
1 
5 #ifndef PZPOSTPROCMAT_H
6 #define PZPOSTPROCMAT_H
7 
8 #include "TPZMaterial.h"
9 #include "pzdiscgal.h"
10 #include "tpzautopointer.h"
11 #include "pzvec.h"
12 
13 #include <string>
14 
19 class TPZPostProcVar : public TPZSavable
20 {
21 public:
22 
23  TPZPostProcVar():fIndex(-1), fName(""), fNumEq(-1) {}
24 
26  {
27  this->operator=(source);
28  }
29 
31  {
32  fIndex = source.fIndex;
33  fName = source.fName;
34  fNumEq = source.fNumEq;
35  return *this;
36  }
37 
38  ~TPZPostProcVar(){} int ClassId() const override;
39  void Read(TPZStream &buf, void *context) override;
40  void Write(TPZStream &buf, int withclassid) const override;
41 
42 public: //members
43 
44  int64_t fIndex;
45 
46  std::string fName;
47 
48  int64_t fNumEq;
49 };
50 
52 {
53  public:
54 
56  TPZPostProcMat();
57 
64  TPZPostProcMat(int64_t id);
65 
70  TPZPostProcMat(const TPZPostProcMat &mat);
71 
72  virtual ~TPZPostProcMat();
73 
75  virtual std::string Name() override;
76 
78  virtual int Dimension() const override;
79 
81  virtual int NStateVariables() const override;
82 
84  virtual void Print(std::ostream &out = std::cout) override;
85 
87  virtual int VariableIndex(const std::string &name) override;
88 
93  virtual int NSolutionVariables(int var) override;
94 
99  virtual void Solution(TPZMaterialData &data, int var, TPZVec<STATE> &Solout) override;
100 
108  virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef) override;
109 
116  virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix<STATE> &ef) override;
117 
118 
128  virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef, TPZBndCond &bc) override;
129 
139  virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
140  REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef) override;
141 
151  virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft,
152  REAL weight, TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
153 
155  public:
156  virtual int ClassId() const override;
157 
158 
160  virtual void Write(TPZStream &buf, int withclassid) const override;
161 
163  virtual void Read(TPZStream &buf, void *context) override;
164 
169  virtual void FillDataRequirements(TPZMaterialData &data) override;
170 
175  void GetPostProcessVarIndexList(TPZVec<int> & varIndexList);
176 
180  void GetPostProcVarName(int64_t index, std::string &varname)
181  {
182  varname = fVars[index].fName;
183 
184  }
185 
191  void SetPostProcessVarIndexList(TPZVec<std::string> & varIndexNames, TPZMaterial * pRefMat);
192 
193 protected:
194 
197 };
198 
199 #endif
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
Definition: pzdiscgal.h:20
int ClassId() const override
Define the class id associated with the class.
TPZManVector< TPZPostProcVar, 20 > fVars
clarg::argBool bc("-bc", "binary checkpoints", false)
Templated vector implementation.
void Read(TPZStream &buf, void *context) override
read objects from the stream
TPZPostProcVar()
Definition: pzpostprocmat.h:23
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
~TPZPostProcVar()
Definition: pzpostprocmat.h:38
void GetPostProcVarName(int64_t index, std::string &varname)
Return the name of the ith postproc variable.
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
Implements an elastoplastic material and uses the memory feature to store the damage variables This m...
Definition: pzpostprocmat.h:19
TPZPostProcVar & operator=(const TPZPostProcVar &source)
Definition: pzpostprocmat.h:30
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
std::string fName
Definition: pzpostprocmat.h:46
int64_t fNumEq
Definition: pzpostprocmat.h:48
TPZPostProcVar(const TPZPostProcVar &source)
Definition: pzpostprocmat.h:25
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
int fDimension
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
int64_t fIndex
Definition: pzpostprocmat.h:44
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
Definition: pzpostprocmat.h:51
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.