pub struct ReactionDiffusionSystem {
pub n_species: usize,
pub diffusion_coeffs: Vec<f64>,
pub reaction: Arc<dyn Fn(f64, f64, &[f64]) -> Vec<f64> + Send + Sync>,
}Expand description
Reaction-diffusion system: du_i/dt = D_i * d2u_i/dx2 + R_i(x, t, u_1, …, u_m)
where i = 1..m species, D_i are diffusion coefficients, and R_i are reaction terms coupling the species.
Fields§
§n_species: usizeNumber of species
diffusion_coeffs: Vec<f64>Diffusion coefficients for each species
reaction: Arc<dyn Fn(f64, f64, &[f64]) -> Vec<f64> + Send + Sync>Reaction function: (x, t, &[u_species]) -> Vec<f64> (one per species)
Auto Trait Implementations§
impl Freeze for ReactionDiffusionSystem
impl !RefUnwindSafe for ReactionDiffusionSystem
impl Send for ReactionDiffusionSystem
impl Sync for ReactionDiffusionSystem
impl Unpin for ReactionDiffusionSystem
impl UnsafeUnpin for ReactionDiffusionSystem
impl !UnwindSafe for ReactionDiffusionSystem
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> 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