NeoPZ
tpzbiharmonicestimator.h
Go to the documentation of this file.
1 
6 #ifndef TPZBIHARMONICESTIMATOR_H
7 #define TPZBIHARMONICESTIMATOR_H
8 #include "pzbiharmonic.h"
9 
18 {
19 private:
20 
24 
25  public:
26  int ClassId() const override;
27 
29  TPZBiharmonicEstimator(int nummat, STATE f);
32 
34  void SetExactSolutions(void (*fp)(TPZVec<REAL> &loc,TPZVec<STATE> &val,TPZFMatrix<STATE> &deriv),
35  void (*fd)(TPZVec<REAL> &locdual,TPZVec<STATE> &valdual,TPZFMatrix<STATE> &derivdual));
36 
38  virtual int NEvalErrors() override {return 4;}
39 
43  virtual void ContributeErrorsDual(TPZMaterialData &data,
44  REAL weight,
45  TPZVec<REAL> &nk);
46 
47  virtual void ContributeErrors(TPZMaterialData &data,
48  REAL weight,
49  TPZVec<REAL> &nk,
50  int &errorid) override
51  {
52  if (errorid == 0) this->ContributeErrorsDual(data,weight,nk);
53  if (errorid == 2) this->ContributeErrorsSimple(data,weight,nk);
54  }
55 
59  virtual void ContributeInterfaceErrors(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight,
60  TPZVec<STATE> &nkL, TPZVec<STATE> &nkR,
61  int &errorid) override
62  {
63  if (errorid == 0) this->ContributeInterfaceErrorsDual(data,dataleft,dataright,weight,nkL,nkR);
64  if (errorid == 2) this->ContributeInterfaceErrorsSimple(data,dataleft,dataright,weight,nkL,nkR);
65  }
66 
67  virtual void ContributeInterfaceErrorsDual(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
68  REAL weight,
69  TPZVec<STATE> &nkL,
70  TPZVec<STATE> &nkR);
71 
78  REAL weight,
79  TPZVec<STATE> &nk,
80  TPZBndCond &bc);
81 
83  REAL weight,
84  TPZVec<STATE> &nk,
85  TPZBndCond &bc,
86  int &errorid) override
87  {
88  if (errorid == 0) this->ContributeInterfaceBCErrorsDual(data,dataleft,weight,nk,bc);
89  if (errorid == 2) this->ContributeInterfaceBCErrorsSimple(data,dataleft,weight,nk,bc);
90  }
91 
92  virtual void ContributeErrorsSimple(TPZMaterialData &data,
93  REAL weight,
94  TPZVec<REAL> &nk);
95 
96 
97  virtual void ContributeInterfaceErrorsSimple(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright,
98  REAL weight,
99  TPZVec<STATE> &nkL,
100  TPZVec<STATE> &nkR);
101 
102 
104  REAL weight,
105  TPZVec<STATE> &nk,
106  TPZBndCond &bc);
107 
113  TPZFMatrix<REAL> &axes, TPZVec<STATE> & /*flux*/ ,
114  TPZVec<STATE> &u_exact,TPZFMatrix<STATE> &du_exact,
115  TPZVec<REAL> &values) override;
116 
118  void Psi(TPZVec<REAL> &x, TPZVec<STATE> &pisci);
119 
121  void OrderSolution(TPZMaterialData &data);
123  void OrderSolutionRight(TPZMaterialData &data, TPZMaterialData &dataright);
125  void OrderSolutionLeft(TPZMaterialData &data, TPZMaterialData &dataleft);
126 
127 };
128 
129 #endif
virtual void ContributeInterfaceBCErrorsSimple(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZVec< STATE > &nk, TPZBndCond &bc)
TPZBiharmonicEstimator(int nummat, STATE f)
Constructor.
virtual void ContributeErrors(TPZMaterialData &data, REAL weight, TPZVec< REAL > &nk, int &errorid) override
Contains the TPZBiharmonic class which implements a discontinuous Galerkin formulation for the bi-har...
int ClassId() const override
Unique identifier for serialization purposes.
clarg::argBool bc("-bc", "binary checkpoints", false)
void OrderSolution(TPZMaterialData &data)
Computes the primal and dual exact error.
void Psi(TPZVec< REAL > &x, TPZVec< STATE > &pisci)
Kernel of the functional.
virtual void ContributeInterfaceErrors(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZVec< STATE > &nkL, TPZVec< STATE > &nkR, int &errorid) override
Implements integration of the interface part of an error estimator.
Implements discontinuous Galerkin formulation for the bi-harmonic equation.
Definition: pzbiharmonic.h:19
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
virtual void ContributeInterfaceBCErrors(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZVec< STATE > &nk, TPZBndCond &bc, int &errorid) override
virtual void ContributeErrorsSimple(TPZMaterialData &data, REAL weight, TPZVec< REAL > &nk)
void SetExactSolutions(void(*fp)(TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv), void(*fd)(TPZVec< REAL > &locdual, TPZVec< STATE > &valdual, TPZFMatrix< STATE > &derivdual))
Set the pointer of the solution function.
void(* fPrimalExactSol)(TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)
Attributes required for goal oriented error estimation validation.
virtual void ContributeInterfaceErrorsDual(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZVec< STATE > &nkL, TPZVec< STATE > &nkR)
f
Definition: test.py:287
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
virtual void ContributeInterfaceBCErrorsDual(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZVec< STATE > &nk, TPZBndCond &bc)
Implements integration of the boundary interface part of an error estimator.
void OrderSolutionLeft(TPZMaterialData &data, TPZMaterialData &dataleft)
Computes the primal and dual exact error over dataleft considering the solution in data...
virtual void ContributeInterfaceErrorsSimple(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZVec< STATE > &nkL, TPZVec< STATE > &nkR)
virtual void ContributeErrorsDual(TPZMaterialData &data, REAL weight, TPZVec< REAL > &nk)
Implements integration of the internal part of an error estimator.
virtual int NEvalErrors() override
Returns the number of norm errors. Default is 3: energy, L2 and H1.
void(* fDualExactSol)(TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)
void Errors(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &, 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 OrderSolutionRight(TPZMaterialData &data, TPZMaterialData &dataright)
Computes the primal and dual exact error over dataright considering the solution in data...
Estimates error to biharmonic problem. Also computes the contributions on elements and interfaces...
def values
Definition: rdt.py:119