Skip to content

nimachm81/fdtd1d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fdtd1d

A parallel one dimensional FDTD code for Maxwell equations.

Finite difference time domain (FDTD) is one of the most efficient numerical techniques for solving electromagnetic problems. It can handle a vast number of practical electromagnetic problems such as electromagnetic interaction with non-linear, dispersive, anisotropic and time varying media.

This code demonstrates how to write a concurrent FDTD using modern C++ features.

To compile and run:

$ cd build 
$ cmake .. 
$ make     
$ ./fdtd1d NUMBER_OF_THREADS

To record the fields and visualize the output modify main.cc as follows,

  fdtd.SetTheWriteToFileFlag(true);

and then compile and run. To visualize the fields run the python script plotOutput.py from terminal:

$ python3 plotOutput.py

in a system where python and matplotlib are installed.

About

Simple one dimensional parallel FDTD code in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published