NeoPZ
tpzmultcamada.h
Go to the documentation of this file.
1 
6 class TPZMatPlaca2;
7 class TPZBndCond;
8 
9 #ifndef TPZMULTCAMADA_H
10 #define TPZMULTCAMADA_H
11 #include "TPZMaterial.h"
12 #include "pzstack.h"
13 
18 class TPZMultCamada : public TPZMaterial {
19 public:
21  TPZMultCamada(int matindex) :
23  TPZMaterial(matindex), fCamadas() {}
24 
26  void AddLayer(TPZMatPlaca2 * l) { fCamadas.Push(l); }
27 
34  virtual void Contribute(TPZMaterialData &data,
35  REAL weight,
36  TPZFMatrix<STATE> & ek,
37  TPZFMatrix<STATE> & ef) override;
38 
39  virtual void ContributeBC(TPZMaterialData &data,
40  REAL weight,
41  TPZFMatrix<STATE> & ek,
42  TPZFMatrix<STATE> & ef,
43  TPZBndCond & bc) override;
44 
45  virtual void Contribute(TPZMaterialData &data,
46  REAL weight,
47  TPZFMatrix<STATE> & ef) override
48  {
49  TPZMaterial::Contribute(data,weight,ef);
50  }
51 
52  virtual void ContributeBC(TPZMaterialData &data,
53  REAL weight,
54  TPZFMatrix<STATE> & ef,
55  TPZBndCond & bc) override
56  {
57  TPZMaterial::ContributeBC(data,weight,ef,bc);
58  }
59 
62  virtual int VariableIndex(const std::string &name) override;
63 
64  virtual int NSolutionVariables(int var) override;
65 
66 protected:
68  virtual void Solution(TPZVec < STATE > & Sol, TPZFMatrix<STATE> & DSol, TPZFMatrix<REAL> & axes, int var, TPZVec < STATE > & Solout) override;
69 public:
70  virtual void Solution(TPZMaterialData &data, int var, TPZVec < STATE > & Solout) override
71  {
72  int numbersol = data.sol.size();
73  if (numbersol != 1) {
74  DebugStop();
75  }
76 
77  Solution(data.sol[0],data.dsol[0],data.axes,var,Solout);
78  }
79 
81  virtual int NStateVariables() const override;
82 
84  virtual int Dimension() const override {return 2;}
85  public:
86 virtual int ClassId() const override;
87 
88 private:
91 
92 };
93 
94 #endif //TPZMULTCAMADA_H
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.
TPZStack< TPZMatPlaca2 *> fCamadas
Vector of layers.
Definition: tpzmultcamada.h:90
clarg::argBool bc("-bc", "binary checkpoints", false)
TPZMultCamada(int matindex)
Default constructor.
Definition: tpzmultcamada.h:21
DESCRIBE PLEASE.
Definition: pzmatplaca2.h:20
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Computes contribution to the stiffness matrix and right hand side at an integration point...
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)=0
It computes a contribution to the stiffness matrix and load vector at one integration point...
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
virtual int VariableIndex(const std::string &name) override
Returns the variable index associated with the name.
void Push(const T object)
Pushes a copy of the object on the stack.
Definition: pzstack.h:80
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
Definition: tpzmultcamada.h:52
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
DESCRIBE PLEASE.
Definition: tpzmultcamada.h:18
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.
Definition: tpzmultcamada.h:70
virtual int ClassId() const override
Define the class id associated with the class.
A simple stack.
void AddLayer(TPZMatPlaca2 *l)
Add layer.
Definition: tpzmultcamada.h:26
This class implements a stack object. Utility.
Definition: pzcheckmesh.h:14
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
virtual int Dimension() const override
Returns the integrable dimension of the material.
Definition: tpzmultcamada.h:84
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
It computes a contribution to the residual vector at one integration point.
Definition: tpzmultcamada.h:45
TPZSolVec sol
vector of the solutions at the integration point