NeoPZ
pzplaca.h
Go to the documentation of this file.
1 
6 #ifndef PLACAHPP
7 #define PLACAHPP
8 
9 #include "TPZMaterial.h"
10 #include "pzfmatrix.h"
11 #include "pzvec.h"
12 
13 class TPZBndCond;
14 template<class T>
15 class TPZVec;
16 
21 class TPZPlaca : public TPZMaterial{
22 
27  fBy0R,fB0yR, fB00R;
29  public :
30 
31  TPZPlaca(int num, STATE h, STATE f, STATE E1 , STATE E2 ,
32  STATE ni1 , STATE ni2 , STATE G12 , STATE G13 ,
33  STATE G23 , TPZFMatrix<STATE> &naxes, TPZVec<STATE> &xf);
34 
35  virtual int NStateVariables() const override { return 6; }
36 
37  int Dimension() const override { return 2; }
38 
39  void Print(std::ostream & out) override;
40 
41  virtual std::string Name() override { return "TPZPlaca"; }
42 
43  virtual void Contribute(TPZMaterialData &data,
44  REAL weight,
46  TPZFMatrix<STATE> &ef) override;
47 
48  virtual void ContributeBC(TPZMaterialData &data,
49  REAL weight,
52  TPZBndCond &bc) override;
53  virtual void Contribute(TPZMaterialData &data,
54  REAL weight,
55  TPZFMatrix<STATE> &ef) override
56  {
57  TPZMaterial::Contribute(data,weight,ef);
58  }
59 
60  virtual void ContributeBC(TPZMaterialData &data,
61  REAL weight,
63  TPZBndCond &bc) override
64  {
65  TPZMaterial::ContributeBC(data,weight,ef,bc);
66  }
67 
68  virtual int NFluxes() override;
69 
70  virtual void Flux(TPZVec<REAL> &x, TPZVec<STATE> &u, TPZFMatrix<STATE> &dudx, TPZFMatrix<REAL> &axes, TPZVec<STATE> &fl) override;
71 
73  TPZVec<STATE> &u_exact,TPZFMatrix<STATE> &du_exact,TPZVec<REAL> &values) override;
74 
75  virtual int VariableIndex(const std::string &name) override;
76 
77  virtual int NSolutionVariables(int var) override;
78 
79 protected:
80  virtual void Solution(TPZVec<STATE> &Sol,TPZFMatrix<STATE> &DSol,TPZFMatrix<REAL> &axes,int var,TPZVec<STATE> &Solout) override;
81 public:
82  virtual void Solution(TPZMaterialData &data,int var,TPZVec<STATE> &Solout) override
83  {
84  int numbersol = data.sol.size();
85  if (numbersol != 1) {
86  DebugStop();
87  }
88  Solution(data.sol[0],data.dsol[0],data.axes,var,Solout);
89  }
90 
93  {
94  fExactFunction = fp;
95  }
96 
97 protected:
98 
100  public:
101 virtual int ClassId() const override;
102 
103 };
104 
105 #endif
STATE fmi
Definition: pzplaca.h:24
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...
Definition: pzplaca.cpp:210
TPZFMatrix< STATE > fBy0R
Definition: pzplaca.h:26
STATE fE1
Definition: pzplaca.h:24
virtual int NFluxes() override
Returns the number of components which form the flux function.
Definition: pzplaca.cpp:271
clarg::argBool bc("-bc", "binary checkpoints", false)
STATE fG12
Definition: pzplaca.h:24
TPZFMatrix< STATE > fKyyR
Definition: pzplaca.h:26
Templated vector implementation.
TPZFMatrix< STATE > fKxxR
Definition: pzplaca.h:26
TPZFMatrix< STATE > fB0xR
Definition: pzplaca.h:26
DESCRIBE PLEASE.
Definition: pzplaca.h:21
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
STATE fG23
Definition: pzplaca.h:24
clarg::argBool h("-h", "help message", false)
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
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...
TPZFMatrix< STATE > fKxyR
Definition: pzplaca.h:26
STATE fni1
Definition: pzplaca.h:24
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...
Definition: pzplaca.cpp:109
TPZPlaca(int num, STATE h, STATE f, STATE E1, STATE E2, STATE ni1, STATE ni2, STATE G12, STATE G13, STATE G23, TPZFMatrix< STATE > &naxes, TPZVec< STATE > &xf)
Definition: pzplaca.cpp:16
TPZFMatrix< STATE > fBx0R
Definition: pzplaca.h:26
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
STATE ff
Definition: pzplaca.h:24
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
f
Definition: test.py:287
int Dimension() const override
Returns the integrable dimension of the material.
Definition: pzplaca.h:37
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
STATE fni2
Definition: pzplaca.h:24
virtual int VariableIndex(const std::string &name) override
Definition: pzplaca.cpp:285
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
virtual void Errors(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values) override
Computes the error due to the difference between the interpolated flux and the flux computed based o...
Definition: pzplaca.cpp:450
TPZFMatrix< STATE > fB0yR
Definition: pzplaca.h:26
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
Definition: pzplaca.cpp:326
virtual int NSolutionVariables(int var) override
Definition: pzplaca.cpp:308
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
TPZVec< STATE > fXF
Definition: pzplaca.h:28
STATE fG13
Definition: pzplaca.h:24
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
Definition: pzplaca.h:35
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...
TPZFMatrix< STATE > fRmatT
Definition: pzplaca.h:25
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &fl) override
Computes the value of the flux function to be used by ZZ error estimator.
Definition: pzplaca.cpp:273
TPZFMatrix< STATE > fnaxes
Definition: pzplaca.h:23
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
It computes a contribution to the residual vector at one integration point.
Definition: pzplaca.h:53
void Print(std::ostream &out) override
Prints out the data associated with the material.
Definition: pzplaca.cpp:277
virtual int ClassId() const override
Define the class id associated with the class.
Definition: pzplaca.cpp:482
TPZFMatrix< STATE > fKyxR
Definition: pzplaca.h:26
void(* fExactFunction)(TPZFMatrix< REAL > &axes, TPZVec< REAL > &x, TPZFMatrix< STATE > &uexact, TPZFMatrix< STATE > &duexact)
Definition: pzplaca.h:99
TPZFMatrix< STATE > fB00R
Definition: pzplaca.h:26
STATE fh
Definition: pzplaca.h:24
void SetExactFunction(void(*fp)(TPZFMatrix< REAL > &axes, TPZVec< REAL > &x, TPZFMatrix< STATE > &uexact, TPZFMatrix< STATE > &duexact))
Exact solution for tests.
Definition: pzplaca.h:92
def values
Definition: rdt.py:119
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: pzplaca.h:82
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: pzplaca.h:60
TPZSolVec sol
vector of the solutions at the integration point
virtual std::string Name() override
Returns the name of the material.
Definition: pzplaca.h:41
STATE fE2
Definition: pzplaca.h:24
TPZFMatrix< STATE > fRmat
Definition: pzplaca.h:25