-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFILE_LAYOUT.txt
60 lines (47 loc) · 1.79 KB
/
FILE_LAYOUT.txt
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
// Data is stored in Little Endian byte order
- Header. Length: 16 Byte
"IonSolver setup\n" 16 Byte
- Saved LbmConfig. Does not save the graphics config. Length: 62 Bytes
velocity_set: 1 Byte (u8 casted enum)
relaxation_time: 1 Byte (u8 casted enum)
float_type: 1 Byte (u8 casted enum)
unit_m: 4 Byte (f32)
unit_kg: 4 Byte (f32)
unit_s: 4 Byte (f32)
unit_a: 4 Byte (f32)
n_x: 4 Byte (u32)
n_y: 4 Byte (u32)
n_z: 4 Byte (u32)
fixed_domains: 1 Byte (bool) // Should the following domain sizes be used or dynamically generated?
d_x: 4 Byte (u32)
d_y: 4 Byte (u32)
d_z: 4 Byte (u32)
nu: 4 Byte (f32)
fx: 4 Byte (f32)
fy: 4 Byte (f32)
fz: 4 Byte (f32)
extensions: 1 Byte (4 bools in a u8) // bit 0: equilibrium_boundaries; bit 1: volume_force; bit 2: force_field; bit 3: magneto_hydro
induction_range: 1 byte (u8)
N = n_x * n_y * n_z // N is total number of cells, derived from other values
// all values of one type together to make reading easier
--Section Flags: N Byte--
flags: 1 Byte (u8)
--Section Densities: 4N Byte--
density: 4 Byte (f32)
--Section Velocities: 12N Byte--
// split into sections for x, y and z like in opencl code
velocity: 12 Byte (f32; 3)
--Section Charges: 4N Byte-- // charges in fluid, different from fixed charges
charge: 4 Byte (f32)
// Length of these is not related to Sim size -------------------------------------------------
N_C: 4 Byte (u32) // number of fixed charges, only relevant for reading, discarded after
--Section Fixed Charges: 12N_C Byte--
//u64 cell index and f32 Charge
index: 8 Byte (u64)
charge: 4 Byte (f32)
N_M: 4 Byte (u32) // number of magnets, only relevant for reading, discarded after
--Section Magnets: 20N_M Byte--
//u64 cell index and 3*f32 magnetization vector
index: 8 Byte (u64)
magnetization: 12 Byte (f32; 3)
<EOF>