zer011b / fdtd3d

fdtd3d is an open source 1D, 2D, 3D FDTD electromagnetics solver with MPI, OpenMP and CUDA support for x64, ARM, ARM64, RISC-V, PowerPC, Wasm architectures
GNU General Public License v2.0
126 stars 33 forks source link
arm arm64 c-plus-plus cpp cuda electromagnetic fdtd gpu maxwell maxwell-equations maxwell-equations-solver modelling mpi parallel physics powerpc risc-v simulation wasm x64

fdtd3d

Build Status Build Status Build Status Build Status Build Status Build Status

Unit Tests Status Unit Tests Status Unit Tests Status Unit Tests Status Unit Tests Status Unit Tests Status

Test Suite Status Test Suite Status Test Suite Status Test Suite Status Test Suite Status

fdtd3d

This is an open-source implementation of FDTD Maxwell's equations solver for different dimensions (1, 2 or 3) with support of concurrency (MPI/OpenMP/Cuda) if required and for different architectures (x64, Arm, Arm64, RISC-V, PowerPC, Wasm). The key idea is building of solver for your specific needs with different components, i.e. concurrency support with enabled MPI, OpenMP or GPU support, parallel buffer types, specific dimension and others. OpenMP support is WIP.

For additional info on current project development status and future plans check issues and milestones, design docs are available at documentation. Also, doxygen documentation can be generated from config in ./Doxyfile:

sudo apt-get install doxygen
doxygen
firefox docs/index.html

Build

Build is done using cmake:

mkdir Release
cd Release
cmake .. -DCMAKE_BUILD_TYPE=Release
make fdtd3d

See documentation for specific details.

Testing

See documentation for specific details.

Launch

Parameters can be passed directly to fdtd3d through command line or config file. See documentation for specific details.

# show help
./fdtd3d --help

# show version of solver
./fdtd3d --version

# example of launch command for 3D build
./fdtd3d --load-eps-from-file /tmp/eps.txt --save-res --time-steps 10 --size x:80 --same-size --use-tfsf \
         --3d --angle-phi 0 --use-pml --dx 0.0005 --wavelength 0.02 --save-cmd-to-file cmd.txt

# example of the same launch with command line file
./fdtd3d --cmd-from-file cmd.txt

# cmd.txt file has the next format
#
# --load-eps-from-file /tmp/eps.txt
# --save-res
# --time-steps 1
# --size x:80
# --same-size
# --use-tfsf
# --3d
# --angle-phi 0
# --use-pml
# --dx 0.0005
# --wavelength 0.02

Performance Benchmark

fdtd3d can be used as a performance benchmark. See https://zer011b.github.io/fdtd3d/ for more details and some performance results on different architectures and in different modes.

How To Cite

You can site the following papers about the techniques used in fdtd3d:

Third Party

EasyBMP lib is used to output resulting electromagnetic fields. It is downloaded from sourceforge and used as is.