NuSiF-Solver/BasicSolver/2D-seq-pt
2023-08-06 21:22:54 +02:00
..
src Working basic PT code 2023-08-06 21:22:54 +02:00
animate.plot Working basic PT code 2023-08-06 21:22:54 +02:00
canal.par Working basic PT code 2023-08-06 21:22:54 +02:00
config.mk Particle Tracer work in progress 2023-08-05 19:35:16 +02:00
dcavity.par Initial checkin 2023-02-05 07:34:23 +01:00
include_CLANG.mk Initial checkin 2023-02-05 07:34:23 +01:00
include_GCC.mk Initial checkin 2023-02-05 07:34:23 +01:00
include_ICC.mk Initial checkin 2023-02-05 07:34:23 +01:00
Makefile Initial checkin 2023-02-05 07:34:23 +01:00
output.txt Working basic PT code 2023-08-06 21:22:54 +02:00
particles_0.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_1.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_2.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_3.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_4.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_5.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_6.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_7.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_8.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_9.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_10.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_11.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_12.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_13.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_14.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_15.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_16.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_17.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_18.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_19.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_20.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_21.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_22.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_23.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_24.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_25.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_26.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_27.dat Working basic PT code 2023-08-06 21:22:54 +02:00
particles_28.dat Working basic PT code 2023-08-06 21:22:54 +02:00
pressure.dat Particle Tracer work in progress 2023-08-05 19:35:16 +02:00
README.md Initial checkin 2023-02-05 07:34:23 +01:00
surface.plot Initial checkin 2023-02-05 07:34:23 +01:00
trace.gif Working basic PT code 2023-08-06 21:22:54 +02:00
vector.plot Initial checkin 2023-02-05 07:34:23 +01:00
velocity.dat Particle Tracer work in progress 2023-08-05 19:35:16 +02:00
velocity.png Particle Tracer work in progress 2023-08-05 19:35:16 +02:00

C source skeleton

Build

  1. Configure the toolchain and additional options in config.mk:
# Supported: GCC, CLANG, ICC
TAG ?= GCC
ENABLE_OPENMP ?= false

OPTIONS +=  -DARRAY_ALIGNMENT=64
#OPTIONS +=  -DVERBOSE
#OPTIONS +=  -DVERBOSE_AFFINITY
#OPTIONS +=  -DVERBOSE_DATASIZE
#OPTIONS +=  -DVERBOSE_TIMER

The verbosity options enable detailed output about solver, affinity settings, allocation sizes and timer resolution. For debugging you may want to set the VERBOSE option:

# Supported: GCC, CLANG, ICC
TAG ?= GCC
ENABLE_OPENMP ?= false

OPTIONS +=  -DARRAY_ALIGNMENT=64
OPTIONS +=  -DVERBOSE
#OPTIONS +=  -DVERBOSE_AFFINITY
#OPTIONS +=  -DVERBOSE_DATASIZE
#OPTIONS +=  -DVERBOSE_TIMER
`

2. Build with:

make


You can build multiple toolchains in the same directory, but notice that the Makefile is only acting on the one currently set.
Intermediate build results are located in the `<TOOLCHAIN>` directory.

To output the executed commands use:

make Q=


3. Clean up with:

make clean

to clean intermediate build results.

make distclean

to clean intermediate build results and binary.

4. (Optional) Generate assembler:

make asm

The assembler files will also be located in the `<TOOLCHAIN>` directory.

## Usage

You have to provide a parameter file describing the problem you want to solve:

./exe-CLANG dcavity.par


Examples are given in in dcavity (a lid driven cavity test case) and canal (simulating a empty canal).

You can plot the resulting velocity and pressure fields using gnuplot:

gnuplot vector.plot

and for the pressure:

gnuplot surface.plot