tug/naaice/README.md
2023-09-06 14:25:02 +02:00

73 lines
2.5 KiB
Markdown

This directory contains a concise benchmark designed for validating FPGA
offloading of the Thomas algorithm, primarily employed for solving linear
equation systems structured within a tridiagonal matrix.
# Benchmark Setup
The benchmark involves a domain measuring $0.5 \text{cm} \times 1 \text{cm}$,
divided into a grid of dimensions $10 \times 5$. Each grid cell initially
contains a specific concentration. The concentration in the first half along the
x-dimension is set at $6.92023 \times 10^{-7}$, while in the second half, it’s
$2.02396 \times 10^{-8}$, creating a concentration gradient along the y-axis at
the center of the grid.
To achieve concentration equilibrium, we employ a simulation based on a
heterogeneous 2D-ADI BTCS diffusion approach, detailed in the
[ADI<sub>scheme.pdf</sub>](../doc/ADI_scheme.pdf) file. In the x-direction,
diffusion coefficients range from $\alpha = 10^{-9}$ to $10^{-10}$, while in the
y-direction, a constant value of $5 \times 10^{-10}$ is applied. A closed
boundary condition is implemented, meaning concentrations cannot enter or exit
the system. The diffusion process is simulated for a single iteration with a
time step ($\Delta t$) of 360 seconds.
# Usage
To generate new makefiles using the `-DTUG_NAAICE_EXAMPLE=ON` option in CMake,
compile the executable, and run it to generate the benchmark output, follow
these steps:
1. Navigate to your project's build directory.
2. Run the following CMake command with the `-DTUG_NAAICE_EXAMPLE=ON` option to
generate the makefiles:
cmake -DTUG_NAAICE_EXAMPLE=ON ..
3. After CMake configuration is complete, build the `naaice` executable by running `make`:
make naaice
4. Once the compilation is successful, navigate to the build directory by `cd
<build_dir>/naaice`
5. Finally, run the `naaice` executable to generate the benchmark output:
./naaice
## Output Files
### `Thomas_<n>.csv`
These files contain the values of the tridiagonal coefficient matrix $A$, where:
- $Aa$ represents the leftmost value,
- $Ab$ represents the middle value, and
- $Ac$ represents the rightmost value of one row of the matrix.
Additionally, the corresponding values of the right-hand-side vector $b$ are
provided.
Since the 2D-ADI BTCS scheme processes each row first and then proceeds
column-wise through the grid, each iteration is saved separately in
consecutively numbered files.
### `BTCS_5_10_1.csv`
The result of the simulation, **separated by whitespaces**!