API Reference
ExaFMMt.ExaFMM — Type
ExaFMM{K, O} <: LinearMaps.LinearMap{K}Represents an FMM matrix and can be multiplied by a vector containing the source charges. This type owns C++ storage and releases it through close! or its finalizer.
Fields
fmmoptions::FMMOptions: Initializer, eitherLaplaceFMMOptions,HelmholtzFMMOptions, orModifiedHelmholtzFMMOptions.nsources::Int: Number of sources.ntargets::Int: Number of targets.fmm::Ptr{Cvoid}: Pointer to the FMM struct generated by the C++ part.fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.sources::Ptr{Cvoid}: Pointer to the C++ struct of the sources.targets::Ptr{Cvoid}: Pointer to the C++ struct of the targets.
ExaFMMt.HelmholtzFMMOptions — Type
HelmholtzFMMOptions{I, C} <: FMMOptionsHelmholtz initializer for the setup function.
Fields
p::I: Multipole expansion order.ncrit::I: Minimum number of points in each box of the tree.wavek::C: Wavenumber.
ExaFMMt.LaplaceFMMOptions — Type
LaplaceFMMOptions{I} <: FMMOptionsLaplace initializer for the setup function.
Fields
p::I: Multipole expansion order.ncrit::I: Minimum number of points in each box of the tree.
ExaFMMt.ModifiedHelmholtzFMMOptions — Type
ModifiedHelmholtzFMMOptions{I, F} <: FMMOptionsModified-Helmholtz initializer for the setup function.
Fields
p::I: Multipole expansion order.ncrit::I: Minimum number of points in each box of the tree.wavek::F: Wavenumber.
ExaFMMt.HelmholtzFMM — Method
HelmholtzFMM(wavek::ComplexF32; p=8, ncrit=100)Initializer for the Helmholtz-FMM in the C++ part.
Arguments
wavek::ComplexF32: Wavenumber.p::Int: Multipole expansion order.ncrit::Int: Minimum number of points in each box of the tree.
ExaFMMt.HelmholtzFMM — Method
HelmholtzFMM(wavek::ComplexF64; p=8, ncrit=100)Initializer for the Helmholtz-FMM in the C++ part.
Arguments
wavek::ComplexF64: Wavenumber.p::Int: Multipole expansion order.ncrit::Int: Minimum number of points in each box of the tree.
ExaFMMt.LaplaceFMM32 — Method
LaplaceFMM32(;ncrit=100, p=8)Initializer for the Laplace-FMM in the C++ part.
Arguments
p::Int: Multipole expansion order.ncrit::Int: Minimum number of points in each box of the tree.
ExaFMMt.LaplaceFMM64 — Method
LaplaceFMM64(;ncrit=100, p=8)Initializer for the Laplace-FMM in the C++ part.
Arguments
p::Int: Multipole expansion order.ncrit::Int: Minimum number of points in each box of the tree.
ExaFMMt.ModifiedHelmholtzFMM — Method
ModifiedHelmholtzFMM(wavek::Float32; ncrit=100, p=8)Initializer for the modified-Helmholtz-FMM in the C++ part.
Arguments
wavek::Float32: Wavenumber.p::Int: Multipole expansion order.ncrit::Int: Minimum number of points in each box of the tree.
ExaFMMt.ModifiedHelmholtzFMM — Method
ModifiedHelmholtzFMM(wavek::Float64; ncrit=100, p=8)Initializer for the modified-Helmholtz-FMM in the C++ part.
Arguments
wavek::Float64: Wavenumber.p::Int: Multipole expansion order.ncrit::Int: Minimum number of points in each box of the tree.
ExaFMMt.clear_values — Method
clear_values(fmmstruct::Ptr{Cvoid}, T::Type{ComplexF32})Clears the solution values in the FMM structure.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.T: Type must beComplexF32orComplexF64for Helmholtz-FMM andFloat32orFloat64for Laplace or Modified-Helmholtz-FMM.
ExaFMMt.clear_values — Method
clear_values(fmmstruct::Ptr{Cvoid}, T::Type{ComplexF64})Clears the solution values in the FMM structure.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.T: Type must beComplexF32orComplexF64for Helmholtz-FMM andFloat32orFloat64for Laplace or Modified-Helmholtz-FMM.
ExaFMMt.clear_values — Method
clear_values(fmmstruct::Ptr{Cvoid}, T::Type{Float32})Clears the solution values in the FMM structure.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.T: Type must beComplexF32orComplexF64for Helmholtz-FMM andFloat32orFloat64for Laplace or Modified-Helmholtz-FMM.
ExaFMMt.clear_values — Method
clear_values(fmmstruct::Ptr{Cvoid}, T::Type{Float64})Clears the solution values in the FMM structure.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.T: Type must beComplexF32orComplexF64for Helmholtz-FMM andFloat32orFloat64for Laplace or Modified-Helmholtz-FMM.
ExaFMMt.close! — Method
close!(x::ExaFMM)Release the C++ storage owned by x.
Calling close! more than once is safe. Closed objects cannot be evaluated or multiplied again.
ExaFMMt.evaluate — Method
evaluate(
A::ExaFMM{C},
x::Vector{C},
fmmoptions::HelmholtzFMMOptions{I, C}
) where {I, C <: Complex}Evaluates the prebuilt FMM structure A for new values x.
Arguments
A::ExaFMM{C}: ExaFMM structure with pointers to all allocated variables.x::Vector{C}: Values of for example the charge at each source location.fmmoptions::HelmholtzFMMOptions{I, C}: Julia Helmholtz initializer for the setup function, used as identifier.
ExaFMMt.evaluate — Method
evaluate(
A::ExaFMM{F},
x::Vector{F},
fmmoptions::LaplaceFMMOptions{I}
) where {I, F <: Real}Evaluates the prebuilt FMM structure A for new values x.
Arguments
A::ExaFMM{F}: ExaFMM structure with pointers to all allocated variables.x::Vector{F}: Values of for example the charge at each source location.fmmoptions::LaplaceFMMOptions{I}: Julia Laplace-initializer for setup function, used as identifier.
ExaFMMt.evaluate — Method
evaluate(
A::ExaFMM{F},
x::Vector{F},
fmmoptions::ModifiedHelmholtzFMMOptions{I, F}
) where {I, F <: Real}Evaluates the prebuilt FMM structure A for new values x.
Arguments
A::ExaFMM{F}: ExaFMM structure with pointers to all allocated variables.x::Vector{F}: Values of for example the charge at each source location.fmmoptions::ModifiedHelmholtzFMMOptions{I, F}: Julia modified-Helmholtz initializer for the setup function, used as identifier.
ExaFMMt.freeC! — Method
freeC!(x::ExaFMM{ComplexF32})Frees the storage which is allocated by the C++ part for Helmholtz-FMM.
Arguments
x::ExaFMM{ComplexF64}: ExaFMM structure with pointers to all allocated variables.
ExaFMMt.freeC! — Method
freeC!(x::ExaFMM{ComplexF64})Frees the storage which is allocated by the C++ part for Helmholtz-FMM.
Arguments
x::ExaFMM{ComplexF64}: ExaFMM structure with pointers to all allocated variables.
ExaFMMt.freeF! — Method
freeF!(x::ExaFMM{Float32})Frees the storage which is allocated by the C++ part for the Laplace-FMM and Modified-Helmholtz-FMM.
Arguments
x::ExaFMM{Float32}: ExaFMM structure with pointers to all allocated variables.
ExaFMMt.freeF! — Method
freeF!(x::ExaFMM{Float64})Frees the storage which is allocated by the C++ part for the Laplace-FMM and Modified-Helmholtz-FMM.
Arguments
x::ExaFMM{Float64}: ExaFMM structure with pointers to all allocated variables.
ExaFMMt.init_sources — Method
init_sources(points::Matrix{F}, charges::Vector{C}) where {F <: Real, C <: Complex}Creates struct for sources and charges in the C++ part from the Julia matrix. Complex charges are used for the Helmholtz-FMM.
Arguments
points::Matrix{F}: 3d-coordinates of sources.charges::Vector{C}: Values of for example the charge at each source location.
ExaFMMt.init_sources — Method
init_sources(points::Matrix{F}, charges::Vector{F}) where F <: RealCreates struct for sources and charges in the C++ part from the Julia matrix. Real charges are used and mandatory for the Laplace- and Modified-Helmholtz-FMM.
Arguments
points::Matrix{F}: 3d-coordinates of sources.charges::Vector{F}: Values of for example the charge at each source location.
ExaFMMt.init_targets — Method
init_targets(points::Matrix{F}, T::Type) where F <: RealCreates struct for targets in the C++ part from a Julia matrix of points.
Arguments
points::Matrix{C}: 3d-coordinates of targets.T: Type must be set for the Helmholtz-FMM to ComplexF32 or ComplexF64.
ExaFMMt.setup — Method
setup(
sources::Matrix{F},
targets::Matrix{F},
fmmoptions::HelmholtzFMMOptions{I, Complex{F}}
) where {I, F <: Real}Sets the FMM structure up in the C++ part and allocates all mandatory storage.
Arguments
sources::Matrix{F}: 3d-coordinates of sources.targets::Matrix{F}: 3d-coordinates of targets.fmmoptions::HelmholtzFMMOptions{I, Complex{F}}: Julia Helmholtz initializer for the setup function.
ExaFMMt.setup — Method
setup(
sources::Matrix{F},
targets::Matrix{F},
fmmoptions::LaplaceFMMOptions{I}
) where {I, F <: Real}Sets the FMM structure up in the C++ part and allocates all mandatory storage.
Arguments
sources::Matrix{F}: 3d-coordinates of sources.targets::Matrix{F}: 3d-coordinates of targets.fmmoptions::LaplaceFMMOptions{I}: Julia Laplace-initializer for setup function.
ExaFMMt.setup — Method
setup(
sources::Matrix{F},
targets::Matrix{F},
fmmoptions::ModifiedHelmholtzFMMOptions{I, F}
) where {I, F <: Real}Sets the FMM structure up in the C++ part and allocates all mandatory storage.
Arguments
sources::Matrix{F}: 3d-coordinates of sources.targets::Matrix{F}: 3d-coordinates of targets.fmmoptions::ModifiedHelmholtzFMMOptions{I, F}: Julia modified-Helmholtz-initializer for setup function.
ExaFMMt.update_charges — Method
update_charges(fmmstruct::Ptr{Cvoid}, charges::Vector{ComplexF32})Updates charges in already generated Helmholtz-FMM. Requires a ComplexF32 array of charges.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.charges::Vector{ComplexF32}: Values of for example the charge at each source location.
ExaFMMt.update_charges — Method
update_charges(fmmstruct::Ptr{Cvoid}, charges::Vector{ComplexF64})Updates charges in already generated Helmholtz-FMM. Requires a ComplexF64 array of charges.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.charges::Vector{ComplexF64}: Values of for example the charge at each source location.
ExaFMMt.update_charges — Method
update_charges(fmmstruct::Ptr{Cvoid}, charges::Vector{Float32})Updates charges in an already generated Laplace or Modified-Helmholtz-FMM. Requires a Float32 array of charges.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.charges::Vector{Float32}: Values of for example the charge at each source location.
ExaFMMt.update_charges — Method
update_charges(fmmstruct::Ptr{Cvoid}, charges::Vector{Float64})Updates charges in an already generated Laplace or Modified-Helmholtz-FMM. Requires a Float64 array of charges.
Arguments
fmmstruct::Ptr{Cvoid}: Pointer to a struct with the required C++ substructs.charges::Vector{Float64}: Values of for example the charge at each source location.
ExaFMMt.verify — Method
verify(exafmm::ExaFMM{ComplexF32}, fmmoptions::HelmholtzFMMOptions{I, ComplexF32}) where IComputes the accuracy of the evaluated FMM exafmm.
Arguments
exafmmm::ExaFMM: ExaFMM structure with pointers to all allocated variables.fmmoptions::HelmholtzFMMOptions{I, ComplexF32}: Julia Helmholtz initializer for the setup function, used as identifier.
ExaFMMt.verify — Method
verify(exafmm::ExaFMM{ComplexF64}, fmmoptions::HelmholtzFMMOptions{I, ComplexF64}) where IComputes the accuracy of the evaluated FMM exafmm.
Arguments
exafmmm::ExaFMM: ExaFMM structure with pointers to all allocated variables.fmmoptions::HelmholtzFMMOptions{I, ComplexF64}: Julia Helmholtz initializer for the setup function, used as identifier.
ExaFMMt.verify — Method
verify(exafmm::ExaFMM{Float32}, fmmoptions::LaplaceFMMOptions{I}) where IComputes the accuracy of the evaluated FMM exafmm.
Arguments
exafmm::ExaFMM{Float32}: ExaFMM structure with pointers to all allocated variables.fmmoptions::LaplaceFMMOptions{I}: Julia Laplace-initializer for setup function, used as identifier.
ExaFMMt.verify — Method
verify(exafmm::ExaFMM{Float32}, fmmoptions::ModifiedHelmholtzFMMOptions{I, Float32})Computes the accuracy of the evaluated FMM exafmm.
Arguments
exafmm::ExaFMM{Float32}: ExaFMM structure with pointers to all allocated variables.fmmoptions::ModifiedHelmholtzFMMOptions{I, Float32}: Julia modified-Helmholtz-initializer for setup function, used as identifier.
ExaFMMt.verify — Method
verify(exafmm::ExaFMM{Float64}, fmmoptions::LaplaceFMMOptions{I}) where IComputes the accuracy of the evaluated FMM exafmm.
Arguments
exafmm::ExaFMM{Float64}: ExaFMM structure with pointers to all allocated variables.fmmoptions::LaplaceFMMOptions{I}: Julia Laplace-initializer for setup function, used as identifier.
ExaFMMt.verify — Method
verify(exafmm::ExaFMM{Float64}, fmmoptions::ModifiedHelmholtzFMMOptions{I, Float64})Computes the accuracy of the evaluated FMM exafmm.
Arguments
exafmm::ExaFMM{Float64}: ExaFMM structure with pointers to all allocated variables.fmmoptions::ModifiedHelmholtzFMMOptions{I, Float64}: Julia modified-Helmholtz-initializer for setup function, used as identifier.