caustic/tooling/core/advecator.rs
1//! The `Advector` trait for the 6D transport step.
2//! Advances f by one sub-step using the given force field.
3
4use super::phasespace::PhaseSpaceRepr;
5use super::types::AccelerationField;
6
7/// Trait for all phase-space advection schemes.
8pub trait Advector {
9 /// Advance f in phase space by Δt using the given acceleration.
10 /// Returns nothing — mutates the representation in place.
11 fn step(&self, repr: &mut dyn PhaseSpaceRepr, acceleration: &AccelerationField, dt: f64);
12
13 /// Spatial-only drift step (free streaming): advance f by v·Δt in position at constant v.
14 fn drift(&self, repr: &mut dyn PhaseSpaceRepr, dt: f64);
15
16 /// Velocity-only kick step: advance f by g·Δt in velocity at constant x.
17 fn kick(&self, repr: &mut dyn PhaseSpaceRepr, acceleration: &AccelerationField, dt: f64);
18}