NeoPZ
TPZDualPoisson.h
Go to the documentation of this file.
1 //
2 // TPZDualPoisson.hpp
3 // PZ
4 //
5 // Created by omar on 04/07/2016.
6 //
7 //
8 
9 #ifndef TPZDualPoisson_hpp
10 #define TPZDualPoisson_hpp
11 
12 
13 #include <stdio.h>
14 #include "TPZMaterial.h"
15 #include "pzbndcond.h"
16 #include "pzfmatrix.h"
17 #include "pzaxestools.h"
18 
19 
29 class TPZDualPoisson : public TPZMaterial {
30 
31 
32 public:
33 
36 
39 
41  TPZDualPoisson(int mat_id);
42 
44  TPZDualPoisson(const TPZDualPoisson &copy);
45 
47  TPZMaterial * NewMaterial() override;
48 
51 
58  int Dimension() const override;
59 
61  virtual int NStateVariables() const override;
62 
64  void Print(std::ostream & out) override;
65 
67  std::string Name() override;
68 
70  void FillDataRequirements(TPZMaterialData &data) override;
71 
73  void FillBoundaryConditionDataRequirement(int type,TPZMaterialData &data) override;
74 
76  void FillDataRequirements(TPZVec<TPZMaterialData> &datavec) override;
77 
79  void FillBoundaryConditionDataRequirement(int type, TPZVec<TPZMaterialData> &datavec) override;
80 
82  public:
83 
84  virtual int ClassId() const override;
85 
86 
88  virtual void Write(TPZStream &buf, int withclassid) const override;
89 
91  void Read(TPZStream &buf, void *context) override;
92 
93 
102  void Contribute(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef) override;
103 
105  void Contribute(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ef) override;
106 
108  void ContributeBC(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
109 
111  void ContributeBC(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
112 
122  void Contribute(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef) override;
123 
125  void Contribute(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ef) override;
126 
128  void ContributeBC(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
129 
131  void ContributeBC(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
132 
141  int NEvalErrors() override;
142 
144  int VariableIndex(const std::string &name) override;
145 
147  int NSolutionVariables(int var) override;
148 
150  void Solution(TPZMaterialData &data, int var, TPZVec<STATE> &Solout) override;
151 
153  void Solution(TPZVec<TPZMaterialData> &datavec, int var, TPZVec<STATE> &Solout) override;
154 
157 
158  void Errors(TPZVec<TPZMaterialData> &data, TPZVec<STATE> &u_exact, TPZFMatrix<STATE> &du_exact, TPZVec<REAL> &errors) override;
159 
163 };
164 
165 #endif /* TPZDualPoisson_hpp */
This material consider exactly just laplace equation (i.e. coefficient equal to 1) ...
int NSolutionVariables(int var) override
size of the current variable (1 -> scalar, 3-> vector, 9 -> Tensor )
TPZDualPoisson()
default constructor
clarg::argBool bc("-bc", "binary checkpoints", false)
int VariableIndex(const std::string &name) override
Variable index based on variable naming.
TPZDualPoisson & operator=(const TPZDualPoisson &other)
assignment operator
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
int Dimension() const override
return the euclidean dimension of the weak statement
void error(char *string)
Definition: testShape.cc:7
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout) override
Postprocess required variables.
int NEvalErrors() override
Number of errors being computed = { 0-> h1, 1 ->L2 primal, 2 L2 dual}.
void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Boundary contribute without jacobian matrix.
Contains TPZMatrixclass which implements full matrix (using column major representation).
void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Volumetric contribute without jacobian matrix.
virtual int ClassId() const override
unique class identifier
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
std::string Name() override
print material name
~TPZDualPoisson()
default desconstructor
virtual int NStateVariables() const override
return the number of state variables associated with each trial function
void Read(TPZStream &buf, void *context) override
write class from disk
virtual void Write(TPZStream &buf, int withclassid) const override
write class in disk
void FillBoundaryConditionDataRequirement(int type, TPZMaterialData &data) override
fill requirements for bounadry contribute methods
Contains declaration of the TPZAxesTools class which implements verifications over axes...
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
TPZMaterial * NewMaterial() override
return a material object from a this object
void FillDataRequirements(TPZMaterialData &data) override
fill requirements for volumetric contribute methods
void Errors(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &du, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &error) override
Compute errors, no comments!!!
void Print(std::ostream &out) override
print all material information