NeoPZ
pzbiharmonic.h
Go to the documentation of this file.
1 
6 #ifndef TPZBIHARMONICHPP
7 #define TPZBIHARMONICHPP
8 
9 #include <iostream>
10 #include "pzdiscgal.h"
11 #include "pzfmatrix.h"
12 
20 
21 protected:
22  REAL fXf;
23 
24  public :
25 
27 
29  TPZBiharmonic(int nummat, REAL f);
31  virtual ~TPZBiharmonic();
32 
34  virtual int NEvalErrors() override {return 8;}
35 
36  void SetMaterial(REAL &xfin) {
37  fXf = xfin;
38  }
40  int Dimension() const override { return 2;}
41 
43  virtual int NStateVariables() const override {
44  return 1;
45  };
46 
47  virtual void Print(std::ostream & out) override ;
48 
49  virtual std::string Name() override { return "TPZBiharmonic"; }
50 
52  virtual void Contribute(TPZMaterialData &data,
53  REAL weight,
55  TPZFMatrix<STATE> &ef) override ;
57  virtual void Contribute(TPZMaterialData &data,
58  REAL weight,
59  TPZFMatrix<STATE> &ef) override
60  {
62  }
64  virtual void ContributeBC(TPZMaterialData &data,
65  REAL weight,
68  TPZBndCond &bc) override ;
69 
71  virtual void ContributeBC(TPZMaterialData &data,
72  REAL weight,
74  TPZBndCond &bc) override
75  {
76  TPZDiscontinuousGalerkin::ContributeBC(data,weight,ef,bc);
77  }
78 
79  virtual int VariableIndex(const std::string &name) override ;
80 
81  virtual int NSolutionVariables(int var) override ;
82 
83  virtual int NFluxes() override { return 0;}
84 
85  public:
86 virtual int ClassId() const override ;
87 
88 
89 protected:
90  virtual void Solution(TPZVec<STATE> &Sol,TPZFMatrix<STATE> &DSol,TPZFMatrix<REAL> &axes,int var,TPZVec<STATE> &Solout) override ;
91 
92 public:
94  virtual void SolutionDisc(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, int var, TPZVec<STATE> &Solout)
95  {
96  TPZDiscontinuousGalerkin::SolutionDisc(data,dataleft,dataright,var,Solout);
97  }
98 
100  virtual void Flux(TPZVec<REAL> &x, TPZVec<STATE> &Sol, TPZFMatrix<STATE> &DSol, TPZFMatrix<REAL> &axes, TPZVec<STATE> &flux) override ;
101 
106  void Errors(TPZVec<REAL> &x,TPZVec<STATE> &u,
108  TPZVec<STATE> &u_exact,TPZFMatrix<STATE> &du_exact,TPZVec<REAL> &values) override ;
109 
110  virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
111  REAL weight,
112  TPZFMatrix<STATE> &ek,
113  TPZFMatrix<STATE> &ef) override ;
114 
115 
116  virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft,
117  REAL weight,
118  TPZFMatrix<STATE> &ek,
119  TPZFMatrix<STATE> &ef,
120  TPZBndCond &bc) override ;
121 
122  virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
123  REAL weight,
124  TPZFMatrix<STATE> &ef) override
125  {
126  TPZDiscontinuousGalerkin::ContributeInterface(data,dataleft,dataright,weight,ef);
127  }
128 
130  REAL weight,
131  TPZFMatrix<STATE> &ef,
132  TPZBndCond &bc) override
133  {
134  TPZDiscontinuousGalerkin::ContributeBCInterface(data,dataleft,weight,ef,bc);
135  }
136 
137 };
138 
139 #endif
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.
Definition: pzbiharmonic.h:129
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
Definition: pzdiscgal.h:20
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...
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
int Dimension() const override
Model dimension.
Definition: pzbiharmonic.h:40
static REAL gLambda1
Definition: pzbiharmonic.h:26
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int ClassId() const override
Unique identifier for serialization purposes.
static REAL gLambda2
Definition: pzbiharmonic.h:26
static REAL gSigmaA
Definition: pzbiharmonic.h:26
static REAL gM_alpha
Definition: pzbiharmonic.h:26
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.
static REAL gM_betta
Definition: pzbiharmonic.h:26
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Implements boundary conditions for continuous Galerkin.
Definition: pzbiharmonic.h:71
Implements discontinuous Galerkin formulation for the bi-harmonic equation.
Definition: pzbiharmonic.h:19
static REAL gL_alpha
Definition: pzbiharmonic.h:26
static REAL gSigmaB
Definition: pzbiharmonic.h:26
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Implements integral over element&#39;s volume.
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.
Definition: pzbiharmonic.h:122
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual int NStateVariables() const override
Returns one because of scalar problem.
Definition: pzbiharmonic.h:43
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
Implements integral over element&#39;s volume.
Definition: pzbiharmonic.h:57
f
Definition: test.py:287
virtual int NFluxes() override
Returns the number of components which form the flux function.
Definition: pzbiharmonic.h:83
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Implements boundary conditions for continuous Galerkin.
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).
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 > &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...
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...
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
Compute the error due to the difference between the interpolated flux and the flux computed based on ...
void SetMaterial(REAL &xfin)
Definition: pzbiharmonic.h:36
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 ~TPZBiharmonic()
Destructor.
virtual int NEvalErrors() override
Returns the number of norm errors. Default is 3: energy, L2, H1, semi-norm H2 and H2...
Definition: pzbiharmonic.h:34
static REAL gL_betta
Definition: pzbiharmonic.h:26
def values
Definition: rdt.py:119
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
virtual 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: pzbiharmonic.h:94
TPZBiharmonic(int nummat, REAL f)
Inicialisation of biharmonic material.
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...
virtual int VariableIndex(const std::string &name) override
virtual std::string Name() override
Returns the name of the material.
Definition: pzbiharmonic.h:49