NeoPZ
tpzpoint.h
Go to the documentation of this file.
1 
6 #ifndef PZTOPOLOGYTPZPOINT_H
7 #define PZTOPOLOGYTPZPOINT_H
8 
9 #include "pzreal.h"
10 #include "pzfmatrix.h"
11 #include "pzvec.h"
12 #include "pztrnsform.h"
13 #include "pzeltype.h"
14 #include "pzstack.h"
15 #include "pzaxestools.h"
16 #include "TPZTopologyUtils.h"
17 
18 class TPZIntPoints;
19 class TPZInt1Point;
20 class TPZGraphEl1dd;
21 
22 class TPZCompEl;
23 class TPZGeoEl;
24 class TPZCompMesh;
25 
27 namespace pztopology {
34  class TPZPoint : public TPZSavable {
35  public:
36 
37  friend void pztopology::GetPermutation<TPZPoint>(const int permute, TPZVec<int> &permutation);
39  enum {NCornerNodes = 1, NSides = 1, Dimension = 0, NFaces = 0, NPermutations = 1};
40 
41  int ClassId() const override;
42  void Read(TPZStream &buf, void *context) override;
43  void Write(TPZStream &buf, int withclassid) const override;
44 
45 
48  }
50  virtual ~TPZPoint() {
51  }
52 
53  static void Shape(TPZVec<REAL> &loc,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi){
54  TShape(loc, phi, dphi);
55  }
57  template<class T>
58  static void TShape(const TPZVec<T> &loc,TPZFMatrix<T> &phi,TPZFMatrix<T> &dphi);
59 
71  template<class T>
72  static void BlendFactorForSide(const int &side, const TPZVec<T> &xi, T &blendFactor,
73  TPZVec<T> &corrFactorDxi);
74 
76  static int SideDimension(int side) {
77  return 0;
78  }
79 
81  static void LowerDimensionSides(int side,TPZStack<int> &smallsides) {
82  }
84  static void LowerDimensionSides(int side,TPZStack<int> &smallsides, int targetdim) {
85  }
86 
92  static void HigherDimensionSides(int side, TPZStack<int> &high) {
93  }
95  static int NSideNodes(int side) {
96  return 1;
97  }
99  static int SideNodeLocId(int side, int node) {
100  return 0;
101  }
102 
104  static int NumSides() { return 1; }
106  static int NumSides(int dimension) { return 0; };
107 
109  static int NContainedSides(int side) {
110  return 1;
111  }
113  static int ContainedSideLocId(int side, int c) {
114  return 0;
115  }
116 
123  static void CenterPoint(int side, TPZVec<REAL> &center) {
124  }
125 
127  static bool IsInParametricDomain(const TPZVec<REAL> &pt, REAL tol = 1e-6){
128  return true;
129  }
130 
132  static void RandomPoint(TPZVec<REAL> &pt)
133  {
134 
135  }
136 
144  template<class T>
145  static bool CheckProjectionForSingularity(const int &side, const TPZVec<T> &xiInterior);
146 
147  template<class T>
148  static void MapToSide(int side, TPZVec<T> &InternalPar, TPZVec<T> &SidePar, TPZFMatrix<T> &JacToSide);
149 
150  static void ParametricDomainNodeCoord(int node, TPZVec<REAL> &nodeCoord);
151 
158  static MElementType Type();
160  static MElementType Type(int side) ;
161 
172  static TPZTransform<> SideToSideTransform(int sidefrom, int sideto) {
173  TPZTransform<> result(0,0);
174  return result;
175  }
183  TPZTransform<> result(0,0);
184  return result;
185  }
186 
188  TPZTransform<> t(0,0);
189  return t;
190  }
191 
197  static int GetTransformId(TPZVec<int64_t> &id);
198 
206  static int GetTransformId(int side, TPZVec<int64_t> &id);
207 
218  static TPZIntPoints *CreateSideIntegrationRule(int side, int order);
219 
222 
223  /* @} */
224 
232  static void GetSideHDivPermutation(int transformationid, TPZVec<int> &permgather)
233  {
234  permgather[0] = 0;
235  return;
236  }
237 
239  static constexpr REAL RefElVolume() {
240  return 0.;
241  }
242 
243  /* Given side and gradx the method returns directions needed for Hdiv space */
244  static void ComputeDirections(int side, TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &directions, TPZVec<int> &sidevectors);
246  {
247  sides[0] = 0;
248  dir[0] = 0;
249  bilinearounao[0] = 0;
250  }
251 
253  {
254  sides[0] = 0;
255  dir[0] = 0;
256  bilinearounao[0] = 0;
257  sidevectors[0] = 0;
258  }
259 
261  template <class TVar>
262  static void ComputeHDivDirections(TPZFMatrix<TVar> &gradx, TPZFMatrix<TVar> &directions)
263  {
264  }
265 
266 
270  static int NBilinearSides();
271  protected:
273  static int fPermutations [1][1];
274  };
275 
276 }
277 
278 #endif
TPZInt1Point IntruleType
Typedef to numerical integration rule.
Definition: tpzpoint.h:221
static int bilinearounao[81]
Definition: tpzcube.cpp:405
static void TShape(const TPZVec< T > &loc, TPZFMatrix< T > &phi, TPZFMatrix< T > &dphi)
Compute the shape being used to construct the x mapping from local parametric coordinates.
Definition: tpzpoint.cpp:19
static MElementType Type()
Returns the type of the element as specified in file pzeltype.h.
Definition: tpzpoint.cpp:40
To export a graphical one dimensional discontinuous element. Post processing.
Definition: pzgraphel1dd.h:22
int ClassId() const override
Define the class id associated with the class.
Definition: tpzpoint.cpp:129
static TPZTransform SideToSideTransform(int sidefrom, int sideto)
Returns the transformation which takes a point from the side sidefrom to the side sideto...
Definition: tpzpoint.h:172
static void ParametricDomainNodeCoord(int node, TPZVec< REAL > &nodeCoord)
Definition: tpzpoint.cpp:67
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
static void LowerDimensionSides(int side, TPZStack< int > &smallsides)
Get all sides with lower dimension on side.
Definition: tpzpoint.h:81
Templated vector implementation.
Defines the topology of a point. Topology It has a one side (the same element).
Definition: tpzpoint.h:34
static TPZIntPoints * CreateSideIntegrationRule(int side, int order)
Create an integration rule over side.
Definition: tpzpoint.cpp:34
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
TPZPoint()
Default constructor.
Definition: tpzpoint.h:47
static void GetSideHDivDirections(TPZVec< int > &sides, TPZVec< int > &dir, TPZVec< int > &bilinearounao, TPZVec< int > &sidevectors)
Definition: tpzpoint.h:252
static void Shape(TPZVec< REAL > &loc, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Definition: tpzpoint.h:53
static void LowerDimensionSides(int side, TPZStack< int > &smallsides, int targetdim)
Get all sides with lower dimension but equal to DimTarget on side.
Definition: tpzpoint.h:84
static void ComputeHDivDirections(TPZFMatrix< TVar > &gradx, TPZFMatrix< TVar > &directions)
Compute the directions of the HDiv vectors.
Definition: tpzpoint.h:262
Abstract class defining integration rules. Numerical Integration.
Definition: tpzintpoints.h:19
static int NumSides(int dimension)
Returns the number of connects for a set dimension // Jorge ???
Definition: tpzpoint.h:106
static void RandomPoint(TPZVec< REAL > &pt)
Generates a random point in the master domain.
Definition: tpzpoint.h:132
static int NumSides()
Returns number of connects of the element ???
Definition: tpzpoint.h:104
static const double tol
Definition: pzgeoprism.cpp:23
Groups all classes defining the structure of the master element.
Definition: PrismExtend.cpp:15
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
static constexpr REAL RefElVolume()
Volume of the master element (measure of the element)
Definition: tpzpoint.h:239
static int ContainedSideLocId(int side, int c)
Returns the local connect number of the connect "c" along side "side".
Definition: tpzpoint.h:113
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Definition: tpzpoint.cpp:137
Contains TPZMatrixclass which implements full matrix (using column major representation).
static int NContainedSides(int side)
Returns the number of nodes (not connectivities) associated with a side // Jorge - sides or nodes...
Definition: tpzpoint.h:109
static void HigherDimensionSides(int side, TPZStack< int > &high)
Returns all sides whose closure contains side.
Definition: tpzpoint.h:92
static int SideDimension(int side)
Returns the dimension of the side.
Definition: tpzpoint.h:76
static int NBilinearSides()
Definition: tpzpoint.cpp:55
static TPZTransform TransformElementToSide(int side)
Definition: tpzpoint.h:187
static int NSideNodes(int side)
Returns the number of nodes (not connectivities) associated with a side.
Definition: tpzpoint.h:95
A simple stack.
static void GetSideHDivPermutation(int transformationid, TPZVec< int > &permgather)
Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of o...
Definition: tpzpoint.h:232
static void MapToSide(int side, TPZVec< T > &InternalPar, TPZVec< T > &SidePar, TPZFMatrix< T > &JacToSide)
Definition: tpzpoint.cpp:63
static bool CheckProjectionForSingularity(const int &side, const TPZVec< T > &xiInterior)
Definition: tpzpoint.cpp:59
Integration rule for one point. Numerical Integration.
Definition: pzquad.h:478
MElementType
Define the element types.
Definition: pzeltype.h:52
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
static void CenterPoint(int side, TPZVec< REAL > &center)
Returns the barycentric coordinates in the master element space of the original element.
Definition: tpzpoint.h:123
Contains declaration of the TPZAxesTools class which implements verifications over axes...
static void GetSideHDivDirections(TPZVec< int > &sides, TPZVec< int > &dir, TPZVec< int > &bilinearounao)
Definition: tpzpoint.h:245
static void BlendFactorForSide(const int &side, const TPZVec< T > &xi, T &blendFactor, TPZVec< T > &corrFactorDxi)
Definition: tpzpoint.cpp:25
static TPZTransform TransformSideToElement(int side)
Returns the transformation which transform a point from the side to the interior of the element...
Definition: tpzpoint.h:182
Contains the TPZTransform<> class which implements an affine transformation between points in paramet...
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
virtual ~TPZPoint()
Default destructor.
Definition: tpzpoint.h:50
static int SideNodeLocId(int side, int node)
Returns the local node number of the node "node" along side "side".
Definition: tpzpoint.h:99
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
static bool IsInParametricDomain(const TPZVec< REAL > &pt, REAL tol=1e-6)
Verifies if the parametric point pt is in the element parametric domain.
Definition: tpzpoint.h:127
static void ComputeDirections(int side, TPZFMatrix< REAL > &gradx, TPZFMatrix< REAL > &directions, TPZVec< int > &sidevectors)
Definition: tpzpoint.cpp:123
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
static int fPermutations[1][1]
Valid permutations between nodes.
Definition: tpzpoint.h:273
void Read(TPZStream &buf, void *context) override
read objects from the stream
Definition: tpzpoint.cpp:133
static int GetTransformId(TPZVec< int64_t > &id)
Method which identifies the transformation based on the IDs of the corner nodes.
Definition: tpzpoint.cpp:95