NeoPZ
pzhdivpressure.h
Go to the documentation of this file.
1 
6 #ifndef PZHDIVPRESSUREHTT
7 #define PZHDIVPRESSUREHTT
8 
9 #include "pzelchdiv.h"
10 
11 
19 template<class TSHAPE>
20 class TPZCompElHDivPressure : public TPZCompElHDiv<TSHAPE> {
21 
24 
27 public:
28 
29  TPZCompElHDivPressure(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index);
30 
32 
39  std::map<int64_t,int64_t> & gl2lcConMap,
40  std::map<int64_t,int64_t> & gl2lcElMap);
41 
43 
44  virtual ~TPZCompElHDivPressure();
45 
46  virtual TPZCompEl *Clone(TPZCompMesh &mesh) const override {
47  return new TPZCompElHDivPressure<TSHAPE> (mesh, *this);
48  }
49 
57  virtual TPZCompEl *ClonePatchEl(TPZCompMesh &mesh,std::map<int64_t,int64_t> & gl2lcConMap,std::map<int64_t,int64_t>&gl2lcElMap) const override
58  {
59  return new TPZCompElHDivPressure<TSHAPE> (mesh, *this, gl2lcConMap, gl2lcElMap);
60  }
61 
63 #ifndef STATE_COMPLEX
64  virtual void SetCreateFunctions(TPZCompMesh *mesh) override {
66  }
67 #endif
68 
69  virtual MElementType Type() override;
70 
71  virtual int NConnects() const override;
72 
73  virtual void SetConnectIndex(int i, int64_t connectindex) override;
74 
75  virtual int NConnectShapeF(int connect, int order) const override;
76 
77  virtual int Dimension() const override {
78  return TSHAPE::Dimension;
79  }
80 
81  virtual int NCornerConnects() const override {
82  return 0;
83  }
84 
85  virtual int64_t ConnectIndex(int node) const override;
86 
90  virtual int PressureConnectIndex() const override
91  {
92  return NConnects()-1;
93  }
94 
96  virtual void SetPressureOrder(int ord);
98  int DualOrder();
99 
101  virtual void GetInterpolationOrder(TPZVec<int> &ord) override;
102 
107  virtual void SetPreferredOrder(int order) override;
108 
109  virtual int ConnectOrder(int connect) const override;
110 
114  virtual void InitMaterialData(TPZMaterialData &data) override;
115 
117  virtual void SideShapeFunction(int side,TPZVec<REAL> &point,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi) override;
118 
122  virtual void ShapeDual(TPZVec<REAL> &qsi, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi);
123 
124  void Shape(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi) override;
125 
127  virtual void Solution( TPZVec<REAL> &qsi,int var,TPZVec<STATE> &sol) override;
128 
129 private:
130  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZSolVec &sol, TPZGradSolVec &dsol,TPZFMatrix<REAL> &axes) override;
131 
132 public:
133 
139  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZMaterialData &data) override;
140 
142  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphix,
143  const TPZFMatrix<REAL> &axes, TPZSolVec &sol, TPZGradSolVec &dsol) override;
144 
147 
148 
149  void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override;
150 
152  TPZTransform<> TransformSideToElement(int side) override;
153 
156 int ClassId() const override;
157 
159  void Write(TPZStream &buf, int withclassid) const override;
160 
162  void Read(TPZStream &buf, void *context) override;
163 
164 };
165 
166 template<class TSHAPE>
168  return Hash("TPZCompElHDivPressure") ^ TPZCompElHDiv<TSHAPE>::ClassId() << 1;
169 }
170 
172 TPZCompEl *CreateHDivPressurePointEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
174 TPZCompEl *CreateHDivPressureLinearEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
176 TPZCompEl *CreateHDivPressureQuadEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
178 TPZCompEl *CreateHDivPressureTriangleEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
180 TPZCompEl *CreateHDivPressureCubeEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
182 TPZCompEl *CreateHDivPressurePrismEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
184 TPZCompEl *CreateHDivPressurePyramEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
186 TPZCompEl *CreateHDivPressureTetraEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
187 
190 #endif
Represents a graphical mesh used for post processing purposes. Post processing.
Definition: pzgraphmesh.h:34
void Append(TPZFMatrix< REAL > &u1, TPZFMatrix< REAL > &u2, TPZFMatrix< REAL > &u12)
To append vectors.
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol) override
Compute the solution for a given variable.
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the values of the shape function of the side.
int DualOrder()
Returns the interpolation order to dual variable.
virtual void InitMaterialData(TPZMaterialData &data) override
Initialize a material data and its attributes based on element dimension, number of state variables a...
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
virtual void ShapeDual(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Compute the shape functions corresponding to the dual space.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
virtual int Dimension() const override
Returns the dimension of the element.
void ComputeSolutionPressureHDiv(TPZVec< REAL > &qsi, TPZMaterialData &data)
virtual void SetCreateFunctions(TPZCompMesh *mesh) override
Set create function in TPZCompMesh to create elements of this type.
virtual void SetPressureOrder(int ord)
Identifies the interpolation order for pressure variable.
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the shape function set at the point x.
TPZCompEl * CreateHDivPressurePrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for HDivPressure approximate space.
Contains declaration of TPZCompElHDiv class which implements a generic computational element (HDiv sc...
virtual void GetInterpolationOrder(TPZVec< int > &ord) override
Identifies the interpolation order on the interior of the element.
virtual int ConnectOrder(int connect) const override
TPZCompEl * CreateHDivPressureLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDivPressure approximate space.
TPZCompEl * CreateHDivPressureCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for HDivPressure approximate space.
TPZCompEl * CreateHDivPressurePyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for HDivPressure approximate space.
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes) override
Computes solution and its derivatives in the local coordinate qsi.
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
Definition: pzelchdiv.h:306
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
virtual int NConnects() const override
Returns the number of connect objects of the element.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
virtual void SetConnectIndex(int i, int64_t connectindex) override
Sets the node pointer of node i to nod.
virtual TPZCompEl * ClonePatchEl(TPZCompMesh &mesh, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap) const override
Create a copy of the given element. The clone copy have the connect indexes mapped to the local clone...
virtual void SetPreferredOrder(int order) override
Sets the preferred interpolation order along a side.
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
virtual int64_t ConnectIndex(int node) const override
Returns the index of the ith connectivity of the element.
TPZCompEl * CreateHDivPressureTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDivPressure approximate space.
virtual int NCornerConnects() const override
Returns the number of corner connects of the element.
TPZCompEl * CreateHDivPressureQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDivPressure approximate space.
TPZTransform TransformSideToElement(int side) override
Returns the transformation which transform a point from the side to the interior of the element...
MElementType
Define the element types.
Definition: pzeltype.h:52
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
void SetAllCreateFunctionsHDivPressure()
Definition: pzcmesh.h:531
virtual int NConnectShapeF(int connect, int order) const override
Number of shapefunctions of the connect associated.
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const override
Method for creating a copy of the element.
virtual MElementType Type() override
Return the type of the element.
virtual int PressureConnectIndex() const override
returns the index of the pressure connect returns -1 if their is no pressure connect ...
void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
This class implements a "generic" computational element to HDiv scope. Computational Element...
TPZCompEl * CreateHDivPressureTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for HDivPressure approximate space.
int fPressureOrder
Defines the interpolation order for pressure variable.
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
TPZCompEl * CreateHDivPressurePointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element for HDivPressure approximate space.