Peano
Loading...
Searching...
No Matches
TP_ConservedVectorNames.h
Go to the documentation of this file.
1#pragma once
2
20
21namespace TP {
23
24const int g11 = 0;
25const int g12 = 1;
26const int g13 = 2;
27const int g22 = 3;
28const int g23 = 4;
29const int g33 = 5;
30const int K11 = 6;
31const int K12 = 7;
32const int K13 = 8;
33const int K22 = 9;
34const int K23 = 10;
35const int K33 = 11;
36const int Z1 = 12;
37const int Z2 = 13;
38const int Z3 = 14;
39const int Theta = 15;
40const int lapse = 16;
41const int shift1 = 17;
42const int shift2 = 18;
43const int shift3 = 19;
44const int b1 = 20;
45const int b2 = 21;
46const int b3 = 22;
47const int A1 = 23;
48const int A2 = 24;
49const int A3 = 25;
50const int B11 = 26;
51const int B21 = 27;
52const int B31 = 28;
53const int B12 = 29;
54const int B22 = 30;
55const int B32 = 31;
56const int B13 = 32;
57const int B23 = 33;
58const int B33 = 34;
59const int D111 = 35;
60const int D112 = 36;
61const int D113 = 37;
62const int D122 = 38;
63const int D123 = 39;
64const int D133 = 40;
65const int D211 = 41;
66const int D212 = 42;
67const int D213 = 43;
68const int D222 = 44;
69const int D223 = 45;
70const int D233 = 46;
71const int D311 = 47;
72const int D312 = 48;
73const int D313 = 49;
74const int D322 = 50;
75const int D323 = 51;
76const int D333 = 52;
77const int K0 = 53;
78
79// total length of conserved vector
80const int Qlen = 54;
81
82/************************** Syntactic sugar (example from SRHD) ********************************/
83/************************** Just for placing it somewhere, currently not used ******************/
84
85// Method 1: C++ namespaced constants, as present here.
86
87// Method 2:
88// Labels for indices into Q and V, used only in the local scope. However, the C++ namespace
89// allows the same just with a cleaner notation.
96/* Usage:
97 function foo(double* Q, double* V) {
98 DEFINE_LABELS;
99 Q[rho] = V[p];
100 }
101 You can archieve the same when writing
102 function foo(double* Q, double* V) {
103 using namespace TP::Z4VectorShortcuts;
104 Q[rho] = V[p];
105 }
106*/
107
108
109// direct references deep into X (might be named V, Q, S, whatever)
110// Pro: More natural, shorter names for fields
111// Contra: Can only be used for one state vector in a scope.
112// Will produce a lot of warnings when -Wunused-but-set-variable warnings is active
114/* Usage:
115 function foo(double* Q) {
116 SHORTHANDS(Q);
117 rho = p*p + vx;
118 }
119*/
120
121} // namespace Z4VectorShortcuts
122} // namespace TP
123
This file contains aliases for making access to the long state vector Q as used eg.