NeoPZ
pznonlinbiharmonic.h
Go to the documentation of this file.
1 
6 #ifndef TPZNONLINBIHARMONICHPP
7 #define TPZNONLINBIHARMONICHPP
8 
9 #include <iostream>
10 #include "pzdiscgal.h"
11 #include "pzfmatrix.h"
12 
20 
21 private:
22  STATE fXf;
23 
24  public :
25 
27  gM_betta, g_teta, Re;
28  static int NorP;
29 
31  TPZNonLinBiharmonic(int nummat, STATE f);
32 
33  virtual ~TPZNonLinBiharmonic();
34 
36  virtual int NEvalErrors() override {return 8;}
37 
38  void SetMaterial(STATE &xfin){
39  fXf = xfin;
40  }
41 
42  virtual int Dimension() const override { return 2;}
43 
45  virtual int NStateVariables() const override {
46  return 1;
47  };
48 
49  virtual void Print(std::ostream & out) override;
50 
51  virtual std::string Name() override { return "TPZBiharmonic"; }
52 
59  virtual void Contribute(TPZMaterialData &data,
60  REAL weight,
62  TPZFMatrix<STATE> &ef) override;
64  virtual void Contribute(TPZMaterialData &data,
65  REAL weight,
66  TPZFMatrix<STATE> &ef) override
67  {
69  }
71  virtual void ContributeBC(TPZMaterialData &data,
72  REAL weight,
75  TPZBndCond &bc) override;
76 
78  virtual void ContributeBC(TPZMaterialData &data,
79  REAL weight,
81  TPZBndCond &bc) override
82  {
83  TPZDiscontinuousGalerkin::ContributeBC(data,weight,ef,bc);
84  }
85 
88  virtual int VariableIndex(const std::string &name) override;
89 
90  virtual int NSolutionVariables(int var) override;
91 
92  virtual int NFluxes() override { return 0;}
93 
94 protected:
95  virtual void Solution(TPZVec<STATE> &Sol,TPZFMatrix<STATE> &DSol,TPZFMatrix<REAL> &axes,int var,TPZVec<STATE> &Solout) override;
96 public:
97 
98  virtual void SolutionDisc(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, int var, TPZVec<STATE> &Solout)
99  {
100  TPZDiscontinuousGalerkin::SolutionDisc(data,dataleft,dataright,var,Solout);
101  }
102 
103  virtual void Flux(TPZVec<REAL> &x, TPZVec<STATE> &Sol, TPZFMatrix<STATE> &DSol, TPZFMatrix<REAL> &axes, TPZVec<STATE> &flux) override;
104 
105  void Errors(TPZVec<REAL> &x,TPZVec<STATE> &u,
107  TPZVec<STATE> &u_exact,TPZFMatrix<STATE> &du_exact,TPZVec<REAL> &values) override;
108 
114  virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
115  REAL weight,
116  TPZFMatrix<STATE> &ek,
117  TPZFMatrix<STATE> &ef) override;
118 
119 
120  virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft,
121  REAL weight,
122  TPZFMatrix<STATE> &ek,
123  TPZFMatrix<STATE> &ef,
124  TPZBndCond &bc) override;
125 
126  virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
127  REAL weight,
128  TPZFMatrix<STATE> &ef) override
129  {
130  TPZDiscontinuousGalerkin::ContributeInterface(data,dataleft,dataright,weight,ef);
131  }
132 
134  REAL weight,
135  TPZFMatrix<STATE> &ef,
136  TPZBndCond &bc) override
137  {
138  TPZDiscontinuousGalerkin::ContributeBCInterface(data,dataleft,weight,ef,bc);
139  }
140  public:
141 virtual int ClassId() const override;
142 
145 };
146 
147 #endif
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
Definition: pzdiscgal.h:20
void SolutionDisc(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
Definition: pzdiscgal.h:176
virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to stiffness matrix and load vector at one BC integration point...
virtual void SolutionDisc(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, int var, TPZVec< STATE > &Solout)
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Implements boundary conditions for continuous Galerkin.
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.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Implements boundary conditions for continuous Galerkin.
virtual int NEvalErrors() override
Returns the number of norm errors. Default is 3: energy, L2, H1, semi-norm H2 and H2...
This class implements discontinuous Galerkin formulation for the non-linear bi-harmonic equation...
virtual int NFluxes() override
Returns the number of components which form the flux function.
virtual std::string Name() override
Returns the name of the material.
virtual int NStateVariables() const override
Returns one because of scalar problem.
virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to residual vector at one BC integration point.
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
f
Definition: test.py:287
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int Dimension() const override
Returns the integrable dimension of the material.
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ef) override
It computes a contribution to residual vector at one integration point.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
It computes a contribution to stiffness matrix and load vector at one integration point...
Definition: pzdiscgal.cpp:30
virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to stiffness matrix and load vector at one BC integration point...
void SetMaterial(STATE &xfin)
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Implements integral over element&#39;s volume.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
Implements integral over element&#39;s volume.
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
TPZNonLinBiharmonic(int nummat, STATE f)
Inicialisation of biharmonic material.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to stiffness matrix and load vector at one integration point...
virtual int ClassId() const override
Unique identifier for serialization purposes.
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...
def values
Definition: rdt.py:119
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
virtual int VariableIndex(const std::string &name) override
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override=0
It computes a contribution to the stiffness matrix and load vector at one integration point...