Skip to content
Pure Julia implementation of the finite difference frequency domain (FDFD) method for electromagnetics
Jupyter Notebook Julia
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


FDFD.jl is a 2D finite difference frequency domain (FDFD) code written completely in Julia for solving Maxwell's equations. It also supports performing the linear solve steps with the Pardiso and MUMPS packages.


I will eventually develop better documentation for the package but for now, please see the included Example_simulations.ipynb notebook to get started with some barebones examples.

I've detached the plotting functions into a separate module FDFDViz.jl to remove the PyPlot requirement.


  • Update for Julia 0.7/1.0
  • Add support for MUMPS solver and allow user to select between MUMPS, Pardiso, and the Julia \ command
    • Determine why MUMPS will not parallelize
  • Implement the frequency eigenvalue solver
  • Implement TE polarization
    • Add for eigenfrequency()
    • Add for solve()
    • Add for modulated solve()
  • Investigate and develop a better data struct for storing the fields
    • FieldTM and FieldTE
    • Cleaned up Flux calculation
  • Stored grid values
  • Calculate S-parameters
  • GeometryPrimitives 2D vs 3D shape handling


The FDFD algorithm implemented here was originally developed by Jerry Shi and Wonseok Shin from Shanhui Fan's research group at Stanford University. This code implements a version of the multi-frequency finite-difference frequency domain (MF-FDFD) method [1]. There are two MATLAB implementations of FDFD available which are likely to be more functional than this package. Note that there is also a work-in-progress FDFD Julia package being developed. See below for links to these projects.


  1. Yu Shi, Wonseok Shin, and Shanhui Fan, "Multi-frequency finite-difference frequency-domain algorithm for active nanophotonic device simulations," Optica 3, 1256-1259 (2016)
You can’t perform that action at this time.