... | @@ -138,13 +138,6 @@ dataV[ixyz + 1 * blocklength] = v_y; |
... | @@ -138,13 +138,6 @@ dataV[ixyz + 1 * blocklength] = v_y; |
|
dataV[ixyz + 2 * blocklength] = v_z;
|
|
dataV[ixyz + 2 * blocklength] = v_z;
|
|
```
|
|
```
|
|
|
|
|
|
## Time
|
|
|
|
To compute the time associated with a given `icycle`, we use the formula
|
|
|
|
```
|
|
|
|
time = t0 + dt * icycle;
|
|
|
|
```
|
|
|
|
If `dt` is negative then `time` parameter has to be extracted from the additional binary file of the name `prefix__t.wdat`. For more information, see the implementation of function [`wdata_get_time`(...)](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/blob/master/c/wdata.c#L562) from our C library.
|
|
|
|
|
|
|
|
Let's get back to the `*wtxt` file.
|
|
Let's get back to the `*wtxt` file.
|
|
|
|
|
|
# Tags
|
|
# Tags
|
... | @@ -205,7 +198,48 @@ The wtxt file can also contain info about additional text files associated with |
... | @@ -205,7 +198,48 @@ The wtxt file can also contain info about additional text files associated with |
|
Note, beside this info in the wtxt file, C library do not provide any extra functionality for text files.
|
|
Note, beside this info in the wtxt file, C library do not provide any extra functionality for text files.
|
|
```bash
|
|
```bash
|
|
# This tag indicates that the file prefix_myfile.txt also belongs to the dataset
|
|
# This tag indicates that the file prefix_myfile.txt also belongs to the dataset
|
|
# The tag is used only by VisIt for now
|
|
# The tag is used only by VisIt plugin
|
|
txt myfile.txt
|
|
txt myfile.txt
|
|
```
|
|
```
|
|
|
|
# Domain
|
|
|
|
## Coordinates
|
|
|
|
```
|
|
|
|
datadim 3 # for 2d case, you can skip tags nz, dz, z0
|
|
|
|
# for 1d case, you can skip tags ny,nz, dy,dz, y0,z0
|
|
|
|
|
|
|
|
nx 24 # number of points along the x-direction
|
|
|
|
ny 28 # number of points along the y-direction
|
|
|
|
nz 32 # number of points along the z-direction
|
|
|
|
dx 1 # spacing along the x-direction
|
|
|
|
# if dx` is negative, then the x-coordinate should be extracted from the extra file `prefix__x.wdat`.
|
|
|
|
dy 1 # spacing along the y-direction
|
|
|
|
# if dy` is negative, then the y-coordinate should be extracted from the extra file `prefix__y.wdat`.
|
|
|
|
dz 1 # spacing along the z-direction
|
|
|
|
# if dz` is negative, then the z-coordinate should be extracted from the extra file `prefix__z.wdat`.
|
|
|
|
x0 -12 # origin of x-axis, if not specified, then default x0=0
|
|
|
|
y0 -14 # origin of y-axis, if not specified, then default y0=0
|
|
|
|
z0 -16 # origin of z-axis, if not specified, then default z0=0
|
|
|
|
```
|
|
|
|
|
|
|
|
The coordinates are converted into an array index using row-major prescription
|
|
|
|
```c
|
|
|
|
// lattice indicase
|
|
|
|
int ix=...; // ix in [0,nx)
|
|
|
|
int iy=...; // iy in [0,ny)
|
|
|
|
int iz=...; // iz in [0,nz)
|
|
|
|
|
|
|
|
// coordinate decoding
|
|
|
|
double x = x0 + dx*ix;
|
|
|
|
double y = y0 + dy*iy;
|
|
|
|
double z = z0 + dz*iz;
|
|
|
|
|
|
|
|
// array index: 3d case
|
|
|
|
int ixyz = iz + nz*iy + nz*ny*ix;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Time
|
|
|
|
To compute the time associated with a given `icycle`, we use the formula
|
|
|
|
```
|
|
|
|
time = t0 + dt * icycle;
|
|
|
|
```
|
|
|
|
If `dt` is negative, then the `time` parameter has to be extracted from the additional binary file of the name `prefix__t.wdat`. For more information, see the implementation of function [`wdata_get_time`(...)](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/blob/master/c/wdata.c#L562) from our C library. |
|
|
|
\ No newline at end of file |