NeoPZ
TPZFVHybrid.h
Go to the documentation of this file.
1 
5 #ifndef HIBRIDAH
6 #define HIBRIDAH
7 
8 
9 #include "TPZMaterial.h"
10 #include "pzfmatrix.h"
11 
16 class TPZMatHybrid : public TPZMaterial {
17 
18  int fNumMat;
21  public :
22 
23  TPZMatHybrid(int nummat);
24 
25  virtual ~TPZMatHybrid();
26 
28  fXf = xkin;
29  }
30 
31  virtual int NStateVariables() const override;
32 
33  virtual void Print(std::ostream & out) override;
34 
35  virtual std::string Name() override { return "TPZMatHybrid"; }
36 
37  virtual void Contribute(TPZMaterialData &data,
38  REAL weight,
39  TPZFMatrix<STATE> & ek,
40  TPZFMatrix<STATE> & ef) override;
41 
42  virtual void ContributeBC(TPZMaterialData &data,
43  REAL weight,
44  TPZFMatrix<STATE> & ek,
45  TPZFMatrix<STATE> & ef,
46  TPZBndCond & bc) override;
47  virtual void Contribute(TPZMaterialData &data,
48  REAL weight,
49  TPZFMatrix<STATE> & ef) override
50  {
51  TPZMaterial::Contribute(data,weight,ef);
52  }
53 
54  virtual void ContributeBC(TPZMaterialData &data,
55  REAL weight,
56  TPZFMatrix<STATE> & ef,
57  TPZBndCond & bc) override
58  {
59  TPZMaterial::ContributeBC(data,weight,ef,bc);
60  }
61 
62  virtual int VariableIndex(const std::string &name) override;
63 
64  virtual int NSolutionVariables(int var) override;
65 
66  virtual int NFluxes() override { return 3;}
67 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 
80  virtual void Flux(TPZVec<REAL> &x, TPZVec<STATE> &Sol, TPZFMatrix<STATE> &DSol, TPZFMatrix<REAL> &axes, TPZVec<STATE> &flux) override;
81 
83  TPZVec<STATE> &u_exact,TPZFMatrix<STATE> &du_exact,TPZVec<REAL> &values) override;
84 };
85 
86 #endif
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: TPZFVHybrid.h:70
virtual int NFluxes() override
Returns the number of components which form the flux function.
Definition: TPZFVHybrid.h:66
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
It computes a contribution to the residual vector at one integration point.
Definition: TPZFVHybrid.h:47
virtual std::string Name() override
Returns the name of the material.
Definition: TPZFVHybrid.h:35
clarg::argBool bc("-bc", "binary checkpoints", false)
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...
DESCRIBE PLEASE.
Definition: TPZFVHybrid.h:16
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux) override
Computes the value of the flux function to be used by ZZ error estimator.
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
Definition: TPZFVHybrid.cpp:27
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 NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
Definition: TPZFVHybrid.cpp:23
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
void SetMaterial(TPZFMatrix< STATE > &xkin)
Definition: TPZFVHybrid.h:27
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
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: TPZFVHybrid.cpp:33
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 int VariableIndex(const std::string &name) override
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: TPZFVHybrid.h:54
TPZFMatrix< STATE > fXf
Definition: TPZFVHybrid.h:19
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
def values
Definition: rdt.py:119
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...
TPZSolVec sol
vector of the solutions at the integration point
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: TPZFVHybrid.cpp:82
virtual ~TPZMatHybrid()
Definition: TPZFVHybrid.cpp:20
TPZMatHybrid(int nummat)
Definition: TPZFVHybrid.cpp:15