NeoPZ
pzgraphel.h
Go to the documentation of this file.
1 
6 #ifndef GRAFELH
7 #define GRAFELH
8 
9 #include "pzcompel.h"
10 #include "pzvec.h"
11 #include "TPZDrawStyle.h"
12 
13 #include <iostream>
14 class TPZGraphMesh;
15 class TPZGraphNode;
16 template <class>
17 class TPZBlock;
18 
23 class TPZGraphEl : public TPZSavable {
24 public:
26  TPZGraphEl(TPZCompEl *cel, TPZGraphMesh *gmesh, TPZGraphNode **connectvec);
28  TPZGraphEl(TPZCompEl *cel, TPZGraphMesh *gmesh, TPZGraphNode *&connect);
30  virtual ~TPZGraphEl(void);
31 
32  static int StaticClassId();
33 
34  virtual int ClassId() const override;
35 
36  virtual void Read(TPZStream &buf, void *context) override;
37  virtual void Write(TPZStream &buf, int withclassid) const override;
38 
40  virtual int NConnects() = 0;
42  int64_t Id() {return fId;}
44  virtual MElementType Type() = 0;
45 
47  virtual int ExportType(TPZDrawStyle st) = 0;
49  virtual int NNodes() = 0;
50 
52  virtual TPZGraphNode *Connect(int64_t con) = 0;
54  void SetId(int64_t id) { fId = id;}
55 
57  virtual int NPoints(TPZGraphNode *n) = 0;
58 
59  virtual int NElements() = 0;
61  virtual void SetNode(int64_t i,TPZGraphNode *n);
62 
64  virtual int Dimension() = 0;
65 
67  virtual void Connectivity(TPZDrawStyle st = EDXStyle) = 0;
69  void DrawCo(TPZGraphNode *n, TPZDrawStyle st);
70 
73  void DrawSolution(TPZGraphNode *n,int solind, TPZDrawStyle st);
75 
77  void Print(std::ostream &out);
78 
80  virtual int64_t EqNum(TPZVec<int> &co) = 0;
81 
82 
83 protected:
88 
89  virtual void FirstIJ(int connect, TPZVec<int> &co, int &incr) = 0;
90 
91  virtual void NextIJ(int connect, TPZVec<int> &co, int incr) = 0;
92 
94  int ConnectNum(TPZGraphNode *n);
95 
96 protected:
98  int64_t fId;
99 
101  virtual void QsiEta(TPZVec<int> &i, int imax, TPZVec<REAL> &qsieta);
102 
103 };
104 
105 #endif
Represents a graphical mesh used for post processing purposes. Post processing.
Definition: pzgraphmesh.h:34
virtual int NConnects()=0
Number of connects for the element.
virtual void Read(TPZStream &buf, void *context) override
read objects from the stream
Definition: pzgraphel.cpp:192
virtual int Dimension()=0
the parametric dimension of the element
Contains declaration of TPZCompEl class which defines the interface of a computational element...
Templated vector implementation.
int64_t Id()
Get the Id of the graphical element.
Definition: pzgraphel.h:42
virtual int NElements()=0
void DrawCo(TPZGraphNode *n, TPZDrawStyle st)
Draw coordinates of the graphical node.
Definition: pzgraphel.cpp:79
int64_t fId
Id of the graphical element.
Definition: pzgraphel.h:98
static int StaticClassId()
Definition: pzgraphel.cpp:184
virtual void FirstIJ(int connect, TPZVec< int > &co, int &incr)=0
Definition: TPZDrawStyle.h:12
virtual void SetNode(int64_t i, TPZGraphNode *n)
Sets a ith graphical node.
Definition: pzgraphel.cpp:55
virtual int64_t EqNum(TPZVec< int > &co)=0
Number of equations.
virtual int ClassId() const override
Define the class id associated with the class.
Definition: pzgraphel.cpp:188
virtual int NNodes()=0
Number of corner nodes (geometric information)
virtual void QsiEta(TPZVec< int > &i, int imax, TPZVec< REAL > &qsieta)
This method maps the index of a point to parameter space as a function of the number of divisions...
Definition: pzgraphel.cpp:62
TPZGraphMesh * fGraphMesh
Graphical mesh associated with graphical element.
Definition: pzgraphel.h:87
virtual void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Definition: pzgraphel.cpp:198
REAL co[8][3]
Coordinates of the eight nodes.
void SetId(int64_t id)
Set graphical element id.
Definition: pzgraphel.h:54
virtual void Connectivity(TPZDrawStyle st=EDXStyle)=0
Set dx style for connectivity information.
void DrawSolution(TPZGraphNode *n, TPZBlock< REAL > &Sol, TPZDrawStyle st)
Draw solution of the graphical node.
Definition: pzgraphel.cpp:110
void Print(std::ostream &out)
Print the information of the graphical element.
Definition: pzgraphel.cpp:170
int ConnectNum(TPZGraphNode *n)
Returns the number of the graphical node in the vector of connects.
Definition: pzgraphel.cpp:72
Implements block matrices. Matrix utility.
MElementType
Define the element types.
Definition: pzeltype.h:52
TPZGraphEl(TPZCompEl *cel, TPZGraphMesh *gmesh, TPZGraphNode **connectvec)
Constructor of the graphical element.
Definition: pzgraphel.cpp:14
TPZCompEl * fCompEl
Computational element associated with graphical element.
Definition: pzgraphel.h:85
virtual int ExportType(TPZDrawStyle st)=0
Sets the style to export (format)
virtual int NPoints(TPZGraphNode *n)=0
Number of points to graphical resolution.
Abstract class to graphical one-, two- and three-dimensional element. Post processing.
Definition: pzgraphel.h:23
virtual ~TPZGraphEl(void)
Default destructor.
Definition: pzgraphel.cpp:58
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
virtual TPZGraphNode * Connect(int64_t con)=0
Return the graphical connect.
virtual MElementType Type()=0
Get the type of the graphical element.
virtual void NextIJ(int connect, TPZVec< int > &co, int incr)=0
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
To export a graphical node. Post processing.
Definition: pzgraphnode.h:24
TPZDrawStyle
Definition: TPZDrawStyle.h:12