Skip to content

Commit

Permalink
Merge pull request #10 from spinsphotonics/tweak
Browse files Browse the repository at this point in the history
v1.0.0 release
  • Loading branch information
jlu-spins authored May 12, 2023
2 parents 67a1fe3 + 08f78ed commit 7030cda
Show file tree
Hide file tree
Showing 8 changed files with 642 additions and 105 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@
Give it a test drive [![in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/gist/jlu-spins/0f3c5459bd4386150ae30b17f7c6a5e3/welcome-to-fdtd-z.ipynb),
join the chat [![on https://gitter.im/fdtdz/community](https://badges.gitter.im/fdtdz/community.svg)](https://app.gitter.im/#/room/#fdtdz:gitter.im), and read the [whitepaper](paper/paper.pdf).

### API

***fdtd-z*** exposes a low-level API `fdtdz()` to launch FDTD kernels on the GPU while giving the user fine-grained control over values for permittivity, current source, boundary conditions, and more.

In order to optimize the simulation throughput for nanophotonic applications, a number of constraints are placed on the allowable inputs such as limited dimension of the z-axis, simple non-absorbing dielectric materials only, and adiabatic absorption boundaries along the x- and y-axes.
See the `fdtdz()` docstring for all the details.

While it does not include all the bells and whistles, it is *fast*: delivering ~100X speed-up compared to MEEP/Lumerical even on commodity GPUs such as the Nvidia T4; and we're looking forward to building out the required functionality with the open-source photonics community!

That said, don't take our word for it, [try it out for yourself](https://colab.research.google.com/gist/jlu-spins/0f3c5459bd4386150ae30b17f7c6a5e3/welcome-to-fdtd-z.ipynb)!

### Install

You must have the GPU-version of [JAX](https://github.com/google/jax) installed first, see [instructions here](https://github.com/google/jax#pip-installation-gpu-cuda-installed-via-pip-easier).
Once this is done, you can just do `pip install fdtdz`.

Of course, you can always circumvent things and just `!pip install fdtdz` directly from a Colab notebook as is done in the [example notebook](https://colab.research.google.com/gist/jlu-spins/0f3c5459bd4386150ae30b17f7c6a5e3/welcome-to-fdtd-z.ipynb).

## Frequently Asked Questions

### Is the plan to build additional functionality inside the *fdtd-z* repo?
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "pybind11>=2
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# write_to = "src/kepler_jax/kepler_jax_version.py"
write_to = "src/fdtdz_jax/fdtdz_jax_version.py"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def build_extension(self, ext):
name="fdtdz",
author="Jesse Lu",
author_email="[email protected]",
# url="https://github.com/dfm/extending-jax",
url="https://github.com/spinsphotonics/fdtdz",
license="MIT",
description=("TODO: Write this."),
description=("Fast, scalable, and free photonic simulation"),
long_description=read("README.md"),
long_description_content_type="text/markdown",
packages=find_packages(where="src"),
Expand Down
5 changes: 3 additions & 2 deletions src/fdtdz_jax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

__all__ = ["__version__", "fdtdz"]
__all__ = ["__version__", "fdtdz", "residual"]

from .fdtdz_jax import fdtdz, fdtdz_impl
from .fdtdz_jax import fdtdz
from .residual import residual
from .fdtdz_jax_version import version as __version__
Loading

0 comments on commit 7030cda

Please sign in to comment.