NeoPZ
pzgraphel1dd.cpp
Go to the documentation of this file.
1 
6 #include "pzgraphel1dd.h"
7 #include "pzgraphmesh.h"
8 #include "pzcompel.h"
9 #include "pzgeoel.h"
10 
11 using namespace std;
12 
14 {
15 }
16 
18 {
19  int res = fGraphMesh->Res();
20  return((1 << res)+1);
21 }
22 
24  int res = fGraphMesh->Res();
25  int imax = (1<<res);
26  return imax;
27 }
28 
30  return fConnect->FirstPoint() + co[0];
31 }
32 
33 void TPZGraphEl1dd::FirstIJ(int no, TPZVec<int> &co, int &incr) {
34  co[0]=0; // @omar:: I think the next line does not make sense
35 // for (i=0;i<3;i++) co[i]=0;
36  incr = 1;
37 }
38 
39 void TPZGraphEl1dd::NextIJ(int no,TPZVec<int> &co, int incr) {
40 
41  co[0]+=incr;
42 }
43 
45  int res = fGraphMesh->Res();
46  int imax = 1 << res;
47  ostream &out = fGraphMesh->Out();
48  int64_t ip = fId;
49  TPZVec<int> co0(3,0), co1(3,0);
50 
51  if(st == EV3DStyle) ip++;
52  for(int i=0;i<imax;i++) {
53  if(st == EV3DStyle) out << ip << " 1 ";
54  if(st == EVTKStyle) out << "2 ";
55  if(st == EMVStyle) out << ip << " 1 1 1 ";
56  ip++;
57  co0[0]= i;
58  co1[0]=i+1;
59  out << EqNum(co0) << " " << EqNum(co1) << endl;
60  }
61 }
62 
63 void TPZGraphEl1dd::Print(ostream &out) {
64  out << "TPZGraphEl1dd element id = " << fId << endl;
65  out << "Node numbers : ";
66  out << fConnect->SequenceNumber() << " ";
67  out << endl << "First Equation : ";
68  out << fConnect->FirstPoint() << " ";
69  out << endl;
70 }
71 
73  switch(st)
74  {
75  case(EVTKStyle):
76  return 3;
77  default:
78  return -1;
79  }
80 }
81 
83 {
84  return 2;
85 }
Represents a graphical mesh used for post processing purposes. Post processing.
Definition: pzgraphmesh.h:34
virtual void NextIJ(int no, TPZVec< int > &co, int incr)
virtual int NNodes()
Number of corner nodes (geometric information)
std::ostream & Out()
Definition: pzgraphmesh.h:80
void Print(std::ostream &out)
virtual int NPoints(TPZGraphNode *n)
Number of points to graphical resolution.
Contains declaration of TPZCompEl class which defines the interface of a computational element...
virtual int64_t EqNum(TPZVec< int > &co)
Number of equations.
virtual void FirstIJ(int no, TPZVec< int > &co, int &incr)
virtual void Connectivity(TPZDrawStyle st=EDXStyle)
Set dx style for connectivity information.
TPZGraphNode * fConnect
Graphical node (connect) to discontinuous graphical element.
Definition: pzgraphel1dd.h:56
int64_t FirstPoint()
Definition: pzgraphnode.cpp:55
int64_t fId
Id of the graphical element.
Definition: pzgraphel.h:98
Definition: TPZDrawStyle.h:12
int Res()
Get the resolution of the draw.
Definition: pzgraphmesh.h:64
Definition: TPZDrawStyle.h:12
TPZGraphMesh * fGraphMesh
Graphical mesh associated with graphical element.
Definition: pzgraphel.h:87
int64_t SequenceNumber()
Definition: pzgraphnode.h:38
string res
Definition: test.py:151
Definition: TPZDrawStyle.h:12
Contains the TPZGraphMesh class which represents a graphical mesh used for post processing purposes...
REAL co[8][3]
Coordinates of the eight nodes.
virtual int NElements()
TPZGraphEl1dd(TPZCompEl *ce, TPZGraphMesh *gg)
Constructor for graphical element to computational one dimensional discontinuous element.
Abstract class to graphical one-, two- and three-dimensional element. Post processing.
Definition: pzgraphel.h:23
Contains the TPZGraphEl1dd class which implements the graphical one dimensional discontinuous element...
virtual int ExportType(TPZDrawStyle st)
Sets the style to export (format)
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