NeoPZ
TPZPrimalPoisson.h
Go to the documentation of this file.
1 //
2 // TPZPrimalPoisson.h
3 // PZ
4 //
5 // Created by omar on 04/07/2016.
6 //
7 //
8 
9 #ifndef TPZPrimalPoisson_h
10 #define TPZPrimalPoisson_h
11 
12 #include <stdio.h>
13 #include "TPZMaterial.h"
14 #include "pzbndcond.h"
15 #include "pzfmatrix.h"
16 
17 
26 class TPZPrimalPoisson : public TPZMaterial {
27 
28 
29 public:
30 
33 
36 
38  TPZPrimalPoisson(int mat_id);
39 
42 
44  TPZMaterial * NewMaterial() override;
45 
48 
55  int Dimension() const override ;
56 
58  virtual int NStateVariables() const override;
59 
61  void Print(std::ostream & out) override;
62 
64  std::string Name() override;
65 
67  void FillDataRequirements(TPZMaterialData &data) override;
68 
70  void FillBoundaryConditionDataRequirement(int type,TPZMaterialData &data) override;
71 
73  void FillDataRequirements(TPZVec<TPZMaterialData> &datavec) override;
74 
76  void FillBoundaryConditionDataRequirement(int type, TPZVec<TPZMaterialData> &datavec) override;
77 
79  public:
80 
81 virtual int ClassId() const override;
82 
84  virtual void Write(TPZStream &buf, int withclassid) const override;
85 
87  void Read(TPZStream &buf, void *context) override;
88 
89 
91  void Contribute(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef) override;
92 
94  void Contribute(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ef) override;
95 
97  void ContributeBC(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
98 
100  void ContributeBC(TPZMaterialData &data,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
101 
103  void Contribute(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef) override;
104 
106  void Contribute(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ef) override;
107 
109  void ContributeBC(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
110 
112  void ContributeBC(TPZVec<TPZMaterialData> &datavec,REAL weight,TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef,TPZBndCond &bc) override;
113 
115  int NEvalErrors() override;
116 
118  int VariableIndex(const std::string &name) override;
119 
121  int NSolutionVariables(int var) override;
122 
124  void Solution(TPZMaterialData &data, int var, TPZVec<STATE> &Solout) override;
125 
127  void Solution(TPZVec<TPZMaterialData> &datavec, int var, TPZVec<STATE> &Solout) override;
128 
131 
132 };
133 
134 
135 #endif /* TPZPrimalPoisson_hpp */
virtual void Write(TPZStream &buf, int withclassid) const override
write class in disk
int VariableIndex(const std::string &name) override
Variable index based on variable naming.
void Print(std::ostream &out) override
print all material information
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!!!
clarg::argBool bc("-bc", "binary checkpoints", false)
int NEvalErrors() override
Number of errors being computed = { 0-> h1, 1 ->L2 primal, 2 L2 dual}.
virtual int NStateVariables() const override
return the number of state variables associated with each trial function
TPZPrimalPoisson & operator=(const TPZPrimalPoisson &other)
assignment operator
void FillBoundaryConditionDataRequirement(int type, TPZMaterialData &data) override
fill requirements for bounadry contribute methods
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
TPZMaterial * NewMaterial() override
return a material object from a this object
void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Boundary contribute with jacobian matrix.
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 FillDataRequirements(TPZMaterialData &data) override
fill requirements for volumetric contribute methods
Contains TPZMatrixclass which implements full matrix (using column major representation).
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
std::string Name() override
print material name
void Read(TPZStream &buf, void *context) override
write class from disk
virtual int ClassId() const override
unique class identifier
int Dimension() const override
return the euclidean dimension of the weak statement
void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout) override
Postprocess required variables.
void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Volumetric contribute with jacobian matrix.
This material consider exactly just laplace equation (i.e. coefficient equal to 1) ...
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
~TPZPrimalPoisson()
default desconstructor
TPZPrimalPoisson()
default constructor
int NSolutionVariables(int var) override
size of the current variable (1 -> scalar, 3-> vector, 9 -> Tensor )