NeoPZ
pzelctemp.h
Go to the documentation of this file.
1 
6 #ifndef PZELCTEMPH
7 #define PZELCTEMPH
8 
9 #include "pzintel.h"
10 #include "pzquad.h"
11 
19 template<class TSHAPE>
21 
22 protected:
23 
26 
28  typename TSHAPE::IntruleType fIntRule;
29 
30 public:
31 
32  TPZIntelGen(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index);
33 
34  TPZIntelGen(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index, int nocreate);
35 
36  TPZIntelGen(TPZCompMesh &mesh, const TPZIntelGen<TSHAPE> &copy);
37 
40  const TPZIntelGen<TSHAPE> &copy,
41  std::map<int64_t,int64_t> & gl2lcConMap,
42  std::map<int64_t,int64_t> & gl2lcElMap);
43 
44  TPZIntelGen();
45 
46  virtual ~TPZIntelGen();
47 
48  virtual TPZCompEl *Clone(TPZCompMesh &mesh) const override {
49  return new TPZIntelGen<TSHAPE> (mesh, *this);
50  }
51 
59  virtual TPZCompEl *ClonePatchEl(TPZCompMesh &mesh,std::map<int64_t,int64_t> & gl2lcConMap,std::map<int64_t,int64_t>&gl2lcElMap) const override
60  {
61  return new TPZIntelGen<TSHAPE> (mesh, *this, gl2lcConMap, gl2lcElMap);
62  }
63 
64 
65  virtual MElementType Type() override;
66 
67  virtual int NConnects() const override{
68  return fConnectIndexes.size();
69  }
70 
71  virtual void SetConnectIndex(int i, int64_t connectindex) override;
72 
73  virtual int NConnectShapeF(int connect, int order) const override;
74 
75  virtual int Dimension() const override {
76  return TSHAPE::Dimension;
77  }
78 
79  virtual int NCornerConnects() const override{
80  return TSHAPE::NCornerNodes;
81  }
82 
83  virtual int NSideConnects(int side) const override;
84 
85  virtual int SideConnectLocId(int node, int side) const override;
86 
87  virtual int64_t ConnectIndex(int node) const override;
88 
89  virtual void SetIntegrationRule(int ord) override;
90 
92  virtual void SetInterpolationOrder(int order);
93 
95  virtual void GetInterpolationOrder(TPZVec<int> &ord) override;
96 
98  virtual int PreferredSideOrder(int iside) override;
99 
103  virtual void SetPreferredOrder(int order) override;
104 
106  virtual void SetSideOrder(int side, int order) override;
107 
109  virtual int EffectiveSideOrder(int side) const override;
111  virtual int ConnectOrder(int connect) const;
112 
114  virtual void SideShapeFunction(int side,TPZVec<REAL> &point,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi) override;
115 
116  void Shape(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi) override;
117 
118  void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override;
119 
121  TPZTransform<> TransformSideToElement(int side) override;
122 
123  virtual const TPZIntPoints &GetIntegrationRule() const override {
124  if (this->fIntegrationRule) {
125  return *fIntegrationRule;
126  }
127  else
128  {
129  return fIntRule;
130  }
131  }
132 
133  virtual TPZIntPoints &GetIntegrationRule() override {
134  if (fIntegrationRule) {
135  return *fIntegrationRule;
136  }
137  else
138  {
139  return fIntRule;
140  }
141  }
142 
144  public:
145  virtual int ClassId() const override;
146 
148  virtual void Write(TPZStream &buf, int withclassid) const override;
149 
151  virtual void Read(TPZStream &buf, void *context) override;
152 };
153 
154 template<class TSHAPE>
156  return Hash("TPZIntelGen") ^ TPZInterpolatedElement::ClassId() << 1 ^ TSHAPE().ClassId() << 2;
157 }
158 
159 #endif
Represents a graphical mesh used for post processing purposes. Post processing.
Definition: pzgraphmesh.h:34
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual int ConnectOrder(int connect) const
Returns the actual interpolation order of the polynomial for a connect.
Definition: pzelctemp.cpp:301
virtual const TPZIntPoints & GetIntegrationRule() const override
Returns a reference to an integration rule suitable for integrating the interior of the element...
Definition: pzelctemp.h:123
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.
Definition: pzelctemp.cpp:307
virtual int64_t ConnectIndex(int node) const override
Returns the index of the ith connectivity of the element.
Definition: pzelctemp.cpp:195
virtual int NConnectShapeF(int connect, int order) const override
Returns the number of shapefunctions associated with a connect.
Definition: pzelctemp.cpp:134
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
virtual void SetIntegrationRule(int ord) override
Definition: pzelctemp.cpp:150
virtual void SetPreferredOrder(int order) override
Sets the preferred interpolation order along a side.
Definition: pzelctemp.cpp:215
virtual int ClassId() const override
returns the unique identifier for reading/writing objects to streams
Definition: pzelctemp.h:155
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
Definition: pzelctemp.cpp:363
Abstract class defining integration rules. Numerical Integration.
Definition: tpzintpoints.h:19
virtual int NConnects() const override
Returns the number of connect objects of the element.
Definition: pzelctemp.h:67
virtual TPZIntPoints & GetIntegrationRule() override
Returns a reference to an integration rule suitable for integrating the interior of the element...
Definition: pzelctemp.h:133
virtual void GetInterpolationOrder(TPZVec< int > &ord) override
Identifies the interpolation order on the interior of the element.
Definition: pzelctemp.cpp:173
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
virtual int Dimension() const override
Returns the dimension of the element.
Definition: pzelctemp.h:75
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...
Definition: pzelctemp.h:59
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
Definition: pzelctemp.cpp:399
virtual void SetInterpolationOrder(int order)
Sets the interpolation order for the interior of the element.
Definition: pzelctemp.cpp:167
virtual void SetConnectIndex(int i, int64_t connectindex) override
Sets the node pointer of node i to nod.
Definition: pzelctemp.cpp:122
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the shape function set at the point x.
Definition: pzelctemp.cpp:327
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
Definition: pzcompel.h:590
virtual ~TPZIntelGen()
Definition: pzelctemp.cpp:97
virtual MElementType Type() override
Return the type of the element.
Definition: pzelctemp.cpp:117
virtual void SetSideOrder(int side, int order) override
Sets the interpolation order of side to order.
Definition: pzelctemp.cpp:222
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
TPZManVector< int64_t, TSHAPE::NSides > fConnectIndexes
Indexes of the connects associated with the elements.
Definition: pzelctemp.h:25
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const override
Method for creating a copy of the element.
Definition: pzelctemp.h:48
MElementType
Define the element types.
Definition: pzeltype.h:52
TPZTransform TransformSideToElement(int side) override
Returns the transformation which transform a point from the side to the interior of the element...
Definition: pzelctemp.cpp:343
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
TSHAPE::IntruleType fIntRule
Integration rule associated with the topology of the element.
Definition: pzelctemp.h:28
virtual int SideConnectLocId(int node, int side) const override
Returns the local node number of icon along is.
Definition: pzelctemp.cpp:161
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
virtual int NCornerConnects() const override
Returns the number of corner connects of the element.
Definition: pzelctemp.h:79
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
virtual int PreferredSideOrder(int iside) override
Returns the preferred order of the polynomial along side iside.
Definition: pzelctemp.cpp:183
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Definition: pzelctemp.cpp:349
virtual int NSideConnects(int side) const override
Returns the number of dof nodes along side iside.
Definition: pzelctemp.cpp:156
int ClassId() const override
Define the class id associated with the class.
Definition: pzintel.cpp:1935
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
virtual int EffectiveSideOrder(int side) const override
Returns the actual interpolation order of the polynomial along the side.
Definition: pzelctemp.cpp:274
Implements computational element based on an interpolation space. Computational Element.
Definition: pzintel.h:27
Implements a generic computational element. Computational Element.
Definition: pzelctemp.h:20