forked from SCOREC/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphOutput.h
162 lines (152 loc) · 4.37 KB
/
phOutput.h
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#ifndef PH_OUTPUT_H
#define PH_OUTPUT_H
#include "phInput.h"
#include "phBlock.h"
#include "phBC.h"
namespace apf {
class Mesh;
class MeshEntity;
}
struct GRStream;
namespace ph {
struct EnsaArrays
{
double* coordinates;
/* describes inter-part connectivity,
see ph::encodeILWORK */
int* ilwork;
/* describes inter-part element connectivity,
see ph::encodeILWORKF */
int* ilworkf;
/* periodic masters array, one per node... */
int* iper;
/* note: int will overflow at about 2 billion total nodes */
int* globalNodeNumbers;
/* ien[i][j][k] is the local vertex id of
vertex k of
element j of
interior block i */
int*** ien;
/* ienb[i][j][k] is the local vertex id of
vertex k of
element j of
boundary block i */
int*** ienb;
/* ienif0,1[i][j][k] are the local vertex id of
vertex k of
element j of
interface block i
ienif0 and ienif1 correspond to the two elements on the interface
*/
int*** ienif0;
int*** ienif1;
/* mattype[i][j] is the material type of
element j of
interior block i */
int** mattype;
/* mattypeb[i][j] is the material type of
element j of
boundary block i */
int** mattypeb;
/* mattypeif0,1[i][j] are the material types of
element j of
interface blocks 0,1 i */
int** mattypeif0;
int** mattypeif1;
/* ibcb[i][j][k] is the natural boundary condition
status code
number k in [0,1] of
element j of
boundary block i */
/* ibcb (part 0) has these bits:
MF NP TV HF TW F1 F2 F3 F4 TVM
0 1 2 3 4 5 6 7 8 9
part 1 is just the value of SID */
int*** ibcb;
/* bcb[i][j][k] is the natural boundary condition
value for
boundary condition k of
element j of
boundary block i */
/* bcb is organized as follows:
MF NP TV HF F1 F2 F3 F4 --TVM---
0 1 2 3 4 5 6 7 8 9 10 11 12 */
double*** bcb;
/* nbc[i] is the index into essential boundary condition
arrays of local node i (probably ;) */
int* nbc;
/* ibc[i] is the essential boundary condition
status code of essential BC node i */
/* ibc bits are as follows:
var: rho t p u v w sc1 sc2 sc3 sc4 perio --NULL-- eu ev ew
bit: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
int* ibc;
/* bc[i][j] is the essential boundary condition
value of
essential boundary condition j of
essential BC node i */
/* bc is organized as follows:
var: rho t p c11 c12 c13 m1 c21 c22 c23 m2 theta sc1 sc2 sc3 sc4 ec11 ec12 ec13 em1 ec21 ec22 ec23 em2
idx: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
double** bc;
/* encodes part-local element to element connectivity */
int* ienneigh;
/* encodes parallel communication between mesh edges */
int* ilworkl;
/* tetrahedra to local edges, already in FORTRAN order and from 1 */
int* iel;
/* edges to tetrahedra offsets */
int* ileo;
/* edges to tetrahedra adjacencies */
int* ile;
/* layered mesh growth curves: first layer thickness */
double* gcflt;
/* layered mesh growth curves: growth ratio */
double* gcgr;
/* layered mesh growth curves: number of vertices on each growth curve */
int* igcnv;
/* layered mesh growth curves: list of vertices */
apf::MeshEntity** igclv;
/* layered mesh growth curves: list of vertice IDs */
int* igclvid;
/* mesh to geometry, classification info (dim and tag) */
int* m2gClsfcn;
/* mesh to geometry, parametric coordinate */
double* m2gParCoord;
/* an integer to indicate if a vertex is on interface */
int* interfaceFlag;
/* IDs of rigid bodies */
int* rigidBodyIDs;
/* model tags of rigid bodies */
int* rigidBodyMTs;
/* an integer to indicate rigid body tag of a vertex */
int* rigidBodyTag;
};
struct Output
{
~Output();
Input* in;
apf::Mesh* mesh;
int nOverlapNodes;
int nOwnedNodes;
int nBoundaryElements;
int nInterfaceElements;
int nMaxElementNodes;
int nEssentialBCNodes;
int nOverlapEdges;
int nlwork; /* size of arrays.ilwork */
int nlworkf; /* size of arrays.ilworkf */
int nlworkl; /* size of arrays.ilworkl */
int nGrowthCurves; /* number of growth curves */
int nLayeredMeshVertices; /* number of layered mesh vertices */
bool hasDGInterface;
int numRigidBody;
FILE* (*openfile_write)(Output& out, const char* path);
GRStream* grs;
AllBlocks blocks;
EnsaArrays arrays;
};
void generateOutput(Input& in, BCs& bcs, apf::Mesh* mesh, Output& o);
void writeGeomBC(Output& o, std::string path, int timestep_or_dat = 0);
}
#endif