Guided Examples
This section a work in progress.
diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 806fa9b..ca1b1fb 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-23T22:27:34","documenter_version":"1.4.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-04-30T20:18:12","documenter_version":"1.4.0"}} \ No newline at end of file diff --git a/dev/guided_examples/index.html b/dev/guided_examples/index.html index a9dc0a0..2bf69bd 100644 --- a/dev/guided_examples/index.html +++ b/dev/guided_examples/index.html @@ -1,2 +1,2 @@ -
This section a work in progress.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 23 April 2024. Using Julia version 1.10.2.
This section a work in progress.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 30 April 2024. Using Julia version 1.10.3.
FastMultipole is a highly performant, CPU parallelized fast multipole code suitable for accelerating large $N$-body problems in scalar and or vector potentials with a wide range of applications, including astronomy, electro-magnetism, and fluid-dynamics. Typical use cases include boundary element problems, such as 3-dimensional panel methods. The code is compatible with ForwardDiff
and ReverseDiff
algorithmic differentiation for gradient-based design optimization. Its elegant interface makes it extremely easy to incorporate into existing Julia code with minimal modification. Convenience functions are provided for generating the expansions of source and vortex points and constant source and doublet panels, with more support planned for the future. It currently supports only the Laplace kernel, though this may change soon.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 23 April 2024. Using Julia version 1.10.2.
FastMultipole is a highly performant, CPU parallelized fast multipole code suitable for accelerating large $N$-body problems in scalar and or vector potentials with a wide range of applications, including astronomy, electro-magnetism, and fluid-dynamics. Typical use cases include boundary element problems, such as 3-dimensional panel methods. The code is compatible with ForwardDiff
and ReverseDiff
algorithmic differentiation for gradient-based design optimization. Its elegant interface makes it extremely easy to incorporate into existing Julia code with minimal modification. Convenience functions are provided for generating the expansions of source and vortex points and constant source and doublet panels, with more support planned for the future. It currently supports only the Laplace kernel, though this may change soon.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 30 April 2024. Using Julia version 1.10.3.
The tutorial for FastMultipole is a work in progress. While we work on creating a tutorial, see the example file scripts/simple_gravitational.jl
.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 23 April 2024. Using Julia version 1.10.2.
The tutorial for FastMultipole is a work in progress. While we work on creating a tutorial, see the example file scripts/simple_gravitational.jl
.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 30 April 2024. Using Julia version 1.10.3.
FastMultipole.DerivativesSwitch
FastMultipole.DerivativesSwitch
FastMultipole.DerivativesSwitch
FastMultipole.DerivativesSwitch
FastMultipole.MultiTree
FastMultipole.ProbeSystem
FastMultipole.ProbeSystem
FastMultipole.ProbeSystem
FastMultipole.SortWrapper
FastMultipole.Tree
FastMultipole.L2B_velocity
FastMultipole.L2B_velocity_gradient
FastMultipole.d2rdx2
FastMultipole.direct!
FastMultipole.direct!
FastMultipole.drdx
FastMultipole.fmm!
FastMultipole.fmm!
FastMultipole.fmm!
FastMultipole.fmm!
FastMultipole.reset!
FastMultipole.unsort!
FastMultipole.DerivativesSwitch
— TypeDerivativesSwitch
Switch indicating whether the scalar potential, vector potential, velocity, and/or velocity gradient should be computed for a target system. Information is stored as type parameters, allowing the compiler to compile away if statements.
FastMultipole.DerivativesSwitch
— MethodDerivativesSwitch(scalar_potential, vector_potential, velocity, velocity_gradient)
Constructs a tuple of DerivativesSwitch
objects.
Arguments
scalar_potential::Vector{Bool}
: a vector of ::Bool
indicating whether the scalar potential should be computed for each target systemvector_potential::Vector{Bool}
: a vector of ::Bool
indicating whether the vector potential should be computed for each target systemvelocity::Vector{Bool}
: a vector of ::Bool
indicating whether the velocity should be computed for each target systemvelocity_gradient::Vector{Bool}
: a vector of ::Bool
indicating whether the velocity gradient should be computed for each target systemFastMultipole.DerivativesSwitch
— MethodDerivativesSwitch(scalar_potential, vector_potential, velocity, velocity_gradient)
Constructs a single DerivativesSwitch
object.
Arguments
scalar_potential::Bool
: a ::Bool
indicating whether the scalar potential should be computed for the target systemvector_potential::Bool
: a ::Bool
indicating whether the vector potential should be computed for the target systemvelocity::Bool
: a ::Bool
indicating whether the velocity should be computed for the target systemvelocity_gradient::Bool
: a ::Bool
indicating whether the velocity gradient should be computed for the target systemFastMultipole.DerivativesSwitch
— MethodDerivativesSwitch(scalar_potential, vector_potential, velocity, velocity_gradient, target_systems)
Constructs a ::Tuple
of indentical DerivativesSwitch
objects of the same length as target_systems
(if it is a ::Tuple
), or a single DerivativesSwitch
(if target_system
is not a ::Tuple
)
Arguments
scalar_potential::Bool
: a ::Bool
indicating whether the scalar potential should be computed for each target systemvector_potential::Bool
: a ::Bool
indicating whether the vector potential should be computed for each target systemvelocity::Bool
: a ::Bool
indicating whether the velocity should be computed for each target systemvelocity_gradient::Bool
: a ::Bool
indicating whether the velocity gradient should be computed for each target systemFastMultipole.MultiTree
— Typebodies[indexlist] is the same sort operation as performed by the tree sortedbodies[inverseindexlist] undoes the sort operation performed by the tree
FastMultipole.ProbeSystem
— TypeProbeSystem
Convenience system for defining locations at which the potential, velocity, or velocity gradient may be desired.
FastMultipole.ProbeSystem
— MethodProbeSystem(positions; kwargs...)
A convenience system constructor for calculating the influence of source systems at locations not already described by a system object. It behaves like a system whose elements induce a null potential field.
Arguments
positions::Vector{SVector{3,Float64}}
: a vector of position vectors of each probeOptional Arguments
scalar_potential::Bool
: whether or not to compute the scalar potential at each probe locationvector_potential::Bool
: whether or not to compute the vector potential at each probe locationvelocity::Bool
: whether or not to compute the velocity at each probe locationvelocity_gradient::Bool
: whether or not to compute the velocity gradient at each probe locationFastMultipole.ProbeSystem
— MethodProbeSystem(positions; kwargs...)
Dispatch of ProbeSystem
accepting a matrix of horizontally concatenated column vectors describing the position of each probe. Optional arguments are identical.
FastMultipole.SortWrapper
— MethodSortWrapper(system)
Convenience wrapper for systems whose elements cannot be sorted in-place (e.g. structured grids). The resulting object is treated like any other system
.
FastMultipole.Tree
— Typeabstract type Tree{TF,P} end
Supertype of all octree structures with TF
the floating point type and P
the expansion order.
FastMultipole.L2B_velocity
— MethodDoes not include the rotation matrix R yet. Eq 28 in S&L
FastMultipole.L2B_velocity_gradient
— MethodEq 35-37 S&L
FastMultipole.d2rdx2
— Methoddrk/dxidx_j
FastMultipole.direct!
— Methoddirect!(target_system, source_system; derivatives_switches)
Applies all interactions of source_system
acting on target_system
without multipole acceleration.
Arguments
target_system
: either
source_system
: either
Optional Arguments
derivatives_switches::DerivativesSwitch
: determines whether to include the scalar potential, vector potential, velocity, and/or velocity gradient for the target_system
; either
target_system
is not a ::Tuple
of systems) an instance of DerivativesSwitch
target_system
is a ::Tuple
of systems) a ::Tuple
of DerivativesSwitch
of length length(target_systems)
FastMultipole.direct!
— Methoddirect!(systems; derivatives_switches)
Applies all interactions of systems
acting on itself without multipole acceleration.
Arguments
systems
: either
Optional Arguments
derivatives_switches::DerivativesSwitch
: determines whether to include the scalar potential, vector potential, velocity, and/or velocity gradient when solving the n-body problem; either
systems
is not a ::Tuple
of systems) an instance of DerivativesSwitch
systems
is a ::Tuple
of systems) a ::Tuple
of DerivativesSwitch
of length length(systems)
FastMultipole.drdx
— Methoddrj/dxi
FastMultipole.fmm!
— Methodfmm!(target_systems, source_systems; kwargs...)
Apply all interactions of source_systems
acting on target_systems
using the fast multipole method. Assumes compatibility functions have been overloaded for both source and target systems.
Arguments
target_systems
: either
source_systems
: either
Optional Arguments
expansion_order::Int
: the expansion order to be usedn_per_branch_source::Int
: maximum number of bodies from source_systems
allowed in a leaf-level branchn_per_branch_target::Int
: maximum number of bodies from target_systems
allowed in a leaf-level branchmultipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_source_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for the source_systems
unsort_target_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for the target_systems
source_shink_recenter::Bool
: indicates whether or not to resize branches for the source_systems
octree after it is created to increase computational efficiencytarget_shink_recenter::Bool
: indicates whether or not to resize branches for the target_systems
octree after it is created to increase computational efficiencysave_tree::Bool
: indicates whether or not to save a VTK file for visualizing the octreesave_name::String
: name and path of the octree visualization if save_tree == true
FastMultipole.fmm!
— Methodfmm!(systems; kwargs...)
Apply all interactions of systems
acting on itself using the fast multipole method. Assumes compatibility functions have been overloaded for both source and target systems.
Arguments
systems
: either
Optional Arguments
expansion_order::Int
: the expansion order to be usedn_per_branch::Int
: maximum number of bodies from systems
allowed in a leaf-level branchmultipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for systems
shink_recenter::Bool
: indicates whether or not to resize branches for the octree after it is created to increase computational efficiencysave_tree::Bool
: indicates whether or not to save a VTK file for visualizing the octreesave_name::String
: name and path of the octree visualization if save_tree == true
FastMultipole.fmm!
— Methodfmm!(target_tree, target_systems, source_tree, source_systems; kwargs...)
Dispatches fmm!
using existing ::Tree
objects.
Arguments
target_tree::Tree
: a <:Tree
object (see Tree
)
target_systems
: either
source_tree::Tree
: a <:Tree
object (see Tree
)
source_systems
: either
Optional Arguments
multipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_source_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for source_systems
unsort_target_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for target_systems
FastMultipole.fmm!
— Methodfmm!(tree, systems; kwargs...)
Dispatches fmm!
using an existing ::Tree
.
Arguments
tree::Tree
: a <:Tree
object (see Tree
)
systems
: either
Optional Arguments
multipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for systems
FastMultipole.reset!
— Methodreset!(probes)
Zeroes all values (e.g. scalar/vector potential, velocity, and/or velocity gradient) of all probes.
Arguments
probes::ProbeSystem
: a ::
ProbeSystem
objectFastMultipole.unsort!
— MethodUndoes the sort operation performed by the tree.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 23 April 2024. Using Julia version 1.10.2.
FastMultipole.DerivativesSwitch
FastMultipole.DerivativesSwitch
FastMultipole.DerivativesSwitch
FastMultipole.DerivativesSwitch
FastMultipole.MultiTree
FastMultipole.ProbeSystem
FastMultipole.ProbeSystem
FastMultipole.ProbeSystem
FastMultipole.SortWrapper
FastMultipole.Tree
FastMultipole.L2B_velocity
FastMultipole.L2B_velocity_gradient
FastMultipole.add_line!
FastMultipole.d2rdx2
FastMultipole.direct!
FastMultipole.direct!
FastMultipole.drdx
FastMultipole.fmm!
FastMultipole.fmm!
FastMultipole.fmm!
FastMultipole.fmm!
FastMultipole.reset!
FastMultipole.unsort!
FastMultipole.DerivativesSwitch
— TypeDerivativesSwitch
Switch indicating whether the scalar potential, vector potential, velocity, and/or velocity gradient should be computed for a target system. Information is stored as type parameters, allowing the compiler to compile away if statements.
FastMultipole.DerivativesSwitch
— MethodDerivativesSwitch(scalar_potential, vector_potential, velocity, velocity_gradient)
Constructs a tuple of DerivativesSwitch
objects.
Arguments
scalar_potential::Vector{Bool}
: a vector of ::Bool
indicating whether the scalar potential should be computed for each target systemvector_potential::Vector{Bool}
: a vector of ::Bool
indicating whether the vector potential should be computed for each target systemvelocity::Vector{Bool}
: a vector of ::Bool
indicating whether the velocity should be computed for each target systemvelocity_gradient::Vector{Bool}
: a vector of ::Bool
indicating whether the velocity gradient should be computed for each target systemFastMultipole.DerivativesSwitch
— MethodDerivativesSwitch(scalar_potential, vector_potential, velocity, velocity_gradient)
Constructs a single DerivativesSwitch
object.
Arguments
scalar_potential::Bool
: a ::Bool
indicating whether the scalar potential should be computed for the target systemvector_potential::Bool
: a ::Bool
indicating whether the vector potential should be computed for the target systemvelocity::Bool
: a ::Bool
indicating whether the velocity should be computed for the target systemvelocity_gradient::Bool
: a ::Bool
indicating whether the velocity gradient should be computed for the target systemFastMultipole.DerivativesSwitch
— MethodDerivativesSwitch(scalar_potential, vector_potential, velocity, velocity_gradient, target_systems)
Constructs a ::Tuple
of indentical DerivativesSwitch
objects of the same length as target_systems
(if it is a ::Tuple
), or a single DerivativesSwitch
(if target_system
is not a ::Tuple
)
Arguments
scalar_potential::Bool
: a ::Bool
indicating whether the scalar potential should be computed for each target systemvector_potential::Bool
: a ::Bool
indicating whether the vector potential should be computed for each target systemvelocity::Bool
: a ::Bool
indicating whether the velocity should be computed for each target systemvelocity_gradient::Bool
: a ::Bool
indicating whether the velocity gradient should be computed for each target systemFastMultipole.MultiTree
— Typebodies[indexlist] is the same sort operation as performed by the tree sortedbodies[inverseindexlist] undoes the sort operation performed by the tree
FastMultipole.ProbeSystem
— TypeProbeSystem
Convenience system for defining locations at which the potential, velocity, or velocity gradient may be desired.
FastMultipole.ProbeSystem
— MethodProbeSystem(positions; kwargs...)
A convenience system constructor for calculating the influence of source systems at locations not already described by a system object. It behaves like a system whose elements induce a null potential field.
Arguments
positions::Vector{SVector{3,Float64}}
: a vector of position vectors of each probeOptional Arguments
scalar_potential::Bool
: whether or not to compute the scalar potential at each probe locationvector_potential::Bool
: whether or not to compute the vector potential at each probe locationvelocity::Bool
: whether or not to compute the velocity at each probe locationvelocity_gradient::Bool
: whether or not to compute the velocity gradient at each probe locationFastMultipole.ProbeSystem
— MethodProbeSystem(positions; kwargs...)
Dispatch of ProbeSystem
accepting a matrix of horizontally concatenated column vectors describing the position of each probe. Optional arguments are identical.
FastMultipole.SortWrapper
— MethodSortWrapper(system)
Convenience wrapper for systems whose elements cannot be sorted in-place (e.g. structured grids). The resulting object is treated like any other system
.
FastMultipole.Tree
— Typeabstract type Tree{TF,P} end
Supertype of all octree structures with TF
the floating point type and P
the expansion order.
FastMultipole.L2B_velocity
— MethodDoes not include the rotation matrix R yet. Eq 28 in S&L
FastMultipole.L2B_velocity_gradient
— MethodEq 35-37 S&L
FastMultipole.add_line!
— Methodadd_line!(probes::ProbeSystem, x1, x2, n_probes, i_last)
Adds n_probes
probes in a line between x1
and x2
. Specifically, they are added at the midpoint of equally partiti oned segments of the line.
Arguments
probes::ProbeSystem
: the probe system whose .position
field is to be updatedx1::Vector{Float64}
: the first point defining the line along which probes are to be addedx2::Vector{Float64}
: the second point defining the line along which probes are to be addedn_probes::Int
: number of probes to be addedi_last::Int
: index of the last probe in probes
Output
i_last::Int
: updated index of the last probe in probes
FastMultipole.d2rdx2
— Methoddrk/dxidx_j
FastMultipole.direct!
— Methoddirect!(target_system, source_system; derivatives_switches)
Applies all interactions of source_system
acting on target_system
without multipole acceleration.
Arguments
target_system
: either
source_system
: either
Optional Arguments
derivatives_switches::DerivativesSwitch
: determines whether to include the scalar potential, vector potential, velocity, and/or velocity gradient for the target_system
; either
target_system
is not a ::Tuple
of systems) an instance of DerivativesSwitch
target_system
is a ::Tuple
of systems) a ::Tuple
of DerivativesSwitch
of length length(target_systems)
FastMultipole.direct!
— Methoddirect!(systems; derivatives_switches)
Applies all interactions of systems
acting on itself without multipole acceleration.
Arguments
systems
: either
Optional Arguments
derivatives_switches::DerivativesSwitch
: determines whether to include the scalar potential, vector potential, velocity, and/or velocity gradient when solving the n-body problem; either
systems
is not a ::Tuple
of systems) an instance of DerivativesSwitch
systems
is a ::Tuple
of systems) a ::Tuple
of DerivativesSwitch
of length length(systems)
FastMultipole.drdx
— Methoddrj/dxi
FastMultipole.fmm!
— Methodfmm!(target_systems, source_systems; kwargs...)
Apply all interactions of source_systems
acting on target_systems
using the fast multipole method. Assumes compatibility functions have been overloaded for both source and target systems.
Arguments
target_systems
: either
source_systems
: either
Optional Arguments
expansion_order::Int
: the expansion order to be usedn_per_branch_source::Int
: maximum number of bodies from source_systems
allowed in a leaf-level branchn_per_branch_target::Int
: maximum number of bodies from target_systems
allowed in a leaf-level branchmultipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_source_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for the source_systems
unsort_target_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for the target_systems
source_shink_recenter::Bool
: indicates whether or not to resize branches for the source_systems
octree after it is created to increase computational efficiencytarget_shink_recenter::Bool
: indicates whether or not to resize branches for the target_systems
octree after it is created to increase computational efficiencysave_tree::Bool
: indicates whether or not to save a VTK file for visualizing the octreesave_name::String
: name and path of the octree visualization if save_tree == true
FastMultipole.fmm!
— Methodfmm!(systems; kwargs...)
Apply all interactions of systems
acting on itself using the fast multipole method. Assumes compatibility functions have been overloaded for both source and target systems.
Arguments
systems
: either
Optional Arguments
expansion_order::Int
: the expansion order to be usedn_per_branch::Int
: maximum number of bodies from systems
allowed in a leaf-level branchmultipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for systems
shink_recenter::Bool
: indicates whether or not to resize branches for the octree after it is created to increase computational efficiencysave_tree::Bool
: indicates whether or not to save a VTK file for visualizing the octreesave_name::String
: name and path of the octree visualization if save_tree == true
FastMultipole.fmm!
— Methodfmm!(target_tree, target_systems, source_tree, source_systems; kwargs...)
Dispatches fmm!
using existing ::Tree
objects.
Arguments
target_tree::Tree
: a <:Tree
object (see Tree
)
target_systems
: either
source_tree::Tree
: a <:Tree
object (see Tree
)
source_systems
: either
Optional Arguments
multipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(target_systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_source_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for source_systems
unsort_target_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for target_systems
FastMultipole.fmm!
— Methodfmm!(tree, systems; kwargs...)
Dispatches fmm!
using an existing ::Tree
.
Arguments
tree::Tree
: a <:Tree
object (see Tree
)
systems
: either
Optional Arguments
multipole_acceptance_criterion::Float64
: number between 0 and 1 (often denoted theta in [0,1]) controls the accuracy by determining the non-dimensional distance after which multipoles are used; 0 means an infinite distance (no error, high cost), and 1 means barely convergent (high error, low cost)scalar_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a scalar potential from source_systems
vector_potential::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a vector potential from source_systems
velocity::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity from source_systems
velocity_gradient::Bool
: either a ::Bool
or a ::AbstractVector{Bool}
of length length(systems)
indicating whether each system should receive a velocity gradient from source_systems
nearfield::Bool
: indicates whether near-field (comuted without multipoles) interactions should be includedfarfield::Bool
: indicates whether far-field (comuted with multipoles) interactions should be includedself_induced::Bool
: indicates whether to include the interactions of each leaf-level branch on itselfunsort_bodies::Bool
: indicates whether or not to undo the sort operation used to generate the octree for systems
FastMultipole.reset!
— Methodreset!(probes)
Zeroes all values (e.g. scalar/vector potential, velocity, and/or velocity gradient) of all probes.
Arguments
probes::ProbeSystem
: a ::
ProbeSystem
objectFastMultipole.unsort!
— MethodUndoes the sort operation performed by the tree.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 30 April 2024. Using Julia version 1.10.3.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 23 April 2024. Using Julia version 1.10.2.
Settings
This document was generated with Documenter.jl version 1.4.0 on Tuesday 30 April 2024. Using Julia version 1.10.3.