pub struct SphericalRepr {
pub data: Vec<f64>,
pub shape: [usize; 3],
pub r_range: (f64, f64),
pub v_range: (f64, f64),
pub l_range: (f64, f64),
pub dr: f64,
pub dv: f64,
pub dl: f64,
pub domain: Domain,
}Expand description
Spherically symmetric phase-space representation on a (r, v_r, L) grid.
Fields§
§data: Vec<f64>Distribution function values: f[ir * nv * nl + iv * nl + il].
shape: [usize; 3]Grid sizes [nr, nv, nl].
r_range: (f64, f64)Radial grid: r ∈ [r_min, r_max].
v_range: (f64, f64)Radial velocity grid: v_r ∈ [-v_max, v_max].
l_range: (f64, f64)Angular momentum grid: L ∈ [0, L_max].
dr: f64Cell spacings.
dv: f64§dl: f64§domain: DomainDomain (for PhaseSpaceRepr trait compatibility).
Implementations§
Trait Implementations§
Source§impl PhaseSpaceRepr for SphericalRepr
impl PhaseSpaceRepr for SphericalRepr
Source§fn compute_density(&self) -> DensityField
fn compute_density(&self) -> DensityField
Compute spherically averaged density rho(r) by integrating f over v_r and L.
Source§fn advect_x(&mut self, _displacement: &DisplacementField, dt: f64)
fn advect_x(&mut self, _displacement: &DisplacementField, dt: f64)
Radial drift sub-step: semi-Lagrangian shift along r with dr/dt = v_r.
Source§fn advect_v(&mut self, acceleration: &AccelerationField, dt: f64)
fn advect_v(&mut self, acceleration: &AccelerationField, dt: f64)
Velocity kick sub-step: semi-Lagrangian shift along v_r with dv_r/dt = -dPhi/dr + L^2/r^3 (gravitational + centrifugal acceleration).
Source§fn moment(&self, _position: &[f64; 3], _order: usize) -> Tensor
fn moment(&self, _position: &[f64; 3], _order: usize) -> Tensor
Velocity moment (stub – returns an empty tensor).
Source§fn total_mass(&self) -> f64
fn total_mass(&self) -> f64
Total mass by integrating f over the (r, v_r, L) grid with 4pir^2 Jacobian.
Source§fn casimir_c2(&self) -> f64
fn casimir_c2(&self) -> f64
Casimir C2 = integral of f^2 over the reduced phase space.
Source§fn stream_count(&self) -> StreamCountField
fn stream_count(&self) -> StreamCountField
Stream count (stub – returns zeros; not applicable in spherical coords).
Source§fn velocity_distribution(&self, _position: &[f64; 3]) -> Vec<f64>
fn velocity_distribution(&self, _position: &[f64; 3]) -> Vec<f64>
Local velocity distribution (stub – returns empty; use radial profiles instead).
Source§fn total_kinetic_energy(&self) -> Option<f64>
fn total_kinetic_energy(&self) -> Option<f64>
Total kinetic energy T = 0.5 * integral of f*(v_r^2 + L^2/r^2) over phase space.
Source§fn to_snapshot(&self, time: f64) -> Option<PhaseSpaceSnapshot>
fn to_snapshot(&self, time: f64) -> Option<PhaseSpaceSnapshot>
Serialize the 3D grid into a PhaseSpaceSnapshot for checkpointing.
Source§fn load_snapshot(
&mut self,
snap: PhaseSpaceSnapshot,
) -> Result<(), CausticError>
fn load_snapshot( &mut self, snap: PhaseSpaceSnapshot, ) -> Result<(), CausticError>
Restore the grid data from a previously saved snapshot.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to &mut dyn Any for runtime type queries.
Source§fn memory_bytes(&self) -> usize
fn memory_bytes(&self) -> usize
Heap memory used by the distribution function data array.
Source§fn set_progress(&mut self, _p: Arc<StepProgress>)
fn set_progress(&mut self, _p: Arc<StepProgress>)
StepProgress::set_intra_progress.Source§fn can_materialize(&self) -> bool
fn can_materialize(&self) -> bool
Auto Trait Implementations§
impl Freeze for SphericalRepr
impl RefUnwindSafe for SphericalRepr
impl Send for SphericalRepr
impl Sync for SphericalRepr
impl Unpin for SphericalRepr
impl UnsafeUnpin for SphericalRepr
impl UnwindSafe for SphericalRepr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more