Public API

The reference is organized by workflow. Each manual page documents the symbols belonging to its topic; this page collects the remaining backend and grid helpers and provides a searchable index of everything.

Where to find each group

TopicPage
Particle containers, initialization, advection, maintenance, phase ratios, subgrid diffusionParticles
Cell storage, allocation and halo exchangeCellArrays
Grid/particle and centroid transfersInterpolations
Velocity reconstruction schemesVelocity interpolation
Marker-chain surface trackingMarker chain
Marker-surface (3D free surface) trackingMarker surface
Checkpointing and restartI/O

Backends

JustPIC dispatches on KernelAbstractions backend types directly — CPU for the CPU path and the vendor backends CUDA.CUDABackend, AMDGPU.ROCBackend, Metal.MetalBackend, introduced by the respective package extensions. Load the vendor package to activate its extension; JustPIC defines no backend tags of its own.

TA(backend) selects the plain array type for a backend, and launch! runs a KernelAbstractions kernel on it, synchronizing before returning.

JustPIC.TAFunction
TA()
TA(backend)

Return the plain array type associated with backend (a KernelAbstractions backend type such as CPU).

For CPU this is Array. Loading CUDA.jl / AMDGPU.jl / Metal.jl extends this for CUDA.CUDABackend, AMDGPU.ROCBackend, and Metal.MetalBackend, respectively.

source
JustPIC.launch!Function
launch!(backend, kernel!, ndrange, args...)

Instantiate and run KernelAbstractions kernel! on backend over ndrange, then block until it completes.

The trailing synchronize keeps the package's historical synchronous launch semantics: host reads, MPI halo exchanges and injection/cleanup all assume the previous kernel has finished. A later optimization pass may drop per-launch synchronization in favor of synchronizing only before host access.

source

Grid helpers

JustPIC.add_periodic_ghost_nodesFunction
add_periodic_ghost_nodes(x::AbstractVector)

Extend a 1D periodic grid with one ghost node on each side.

The added coordinates preserve the spacing of the last and first physical cells, respectively, which makes this helper work for both uniform and refined grids.

Example

xv = [0.0, 0.25, 0.5, 0.75, 1.0]
xv_periodic = add_periodic_ghost_nodes(xv)
source

Container conversion

to_cpu copies arrays and JustPIC cell arrays to CPU storage. Pass a numeric type to convert the stored values during the copy; tuples are converted recursively.

Missing docstring.

Missing docstring for to_cpu. Check Documenter's build log for details.

Index