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
| Topic | Page |
|---|---|
| Particle containers, initialization, advection, maintenance, phase ratios, subgrid diffusion | Particles |
| Cell storage, allocation and halo exchange | CellArrays |
| Grid/particle and centroid transfers | Interpolations |
| Velocity reconstruction schemes | Velocity interpolation |
| Marker-chain surface tracking | Marker chain |
| Marker-surface (3D free surface) tracking | Marker surface |
| Checkpointing and restart | I/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.TA — Function
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.
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.
Grid helpers
JustPIC.add_periodic_ghost_nodes — Function
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)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.
Index
JustPIC.AbstractAdvectionIntegratorJustPIC.EulerJustPIC.MarkerChainJustPIC.MarkerSurfaceJustPIC.ParticlesJustPIC.PassiveMarkersJustPIC.PhaseRatiosJustPIC.RungeKutta2JustPIC.RungeKutta4JustPIC.SubgridDiffusionCellArraysJustPIC.CAJustPIC.TAJustPIC.add_periodic_ghost_nodesJustPIC.advect_marker_surface!JustPIC.advect_markerchain!JustPIC.advect_surface_topo!JustPIC.advection!JustPIC.advection_LinP!JustPIC.advection_MQS!JustPIC.cell_arrayJustPIC.cell_lengthJustPIC.cellaxesJustPIC.cellnumJustPIC.centroid2particle!JustPIC.checkpointing_particlesJustPIC.clean_particles!JustPIC.compute_avg_topoJustPIC.compute_rock_fraction!JustPIC.compute_rock_fraction!JustPIC.compute_topography_vertex!JustPIC.fill_chain_from_chain!JustPIC.fill_chain_from_vertices!JustPIC.force_injection!JustPIC.grid2particle!JustPIC.grid2particle_flip!JustPIC.init_cell_arraysJustPIC.init_marker_surfaceJustPIC.init_markerchainJustPIC.init_particlesJustPIC.init_passive_markersJustPIC.inject_particles!JustPIC.inject_particles_phase!JustPIC.interpolate_velocity_to_markerchain!JustPIC.interpolate_velocity_to_surface_vertices!JustPIC.launch!JustPIC.move_particles!JustPIC.nphasesJustPIC.particle2centroid!JustPIC.particle2grid!JustPIC.resample!JustPIC.semilagrangian_advection!JustPIC.semilagrangian_advection_LinP!JustPIC.semilagrangian_advection_MQS!JustPIC.semilagrangian_advection_markerchain!JustPIC.set_precisionJustPIC.set_topo_from_array!JustPIC.smooth_surface_max_angle!JustPIC.subgrid_diffusion!JustPIC.subgrid_diffusion_centroid!JustPIC.update_cell_halo!JustPIC.update_surface_halo!