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
ADIscheme.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.
Setup
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:
-
Navigate to your project's build directory.
-
Run the following CMake command with the
-DTUG_NAAICE_EXAMPLE=ONoption to generate the makefiles:cmake -DTUG_NAAICE_EXAMPLE=ON .. -
After CMake configuration is complete, build the
naaiceexecutable by runningmake:make naaice -
Once the compilation is successful, navigate to the build directory by
cd <build_dir>/naaice -
Finally, run the
naaiceexecutable to generate the benchmark output:./naaice
Output Files
Thomas_<n>.csv
These files contain the values of the tridiagonal coefficient matrix A, where:
Aarepresents the leftmost value,Abrepresents the middle value, andAcrepresents 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!