Skip to content
/ uFDTD.jl Public

Simple FDTD solver in Julia, based on uFDTD from John B. Schneider.

License

Notifications You must be signed in to change notification settings

cmey/uFDTD.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uFDTD.jl

Implementation of a simple FDTD solver, based on Understanding the Finite-Difference Time-Domain Method, John B. Schneider.

Package status

CI status

Installation

Until this package gets registered, open the Julia environment from inside the package folder:

julia --project=.

To setup this package as a library in your own code

Until this package gets registered, you cannot simply do pkg> add uFDTD. Instead, activate your environment and do once per system:

(scratch) pkg> develop --local ~/path/to/uFDTD.jl  # (the package, not the file)

Usage

using uFDTD

# Define simulation parameters (use many default values, see uFDTDParameters).
sim_params = uFDTDParameters()

# Run simulation.
p0, p1 = uFDTD.simulate(sim_params)

# Display probes.
using GLMakie
#   0D+t probe:
display(GLMakie.Screen(), lines(p0))
#   1D+t probe:
fig2d = Figure()
ax = Axis(fig2d[1, 1])
hm = heatmap!(ax, p1)
Colorbar(fig2d[1, 2], hm)
display(GLMakie.Screen(), fig2d)

Tests

(scratch) pkg> test uFDTD

Documentation

We use Documenter.jl as our doc builder, please install it first.

(scratch) pkg> add Documenter

Then, build the documentation.

$ cd docs
$ make

The generated doc is located at docs/build. Visualize it:

$ open docs/build/index.html

About

Simple FDTD solver in Julia, based on uFDTD from John B. Schneider.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages