NeoPZ
tpzellipse3d.h
Go to the documentation of this file.
1 
6 #ifndef TPZELLIPSE3D_H
7 #define TPZELLIPSE3D_H
8 
9 #include "pzgeoel.h"
10 #include "pznoderep.h"
11 #include "tpzline.h"
12 
13 #include <iostream>
14 
15 class TPZGeoMesh;
16 
17 namespace pzgeom
18 {
19 
24  class TPZEllipse3D : public pzgeom::TPZNodeRep<2,pztopology::TPZLine> {
25 
26  public:
29  enum {NNodes = 2};
32  public:
33 int ClassId() const override;
34 
35 
36  virtual void ParametricDomainNodeCoord(int64_t node, TPZVec<REAL> &nodeCoord);
37 
39  TPZEllipse3D(const TPZEllipse3D &cp,std::map<int64_t,int64_t> & gl2lcNdMap) : TPZRegisterClassId(&TPZEllipse3D::ClassId),pzgeom::TPZNodeRep<NNodes,pztopology::TPZLine>(cp,gl2lcNdMap),
41  {
42  }
45  fsAxeX(0.), fsAxeY(0.), fAxes(), fOrigin(),fAngleIni(0.), fAngleFinal(0.)
46  {
47  }
49  virtual ~TPZEllipse3D()
50  {
51  }
55  {
56  }
60  {
61  }
64  fsAxeX(0.), fsAxeY(0.), fAxes(), fOrigin(),fAngleIni(0.), fAngleFinal(0.)
65  {
66  }
67 
69  {
71  fsAxeX = cp.fsAxeX;
72  fsAxeY = cp.fsAxeY;
73  fAxes = cp.fAxes;
74  fOrigin = cp.fOrigin;
75  fAngleIni = cp.fAngleIni;
77  return *this;
78  }
79 
84  virtual void AdjustNodesCoordinates(TPZGeoMesh &mesh);
85 
92  void SetAxes(TPZVec<REAL> Origin, TPZVec<REAL> SemiAxeX, TPZVec<REAL> SemiAxeY, TPZGeoMesh &gmesh);
93 
94  /* brief compute the coordinate of a point given in parameter space */
95 // template<class T>
96 // void X(const TPZGeoEl &gel,TPZVec<T> &loc,TPZVec<T> &result) const
97 // {
98 // TPZFNMatrix<3*NNodes> coord(3,NNodes);
99 // CornerCoordinates(gel, coord);
100 // X(coord,loc,result);
101 // }
102 //
103  template<class T>
104  void GradX(TPZFMatrix<REAL> &cornerco, TPZVec<T> &par, TPZFMatrix<T> &gradx) const;
105 
106 
112  template<class T>
113  void X(TPZFMatrix<REAL> &nodeCoord,TPZVec<T> &qsi,TPZVec<T> &x) const;
114 
115 
116  static bool IsLinearMapping(int side)
117  {
118  return false;
119  }
120 
121  static std::string TypeName() { return "Linear";}
122  // static TPZGeoEl * CreateBCGeoEl(TPZGeoEl *orig, int side,int bc);
123 
125  // static TPZGeoEl *CreateGeoElement(TPZGeoMesh &mesh, MElementType type,
126  // TPZVec<int64_t>& nodeindexes,
127  // int matid,
128  // int64_t& index);
129 
130  void GetNodesCoords(TPZGeoMesh &mesh, TPZFMatrix<REAL> &nodes);
131 
132  void SetNodesCoords(TPZGeoMesh &mesh, TPZFMatrix<REAL> &nodes);
133 
134  double sAxeX()
135  {
136  return this->fsAxeX;
137  }
138  double sAxeY()
139  {
140  return this->fsAxeY;
141  }
143  {
144  return this->fOrigin;
145  }
146 
147  static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec<REAL> &lowercorner, TPZVec<REAL> &size);
148 
149 
150  private:
151 
152 
154  double ComputeAngle(TPZVec<REAL> &co) const;
155 
156 
157  double fsAxeX;//norma de fSemiAxeX
158 
159  double fsAxeY;//norma de fSemiAxeY
160 
162  // for any point on the 3D ellips with coordinate co:
163  // fAxes*(co-fOrigin) = coordinates in the local system (the third coordinate should be zero)
165 
167 
168  double fAngleIni = 0.;
169  double fAngleFinal = 0.;
170 
171  };
172 
173 };
174 
175 #endif
void X(TPZFMatrix< REAL > &nodeCoord, TPZVec< T > &qsi, TPZVec< T > &x) const
static REAL cornerco[8][3]
Implements a line. Utility.
Definition: pzline.h:18
TPZEllipse3D(const TPZEllipse3D &cp, TPZGeoMesh &)
Copy constructor.
Definition: tpzellipse3d.h:58
TPZEllipse3D & operator=(const TPZEllipse3D &cp)
Definition: tpzellipse3d.h:68
void GetNodesCoords(TPZGeoMesh &mesh, TPZFMatrix< REAL > &nodes)
Creates a geometric element according to the type of the father element.
static std::string TypeName()
Definition: tpzellipse3d.h:121
TPZEllipse3D(const TPZEllipse3D &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
Constructor.
Definition: tpzellipse3d.h:39
TPZEllipse3D(TPZVec< int64_t > &nodeindexes)
Constructor with node indexes given.
Definition: tpzellipse3d.h:63
virtual ~TPZEllipse3D()
Destructor.
Definition: tpzellipse3d.h:49
void SetAxes(TPZVec< REAL > Origin, TPZVec< REAL > SemiAxeX, TPZVec< REAL > SemiAxeY, TPZGeoMesh &gmesh)
Origin defines the translation of ellipse while semi-axes defines the rotation of ellipse...
Defines a linear geometric element which maps a line segment to an ellipse. Geometry.
Definition: tpzellipse3d.h:24
pztopology::TPZLine Top
Definition: tpzellipse3d.h:27
static bool IsLinearMapping(int side)
Definition: tpzellipse3d.h:116
virtual void ParametricDomainNodeCoord(int64_t node, TPZVec< REAL > &nodeCoord)
TPZManVector< REAL, 3 > fOrigin
Definition: tpzellipse3d.h:166
TPZFNMatrix< 9, REAL > fAxes
Rotation matrix where the axes correspond to rows of the matrix.
Definition: tpzellipse3d.h:164
TPZVec< REAL > Origin()
Definition: tpzellipse3d.h:142
Groups all classes defining the structure of the master element.
Definition: PrismExtend.cpp:15
double ComputeAngle(TPZVec< REAL > &co) const
Compute the angle of a coordinate as a function of the axes.
Contains the TPZNodeRep class which implements ... Clase intermediaria que guarda.
TPZEllipse3D(const TPZEllipse3D &cp)
Copy constructor.
Definition: tpzellipse3d.h:53
REAL co[8][3]
Coordinates of the eight nodes.
Defines the topology of a line element. Topology Sides 0 and 1 are vertices, side 2 is the line...
Definition: tpzline.h:38
Implements ... Geometry Topology.
Definition: pznoderep.h:40
TPZEllipse3D()
Default constructor.
Definition: tpzellipse3d.h:44
void SetNodesCoords(TPZGeoMesh &mesh, TPZFMatrix< REAL > &nodes)
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec< REAL > &lowercorner, TPZVec< REAL > &size)
Contains the TPZLine class which defines the topology of a line element.
Groups all classes which model the geometry.
Definition: pzgeopoint.cpp:18
int ClassId() const override
It is not linear mapping.
void GradX(TPZFMatrix< REAL > &cornerco, TPZVec< T > &par, TPZFMatrix< T > &gradx) const
virtual void AdjustNodesCoordinates(TPZGeoMesh &mesh)
Adjust node coordinates in case of does not belong to the ellipse arc defined by the given origin and...