A Julia package for benchmarking solvers for the Helmholtz equation in 1D using a simple finite difference discretization.
Solves the Helmholtz equation:
on the domain
- Second-order finite difference discretization
- Direct solver using UMFPACK
- Iterative solver using GMRES
- Benchmarking functionality to compare solver performance
- Verification against exact solution for special case
Clone the repository:
$ git clone https://github.com/Da-Be-Ru/HelmholtzBenchmark.jl
$ cd HelmholtzBenchmark.jl
$ julia --project=.and then instantiate the project:
# hit ] to access the pkg mode
(HelmholtzBenchmark) pkg> instantiate
# hit backspace to return to the julian modeYou can run a quick benchmark manually:
using HelmholtzBenchmark
using LinearAlgebra
# Run benchmark for different k values
k_values = [0.0, 10.0, 100.0, 1000.0]
results = run_benchmark(k_values)
# Verify implementation against exact solution
x, u_numerical, u_exact = verify_solution()
error = norm(u_numerical - u_exact, Inf)
println("Maximum error: ", error)or automatically generate the assorted data and plots from the
DrWatson.jl-compatible benchmark script:
include("./scripts/run_benchmark.jl")
RunBenchmark.main()