diff --git a/README.md b/README.md index 34bac49..aa5e302 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ Working draft of a differentiable FDTD engine for inverse design in photonics, acoustics & RF. - -Documentation at https://github.io/differentiable-fdtd-beta-prerelease - +Documentation at https://paulxshen.github.io/Luminescent.jl/ Discussion & updates at https://discourse.julialang.org/t/pre-ann-differentiable-fdtd-for-inverse-design-in-photonics-acoustics-and-rf/105405/12 ![a](bend-pre.gif) ![b](bend-post.gif) diff --git a/examples/inverse_design_waveguide_bend/inverse_design_waveguide_bend.jl b/examples/inverse_design_waveguide_bend/inverse_design_waveguide_bend.jl index d58afad..d0594e8 100644 --- a/examples/inverse_design_waveguide_bend/inverse_design_waveguide_bend.jl +++ b/examples/inverse_design_waveguide_bend/inverse_design_waveguide_bend.jl @@ -100,8 +100,9 @@ power_profile = F.(real.(Jy .* conj.(Mz))) power_profile /= norm(power_profile) if ongpu - using CUDA, Flux - @assert CUDA.functional() + using Flux + # using CUDA + # @assert CUDA.functional() u0, model, static_mask, μ, σ, σm, field_padding, source_instances = gpu.((u0, model, static_mask, μ, σ, σm, field_padding, source_instances)) merge!(configs, (; u0, field_padding, source_instances)) diff --git a/examples/periodic_scattering/periodic_scattering.jl b/examples/periodic_scattering/periodic_scattering.jl index 2e3f92c..8673e26 100644 --- a/examples/periodic_scattering/periodic_scattering.jl +++ b/examples/periodic_scattering/periodic_scattering.jl @@ -61,8 +61,9 @@ p = apply(geometry_staggering; p...) # move to gpu if dogpu - using CUDA, Flux - @assert CUDA.functional() + using Flux + # using CUDA + # @assert CUDA.functional() u0, p, field_padding, source_instances = gpu.((u0, p, field_padding, source_instances)) end diff --git a/examples/periodic_scattering/periodic_scattering.mp4 b/examples/periodic_scattering/periodic_scattering.mp4 index fd0f8ca..626bc46 100644 Binary files a/examples/periodic_scattering/periodic_scattering.mp4 and b/examples/periodic_scattering/periodic_scattering.mp4 differ diff --git a/examples/quarter_wavelength_antenna/quarter_wavelength_antenna.jl b/examples/quarter_wavelength_antenna/quarter_wavelength_antenna.jl index 82d8e9f..503515c 100644 --- a/examples/quarter_wavelength_antenna/quarter_wavelength_antenna.jl +++ b/examples/quarter_wavelength_antenna/quarter_wavelength_antenna.jl @@ -2,7 +2,7 @@ We simulate a quarter wavelength antenna above conductor ground plane and compute its nearfield radiation pattern =# -using UnPack, LinearAlgebra, GLMakie +using UnPack, LinearAlgebra, GLMakie, CoordinateTransformations using GLMakie: volume using Luminescent, LuminescentVisualization @@ -45,8 +45,9 @@ p = apply(geometry_staggering, p) # move to gpu if dogpu - using CUDA, Flux - @assert CUDA.functional() + using Flux + # using CUDA + # @assert CUDA.functional() u0, p, field_padding, source_instances = gpu.((u0, p, field_padding, source_instances)) end diff --git a/makedocs/src/index.md b/makedocs/src/index.md index bc798ff..14fc033 100644 --- a/makedocs/src/index.md +++ b/makedocs/src/index.md @@ -2,7 +2,7 @@ Prerelease. First stable release planned for April . Until then, accuracy not validated. Report bugs on [Github](https://github.com/paulxshen/Luminescent.jl) - we usually respond within a day ## Overview -Generative design meets Maxwell's Equations. Differentiable FDTD package for inverse design & topology optimization in semiconductor photonics, acoustics and RF. GPU and automatic differentiation (AD) compatible. Uses AD by `Zygote.jl` for adjoint optimization. Integrates with [`Jello.jl`](https://github.com/paulxshen/Jello.jl) to generate length scale controlled paramaterized geometry . Staggered Yee grid update with fully featured boundary conditions & sources in 1d/2d/3d. Customizable physics to potentially incorporate dynamics like heat transfer, charge transport. +Generative design meets Maxwell's Equations. GPU and automatic differentiation (AD) compatible FDTD package in Julia for inverse design & topology optimization in semiconductor photonics, acoustics and RF. Uses AD by `Zygote.jl` for adjoint optimization. Integrates with [`Jello.jl`](https://github.com/paulxshen/Jello.jl) to generate length scale controlled paramaterized geometry . Staggered Yee grid update with fully featured boundary conditions & sources in 1d/2d/3d. Customizable physics to potentially incorporate dynamics like heat transfer, charge transport. ## Gallery ### Generative Inverse design of compact silicon photonics splitter @@ -13,12 +13,17 @@ Generative design meets Maxwell's Equations. Differentiable FDTD package for inv ![](assets/periodic_scattering.mp4) Please star us on [Github](https://github.com/paulxshen/Luminescent.jl) if you like our work :) ## Installation -Install via +Install Julia preferably with VSCODE. Then add our package via ``` +using Pkg Pkg.add(url="https://github.com/paulxshen/Luminescent.jl") Pkg.add(url="https://github.com/paulxshen/LuminescentVisualization.jl") ``` -`LuminescentVisualization.jl` contains visualization utilities +`LuminescentVisualization.jl` contains visualization utilities. If you're running tutorials also add +``` +]add UnPack, BSON,DataStructures, StatsBase, Zygote, Jello, GLMakie, CoordinateTransformations,AbbreviatedStackTraces,CUDA,Flux +``` +Omit CUDA if you don't have NVidia GPU ## Quickstart Please refer to the first tutorial ## People diff --git a/scripts/setup.jl b/scripts/setup.jl index 09192bc..be34af9 100644 --- a/scripts/setup.jl +++ b/scripts/setup.jl @@ -1,8 +1,8 @@ using Pkg -# ]add UnPack, BSON,DataStructures, StatsBase, Documenter,ImageTransformations,Interpolations, Zygote, Optim,ArrayPadding, Porcupine, Jello, GLMakie, Functors, Lazy,AbbreviatedStackTraces,ReverseStackTraces,CUDA,Flux +# ]add UnPack, BSON,DataStructures, StatsBase, Documenter,ImageTransformations,Interpolations, Zygote, Optim,ArrayPadding, Porcupine, Jello, GLMakie, Functors, CoordinateTransformations,Lazy,AbbreviatedStackTraces,ReverseStackTraces,CUDA,Flux # Pkg.add(url="https://github.com/paulxshen/ArrayPadding.jl") -Pkg.add(url="https://github.com/paulxshen/Jello.jl") +# Pkg.add(url="https://github.com/paulxshen/Jello.jl") # Pkg.add(url="https://github.com/paulxshen/Porcupine.jl") -# Pkg.add(url="https://github.com/paulxshen/Luminescent.jl") -# Pkg.add(url="https://github.com/paulxshen/LuminescentVisualization.jl") \ No newline at end of file +Pkg.add(url="https://github.com/paulxshen/Luminescent.jl") +Pkg.add(url="https://github.com/paulxshen/LuminescentVisualization.jl") \ No newline at end of file