pub struct MergerIC {
pub body1: Box<dyn IsolatedEquilibrium>,
pub mass1: Decimal,
pub body2: Box<dyn IsolatedEquilibrium>,
pub mass2: Decimal,
pub separation: [f64; 3],
pub relative_velocity: [f64; 3],
pub impact_parameter: Decimal,
/* private fields */
}Expand description
Binary merger initial conditions: two displaced and boosted equilibria.
The combined distribution is f(x,v) = f1(x-x1, v-v1) + f2(x-x2, v-v2), exact for collisionless systems before the halos begin to interact.
Fields§
§body1: Box<dyn IsolatedEquilibrium>First body’s equilibrium distribution (e.g. Plummer, King, NFW).
mass1: DecimalTotal mass of the first body.
body2: Box<dyn IsolatedEquilibrium>Second body’s equilibrium distribution.
mass2: DecimalTotal mass of the second body.
separation: [f64; 3]Initial separation vector between the two centres (body2 - body1).
relative_velocity: [f64; 3]Relative velocity of body 2 with respect to body 1.
impact_parameter: DecimalTransverse offset for off-axis encounters; zero gives a head-on merger.
Implementations§
Source§impl MergerIC
impl MergerIC
Sourcepub fn new(
body1: Box<dyn IsolatedEquilibrium>,
mass1: f64,
body2: Box<dyn IsolatedEquilibrium>,
mass2: f64,
separation: [f64; 3],
relative_velocity: [f64; 3],
impact_parameter: f64,
) -> Self
pub fn new( body1: Box<dyn IsolatedEquilibrium>, mass1: f64, body2: Box<dyn IsolatedEquilibrium>, mass2: f64, separation: [f64; 3], relative_velocity: [f64; 3], impact_parameter: f64, ) -> Self
Create a MergerIC from f64 parameters (backward-compatible).
Sourcepub fn new_decimal(
body1: Box<dyn IsolatedEquilibrium>,
mass1: Decimal,
body2: Box<dyn IsolatedEquilibrium>,
mass2: Decimal,
separation: [f64; 3],
relative_velocity: [f64; 3],
impact_parameter: Decimal,
) -> Self
pub fn new_decimal( body1: Box<dyn IsolatedEquilibrium>, mass1: Decimal, body2: Box<dyn IsolatedEquilibrium>, mass2: Decimal, separation: [f64; 3], relative_velocity: [f64; 3], impact_parameter: Decimal, ) -> Self
Create a MergerIC from Decimal parameters (exact config).
Sourcepub fn sample_on_grid(
&self,
domain: &Domain,
progress: Option<&StepProgress>,
) -> PhaseSpaceSnapshot
pub fn sample_on_grid( &self, domain: &Domain, progress: Option<&StepProgress>, ) -> PhaseSpaceSnapshot
Sample both components on the grid and sum. Body 1 is centred at (-sep/2, 0, 0) with velocity (-v_rel/2, 0, 0). Body 2 is centred at (+sep/2, 0, 0) with velocity (+v_rel/2, 0, 0).
Auto Trait Implementations§
impl Freeze for MergerIC
impl !RefUnwindSafe for MergerIC
impl Send for MergerIC
impl Sync for MergerIC
impl Unpin for MergerIC
impl UnsafeUnpin for MergerIC
impl !UnwindSafe for MergerIC
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