NeoPZ
pzmaterialdata.h
Go to the documentation of this file.
1 
6 #ifndef PZMATERIALDATA_H
7 #define PZMATERIALDATA_H
8 
9 #include "pzmanvector.h"
10 #include "pzfmatrix.h"
11 
12 #ifdef _AUTODIFF
13 #include "fad.h"
14 #endif
15 
16 
31 
32 
33 class TPZMaterialData : public TPZSavable {
34 
35 public:
36 
37 
39  // EScalarShape : regular shape functions: one shape function used for all state variables (default)
40  // EVecandShape : HDiv type shape function and a scalar function
41  // EVecShape : a vector valued shape function
42 
46  bool fNeedsSol = false, fNeedsNeighborSol = false, fNeedsHSize = false, fNeedsNeighborCenter = false, fNeedsNormalVecFad = false;
47  bool fNeedsNormal = false;
48  bool fActiveApproxSpace = true;
75  int p;
83  REAL HSize;
85  REAL detjac;
90 
91 
94 
95  //Id of associated geo element
96  int gelElId;
97 
104 #ifdef _AUTODIFF
105  TPZFNMatrix<180,Fad<REAL>> fNormalVecFad;
108 #endif
109 
113 
116 
118  int NintPts;
119 
121  TPZMaterialData();
122 
124  TPZMaterialData( const TPZMaterialData &cp );
125 
128 
130  void SetAllRequirements(bool set);
131 
132  //void InvertLeftRightData();
133 
135 
137  void Print(std::ostream &out) const;
139  void PrintMathematica(std::ostream &out) const;
141  void Write(TPZStream &buf, int withclassid) const override;
142 
144  void Read(TPZStream &buf, void *context) override;
145 
151  virtual bool Compare(TPZSavable *copy, bool override = false) override;
152 
158  virtual bool Compare(TPZSavable *copy, bool override = false) const override;
159 
161  void ComputeFluxValues(TPZFMatrix<REAL> & fluxes);
162 
165 
166 public:
167  int ClassId() const override;
168 
169 };
170 
171 #endif
172 
void ComputeFluxValues(TPZFMatrix< REAL > &fluxes)
Computes the flux values based on a Material of Hdiv approx space.
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
TPZMaterialData & operator=(const TPZMaterialData &cp)
TPZManVector< STATE, 10 > TPZFemSol
This class implements an interface between TPZCompEl::CalcStiff and TPZMaterial::Contribute methods...
TPZFNMatrix< 660, REAL > dphi
values of the derivative of the shape functions over the master element
int NintPts
amount of points in the integrstion rule
void SetAllRequirements(bool set)
Set all flags at once.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
MShapeFunctionType fShapeType
TPZFNMatrix< 9, REAL > jacinv
value of the inverse of the jacobian at the integration point
TPZManVector< REAL, 3 > xParametric
value of the coordinate at the integration point corresponding to the x-parametric coordinate (master...
TPZFNMatrix< 15, STATE > TPZFemGradSol
Represents the gradient of a state variable of a finite element approximation.
TPZFNMatrix< 9, REAL > jacobian
value of the jacobian at the integration point
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
int p
maximum polinomial order of the shape functions
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
~TPZMaterialData()
Default destructor.
TPZFNMatrix< 220, REAL > divphi
values of the divergence of the shapefunctions in the mapped element (only applicable to H(div)) spac...
TPZManVector< TPZFemSol, 20 > TPZSolVec
TPZManVector< REAL, 3 > XCenter
value of the coordinate at the center of the element
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Contains TPZMatrixclass which implements full matrix (using column major representation).
TPZFNMatrix< 180 > fNormalVec
list of normal vectors
TPZFNMatrix< 180 > fDirectionsOnMaster
Directions on the master element.
void PrintMathematica(std::ostream &out) const
Prints the data in a format suitable for Mathematica.
Free store vector implementation.
int numberdualfunctions
number of dual function (e.g. pressure in HDiv approximations)
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
REAL HSize
measure of the size of the element
int intGlobPtIndex
global point index
int intLocPtIndex
Index of the current integration point being evaluated.
int ClassId() const override
Define the class id associated with the class.
TPZSolVec divsol
vector of the divergence of the solution at the integration point (only of hdiv spaces) ...
virtual bool Compare(TPZSavable *copy, bool override=false) override
Compares the object for identity with the object pointed to, eventually copy the object.
void ComputeFunctionDivergence()
Computes the flux divergence values based on a Material of Hdiv approx space.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
TPZManVector< TPZFemGradSol, 20 > TPZGradSolVec
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
TPZManVector< std::pair< int, int64_t > > fVecShapeIndex
correspondence between normal vector index and index of the shape functions
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
TPZSolVec sol
vector of the solutions at the integration point
REAL detjac
determinant of the jacobian
TPZMaterialData()
Default constructor.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
Definition: pzfmatrix.h:716
void Print(std::ostream &out) const
Prints the data.