NeoPZ
pzhdivpressurebound.h
Go to the documentation of this file.
1 //
2 // pzhdivpressurebound.h
3 // PZ
4 //
5 // Created by Agnaldo Farias on 25/06/13.
6 //
7 //
8 
15 #ifndef __PZ__pzhdivpressurebound__
16 #define __PZ__pzhdivpressurebound__
17 
18 #include <iostream>
19 
20 #include "pzelchdivbound2.h"
21 
32 template<class TSHAPE>
34 
37 
38 public:
39 
40  TPZCompElHDivPressureBound(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index);
41 
42 
45 
50  TPZCompElHDivPressureBound(TPZCompMesh &mesh, const TPZCompElHDivPressureBound<TSHAPE> &copy, std::map<int64_t,int64_t> & gl2lcConMap, std::map<int64_t,int64_t> & gl2lcElMap);
51 
52 
54 
55 
58 
59  virtual TPZCompEl *Clone(TPZCompMesh &mesh) const override {
60  return new TPZCompElHDivPressureBound<TSHAPE> (mesh, *this);
61  }
62 
70  virtual TPZCompEl *ClonePatchEl(TPZCompMesh &mesh,std::map<int64_t,int64_t> & gl2lcConMap,std::map<int64_t,int64_t>&gl2lcElMap) const override
71  {
72  return new TPZCompElHDivPressureBound<TSHAPE> (mesh, *this, gl2lcConMap, gl2lcElMap);
73  }
74 
75 
76 
77  virtual int NConnects() const override;
78 
80  virtual void SetPressureOrder(int ord);
81 
82  virtual void SetConnectIndex(int i, int64_t connectindex) override;
83 
84  virtual int NConnectShapeF(int connect, int order) const override;
85 
86  virtual int SideConnectLocId(int node, int side) const override;
87 
89  virtual void SetCreateFunctions(TPZCompMesh *mesh) override;
90 
91  // virtual MElementType Type();
92 
93 
94  virtual int Dimension() const override {
95  return TSHAPE::Dimension;
96  }
97 
98  virtual int NCornerConnects() const override {
99  return 0;
100  }
101 
102 // virtual int NSideConnects(int side) const;
103 
105  virtual void GetInterpolationOrder(TPZVec<int> &ord) override;
106 
108  // virtual int PreferredSideOrder(int iside);
109 
111  virtual void SetSideOrder(int side, int order) override;
112 
114  virtual int EffectiveSideOrder(int side) const override;
115 
116  virtual int ConnectOrder(int connect) const override;
117 
120  virtual void InitMaterialData(TPZMaterialData &data) override;
121 
123  void ComputeShapeIndex(TPZVec<int> &sides, TPZVec<int64_t> &shapeindex);
124 
128 
130  virtual void SideShapeFunction(int side,TPZVec<REAL> &point,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi) override;
131 
133  void Shape(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi) override;
134 
136  void IndexShapeToVec(TPZVec<int> &fVectorSide,TPZVec<std::pair<int,int64_t> > & IndexVecShape);
137 
139  public:
140 int ClassId() const override;
141 
142 
144  void Write(TPZStream &buf, int withclassid) const override;
145 
147  void Read(TPZStream &buf, void *context) override;
148 };
149 
150 template<class TSHAPE>
152  return Hash("TPZCompElHDivPressureBound") ^ TPZCompElHDivBound2<TSHAPE>::ClassId() << 1;
153 }
154 
155 #endif /* defined(__PZ__pzhdivpressurebound__) */
virtual int SideConnectLocId(int node, int side) const override
Returns the local node number of icon along is.
void IndexShapeToVec(TPZVec< int > &fVectorSide, TPZVec< std::pair< int, int64_t > > &IndexVecShape)
Returns a matrix index of the shape and vector associate to element.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
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...
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
virtual ~TPZCompElHDivPressureBound()
Default destructor.
virtual void SetConnectIndex(int i, int64_t connectindex) override
Sets the node pointer of node i to nod.
virtual int Dimension() const override
Returns the dimension of the element.
virtual int NConnectShapeF(int connect, int order) const override
Returns the number of shapefunctions associated with a connect.
TPZCompElHDivPressureBound()
Default constructor.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
virtual void InitMaterialData(TPZMaterialData &data) override
Initialize a material data and its attributes based on element dimension, number of state variables a...
Implements a generic computational element to HDiv-Pressure scope. Computational Element.
void ComputeShapeIndex(TPZVec< int > &sides, TPZVec< int64_t > &shapeindex)
Compute the correspondence between the normal vectors and the shape functions.
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
int fPressureOrder
Defines the interpolation order for pressure variable.
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Compute the shape function at the integration point.
virtual void GetInterpolationOrder(TPZVec< int > &ord) override
Identifies the interpolation order on the interior of the element.
virtual void SetSideOrder(int side, int order) override
Returns the preferred order of the polynomial along side iside.
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Compute the values of the shape function of the side.
virtual void SetCreateFunctions(TPZCompMesh *mesh) override
Set create function in TPZCompMesh to create elements of this type.
int64_t Index() const
Returns element index of the mesh fELementVec list.
Definition: pzcompel.h:821
Implements a generic computational element to HDiv scope. Computational Element.
virtual int EffectiveSideOrder(int side) const override
Returns the actual interpolation order of the polynomial along the side.
void FirstShapeIndex(TPZVec< int64_t > &Index)
Returns the vector index of the first index shape associate to element.
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
virtual int NCornerConnects() const override
Returns the number of corner connects of the element.
Contains declaration of TPZCompElHDivBound2 class which implements a generic computational element (H...
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
virtual void SetPressureOrder(int ord)
Identifies the interpolation order for pressure variable.
virtual int ConnectOrder(int connect) const override
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
virtual int NConnects() const override
Returns the number of connect objects of the element.
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const override
Method for creating a copy of the element.
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59