forked from eelcovv/gridpro2Foam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Face.hpp
66 lines (60 loc) · 1.74 KB
/
Face.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* 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 FACE_HPP
#define FACE_HPP
#include "Node.hpp"
#include <string>
#include <math.h>
#include <stdio.h>
class Face
{ friend class Node;
private:
Node *n0, *n1, *n2, *n3;
int idFace;
int owner, neighbor;
int BC;
int internalBC;
int BCorg; // only for debug
int sumId;
class Face* matchingFace;
// for periodic BCs
bool isPeriodic;
int sumPeriodicId;
int idPeriodicFace;
short periodicSide;
public:
Face(Node *n0, Node *n1, Node *n2, Node *n3, int setOwner, int setNeighbor, int setBC);
~Face();
void Print(FILE *f = stdout);
void PrintDebug(FILE *f = stdout);
void AnalysePeriodic(PeriodicStats *stats, int BC);
void WriteTecplot(FILE *f = stdout);
void SetIdFace(int setIdFace);
int GetIdFace() {return idFace;};
int GetOwner();
int GetNeighbor();
void SetOwner(int setOwner);
void SetNeighbor(int setNeighbor);
bool MergeNeeded(Face *other);
int SumId();
void ComputeSumPeriodicId();
bool PeriodicMatch(Face *x);
int SumPeriodicId();
int GetBCorg() {return BCorg;};
int GetBC() {return BC;};
void SetPeriodic() { isPeriodic=true;};
bool IsInternal() { return BC==-1;};
bool IsPeriodic() { return isPeriodic;};
void SetMatchingFace(Face *face) { matchingFace=face;};
void SetPeriodicFaceId(int x) { idPeriodicFace=x;};
int GetPeriodicFaceId() { return idPeriodicFace;};
int GetPeriodicSide() { return periodicSide;};
};
#endif