API Reference

Discretization

HelmholtzBenchmark.discretize_helmholtz — Function
discretize_helmholtz(n::Int, k::Real) -> (A::SparseMatrixCSC{Float64,Int}, b::Vector{Float64})

Discretize the Helmholtz equation $(-∇²-k²)u = f$ on $[0,1]$ using second-order finite differences. Uses $n$ interior points (resulting in an $n \times n$ matrix). $f$ is set to a delta function at $x = 1/2$. Returns the system matrix A and the right-hand side vector b.

source

Solvers

Benchmarking

HelmholtzBenchmark.run_benchmark — Function
run_benchmark(k_values::Vector{<:Real}, dim::Int = 1, n::Int = 100)

Compare direct (UMFPACK) and iterative (GMRES) solvers for the Helmholtz equation for a number of wave numbers k_values.

source
HelmholtzBenchmark.run_comparison — Function
run_comparison(k::Real, dim::Int = 1, n::Int = 100)

Compare direct (UMFPACK) and iterative (GMRES) solvers for the Helmholtz equation for a single wave number k.

source