There is a question on whether 1D Finite Difference Time Domain (FDTD) method can be faster when implemented C/C++ and run on a sequential machine rather than when implemented in CUDA and run on a parallel GPU.
We are trying to answer this question with the below code.
It contains both an implementation of the 1D FDTD method for an electromagnetic application in C/C++ and CUDA.
Theory and C/C++ implementations are taken from Understanding the Finite-Difference Time-Domain Method (see Program 3....

More
# Fdtd

# Finite Difference Time Domain Method

The Finite Difference Time Domain (FDTD) method is a very popular and rather intuitive method to solve partial differential equations describing time-evolving phenomena.
The relevant partial differential equations are discretized in both time and space by finite differences.
“Update equations” expressing the (unknown) future fields in terms of (known) past fields are established.
We here focus on the electromagnetic case, in which Maxwell's equations should be solved, although FDTD is very ...

More