pub struct RangeSeparatedPoisson { /* private fields */ }Expand description
Range-separated Poisson solver.
Decomposes the Green’s function G(r) = -1/(4 pi r) into a short-range
component (direct summation within radius r_s) and a long-range
component (solved by an inner PoissonSolver, typically FFT-based).
Implementations§
Source§impl RangeSeparatedPoisson
impl RangeSeparatedPoisson
Sourcepub fn new(
domain: &Domain,
split_radius: f64,
inner: Box<dyn PoissonSolver + Send + Sync>,
) -> Self
pub fn new( domain: &Domain, split_radius: f64, inner: Box<dyn PoissonSolver + Send + Sync>, ) -> Self
Create a new range-separated Poisson solver.
§Arguments
domain– simulation domain (provides grid spacing and resolution)split_radius– the splitting radius r_s in physical units. Cells within distance r_s receive a direct short-range correction.inner– the solver used for the smooth long-range component (e.g.FftPoisson).
Trait Implementations§
Source§impl PoissonSolver for RangeSeparatedPoisson
impl PoissonSolver for RangeSeparatedPoisson
Source§fn solve(&self, density: &DensityField, g: f64) -> PotentialField
fn solve(&self, density: &DensityField, g: f64) -> PotentialField
Solve for the gravitational potential by combining long-range (inner solver)
and short-range (direct summation within r_s) contributions.
Source§fn compute_acceleration(&self, potential: &PotentialField) -> AccelerationField
fn compute_acceleration(&self, potential: &PotentialField) -> AccelerationField
Compute the gravitational acceleration via second-order finite differences on the potential.
Source§fn set_progress(&mut self, _progress: Arc<StepProgress>)
fn set_progress(&mut self, _progress: Arc<StepProgress>)
Attach shared progress state for intra-phase cell-level reporting.
Auto Trait Implementations§
impl Freeze for RangeSeparatedPoisson
impl !RefUnwindSafe for RangeSeparatedPoisson
impl Send for RangeSeparatedPoisson
impl Sync for RangeSeparatedPoisson
impl Unpin for RangeSeparatedPoisson
impl UnsafeUnpin for RangeSeparatedPoisson
impl !UnwindSafe for RangeSeparatedPoisson
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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