Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2f1a7db
refactor: substitute Interpolations.jl with FastInterpolations.jl
henry2004y Mar 1, 2026
d90e6c3
Try to fix the Float32 vs Float64 bug
henry2004y Mar 2, 2026
c01cc53
fix out-of-bound return type
henry2004y Mar 2, 2026
fe403d1
Update FastInterpolations.jl to v0.4
henry2004y Mar 4, 2026
c3283cd
perf: suppress bounds check for FieldInterpolators (#484)
henry2004y Mar 4, 2026
3d7c0b9
refactor: substitute Interpolations.jl with FastInterpolations.jl
henry2004y Mar 1, 2026
e0b09a9
Try to fix the Float32 vs Float64 bug
henry2004y Mar 2, 2026
5edd96a
fix out-of-bound return type
henry2004y Mar 2, 2026
13ac887
Update FastInterpolations.jl to v0.4
henry2004y Mar 4, 2026
af413c5
Temporary version before FastInterpolations.jl supports constant extr…
henry2004y Mar 4, 2026
3fbfe5d
Merge branch 'fast-interpolations' of https://github.com/henry2004y/T…
henry2004y Mar 4, 2026
bdd6afc
Simplify spherical grid support
henry2004y Mar 5, 2026
b60523f
Update interpolation.jl
henry2004y Mar 5, 2026
980414b
refactor: improve spherical interpolation (#485)
henry2004y Mar 5, 2026
33e74f4
refactor: substitute Interpolations.jl with FastInterpolations.jl
henry2004y Mar 1, 2026
b2d3c0b
Try to fix the Float32 vs Float64 bug
henry2004y Mar 2, 2026
53ae9dc
fix out-of-bound return type
henry2004y Mar 2, 2026
0d8e6cd
Update FastInterpolations.jl to v0.4
henry2004y Mar 4, 2026
a463ff5
Temporary version before FastInterpolations.jl supports constant extr…
henry2004y Mar 4, 2026
2da4f07
refactor: substitute Interpolations.jl with FastInterpolations.jl
henry2004y Mar 1, 2026
c7c0a33
Try to fix the Float32 vs Float64 bug
henry2004y Mar 2, 2026
585a702
Simplify spherical grid support
henry2004y Mar 5, 2026
d3119a4
Update interpolation.jl
henry2004y Mar 5, 2026
9926791
Experimenting backend support for both Interpolations.jl and FastInte…
henry2004y Mar 5, 2026
b1220a4
Merge branch 'fast-interpolations' of https://github.com/henry2004y/T…
henry2004y Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
FastInterpolations = "9ea80cae-fc13-4c00-8066-6eaedb12f34b"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa"
Expand All @@ -38,8 +38,9 @@ Adapt = "4.4"
ChunkSplitters = "3"
DiffResults = "1"
Distributed = "1"
FastInterpolations = "0.4"
ForwardDiff = "1"
Interpolations = "0.15, 0.16"
Interpolations = "0.16"
KernelAbstractions = "0.9"
LinearAlgebra = "1"
Meshes = "0.55, 0.56"
Expand Down
9 changes: 6 additions & 3 deletions src/TestParticle.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module TestParticle

using LinearAlgebra: norm, ×, ⋅, diag, normalize
using Interpolations: interpolate, interpolate!, extrapolate, scale, BSpline, Linear,
Quadratic, Cubic,
Line, OnCell, Periodic, Flat, Gridded
using FastInterpolations: linear_interp, quadratic_interp, cubic_interp, constant_interp,
Extrap, NoExtrap, PeriodicBC, ZeroCurvBC
import Interpolations
using SciMLBase: AbstractODEProblem, AbstractODEFunction, AbstractODESolution, ReturnCode,
BasicEnsembleAlgorithm, EnsembleThreads, EnsembleSerial, EnsembleDistributed,
DEFAULT_SPECIALIZATION, ODEFunction, ODEProblem, remake,
Expand Down Expand Up @@ -41,11 +41,14 @@ export get_gyrofrequency,
export orbit, monitor
export get_fields, get_work
export LazyTimeInterpolator
export AbstractInterpolationBackend, FastInterpolationsBackend, InterpolationsBackend
export TraceProblem, TraceGCProblem, TraceHybridProblem, CartesianGrid, RectilinearGrid, StructuredGrid
export EnsembleSerial, EnsembleThreads, EnsembleDistributed, remake

include("types.jl")
include("utility/utility.jl")
include("utility/interp_backends.jl")
include("utility/fastinterpolation.jl")
include("utility/interpolation.jl")
include("sampler.jl")
include("prepare.jl")
Expand Down
8 changes: 6 additions & 2 deletions src/prepare.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ get_EField(param) = param[3]
prepare_field(f, args...; kwargs...) = Field(f)
prepare_field(f::ZeroField, args...; kwargs...) = f

function prepare_field(f::AbstractArray, x...; gridtype, order, bc, kw...)
return Field(build_interpolator(gridtype, f, x..., order, bc; kw...))
function prepare_field(
f::AbstractArray, x...;
gridtype, order, bc,
backend::AbstractInterpolationBackend = FastInterpolationsBackend(), kw...
)
return Field(build_interpolator(backend, gridtype, f, x..., order, bc; kw...))
end

function _prepare(
Expand Down
Loading
Loading