Unstruct2D  1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Unstructured Triangular Grids
 All Classes Files Functions Variables Typedefs Enumerations Macros
geometry.h
Go to the documentation of this file.
1 //*****************************************************************************
6 //
7 // (c) J. Blazek, CFD Consulting & Analysis, www.cfd-ca.de
8 // Created February 15, 2014
9 // Last modification: June 27, 2014
10 //
11 //=============================================================================
12 //
13 // This program is free software; you can redistribute it and/or
14 // modify it under the terms of the GNU General Public License
15 // as published by the Free Software Foundation; either version 2
16 // of the License, or (at your option) any later version.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 //
27 //*****************************************************************************
28 
29 #ifndef GEOMETRY_H_INCLUDED
30 #define GEOMETRY_H_INCLUDED
31 
32 #include <string>
33 #include "defs.h"
34 
41 class Geometry
42 {
43 public:
44 
45  int nNodes;
52  int nndInt,
53  nEdges,
54  nedInt,
55  nTria,
56  nSegs,
57  nBfaces,
58  nBnodes;
60  int *btype;
69  typedef struct T_TRIA
71  {
72  int node[3];
73  } TRIA;
76  typedef struct T_EDGE
78  {
79  int i, j;
80  } EDGE;
85  typedef struct T_BFACE
87  {
88  int node1,
89  node2;
90  } BFACE;
93  typedef struct T_BNODE
95  {
96  int node,
97  dummy,
99  edge;
100  } BNODE;
103  typedef struct T_IBOUND
105  {
107  bnodeIndex;
108  } IBOUND;
112  yref,
113  cref;
126  std::string fnameGrid;
127  std::string *bname;
129  // functions
130 
131  Geometry();
132  ~Geometry();
133  void ComputeMetrics();
134  void GenerateEdgelist();
135  int GetNumberBoundNodes( int btypeFrom, int btypeTo ) const;
136  void ReadGrid();
137 
138 private:
139 
141  struct EDGEI
142  {
143  int j,
144  edge;
146  EDGEI *next;
147  };
148 
150  typedef struct T_EDGELIST
151  {
152  EDGEI *list;
153  } EDGELIST;
154  EDGELIST *tmpElist;
157  // functions
158 
159  Geometry( const Geometry &geometry ); // override default copy constructor
160  Geometry & operator = (const Geometry &geometry); // and assignment operator
161  void CheckMetrics();
162  void DeleteTmpElist();
163  void DummyNodes();
164  void FaceVectorsSymm();
165  void FaceVectorsVolumes();
166  void FaceVectorsVolumesBound();
167  void VolumeProjections();
168 };
169 
170 #endif // GEOMETRY_H_INCLUDED
Data related to boundary nodes.
Definition: geometry.h:94
TRIA * tria
Definition: geometry.h:74
~Geometry()
Definition: geometry.cpp:72
EDGE * edge
Definition: geometry.h:81
NODE * sproj
Definition: geometry.h:123
int bnodeIndex
Definition: geometry.h:106
NODE * coords
Definition: geometry.h:115
IBOUND * ibound
Definition: geometry.h:109
int nndInt
Definition: geometry.h:52
Coordinates of a grid node.
Definition: defs.h:73
struct Geometry::T_TRIA TRIA
Nodes of a triangle.
int node1
Definition: geometry.h:88
REAL * vol
Definition: geometry.h:120
int node2
Definition: geometry.h:88
int nTria
Definition: geometry.h:52
int nSegs
Definition: geometry.h:52
NODE * sij
Definition: geometry.h:116
int nEdges
Definition: geometry.h:52
Geometry()
Definition: geometry.cpp:34
void GenerateEdgelist()
Definition: generateEdgelist.cpp:43
int node
Definition: geometry.h:96
struct Geometry::T_BFACE BFACE
Nodes defining a face.
struct Geometry::T_IBOUND IBOUND
Pointer from boundary segment to its faces and nodes.
int nBnodes
Definition: geometry.h:52
Definition: geometry.h:41
void ComputeMetrics()
Definition: computeMetrics.cpp:39
struct Geometry::T_EDGE EDGE
Nodes of an edge.
Nodes defining a face.
Definition: geometry.h:86
NODE * sbf
Definition: geometry.h:121
std::string * bname
Definition: geometry.h:127
int nedInt
Definition: geometry.h:52
int bfaceIndex
Definition: geometry.h:106
int edge
Definition: geometry.h:96
REAL yref
Definition: geometry.h:111
REAL xref
Definition: geometry.h:111
std::string fnameGrid
Definition: geometry.h:126
BFACE * bface
Definition: geometry.h:91
Nodes of an edge.
Definition: geometry.h:77
REAL cref
Definition: geometry.h:111
Nodes of a triangle.
Definition: geometry.h:70
BNODE * bnode
Definition: geometry.h:101
double REAL
Definition: defs.h:58
int GetNumberBoundNodes(int btypeFrom, int btypeTo) const
Definition: getNumberBoundNodes.cpp:37
int * btype
Definition: geometry.h:60
int dummy
Definition: geometry.h:96
Pointer from boundary segment to its faces and nodes.
Definition: geometry.h:104
int nNodes
Definition: geometry.h:45
int nBfaces
Definition: geometry.h:52
struct Geometry::T_BNODE BNODE
Data related to boundary nodes.
void ReadGrid()
Definition: readGrid.cpp:44