-
Notifications
You must be signed in to change notification settings - Fork 3
/
Node.hpp
53 lines (47 loc) · 1.37 KB
/
Node.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* This file belongs to the GridPro2FOAM distribution
Developed by Vincent Rivola and Martin Spel
R.Tech SARL
Parc Technologique Cap Delta
09340 Verniolle
France
For contact information: http://www.rtech.fr/contact.html
or email: support@rtech-engineering.com
*/
#ifndef NODE_HPP
#define NODE_HPP
#include <string>
#include <map>
#include <stdio.h>
using namespace std;
class PeriodicStats;
class Node
{ friend class Face;
friend class PeriodicStats;
private:
double x, y, z;
int id;
Node *equivalent;
map<int, Node*> periodicNeighbor;
bool isBoundaryNode;
map <int, short> periodicSide; // which side of the periodic surface: -1, 0 (matching) or 1
public:
Node(double x=0, double y=0, double z=0, bool setBoundaryNode=false);
~Node();
void SetEquivalent(Node *n2, bool debug=false);
void PrintEquivalent();
void PrintDebug(FILE *f = stdout);
void AnalysePeriodic(PeriodicStats *stats, int BC);
Node* GetEquivalent() {return equivalent;};
void Print(FILE *f = stdout);
void PrintTecplot(FILE *f = stdout);
double Distance(Node *n2);
void SetId(int setId);
int GetId();
int GetRealId() {return id;};
void SetPeriodicNeighbor(int BC, Node *n2);
int GetPeriodicId(int BC);
void SetPeriodicSide(int BC, short n);
short GetPeriodicSide(int BC);
};
#include "PeriodicStats.hpp"
#endif