pub struct MOLParabolicSolver1D { /* private fields */ }Expand description
Method of Lines solver for 1D parabolic PDEs (e.g., heat equation)
Solves equations of the form: u/t = �(ab(x, t, u) u/x) + f(x, t, u)
Implementations§
Source§impl MOLParabolicSolver1D
impl MOLParabolicSolver1D
Sourcepub fn new(
domain: Domain,
time_range: [f64; 2],
diffusion_coeff: impl Fn(f64, f64, f64) -> f64 + Send + Sync + 'static,
initial_condition: impl Fn(f64) -> f64 + Send + Sync + 'static,
boundary_conditions: Vec<BoundaryCondition<f64>>,
options: Option<MOLOptions>,
) -> PDEResult<Self>
pub fn new( domain: Domain, time_range: [f64; 2], diffusion_coeff: impl Fn(f64, f64, f64) -> f64 + Send + Sync + 'static, initial_condition: impl Fn(f64) -> f64 + Send + Sync + 'static, boundary_conditions: Vec<BoundaryCondition<f64>>, options: Option<MOLOptions>, ) -> PDEResult<Self>
Create a new Method of Lines solver for 1D parabolic PDEs
Sourcepub fn with_advection(
self,
advection_coeff: impl Fn(f64, f64, f64) -> f64 + Send + Sync + 'static,
) -> Self
pub fn with_advection( self, advection_coeff: impl Fn(f64, f64, f64) -> f64 + Send + Sync + 'static, ) -> Self
Add an advection term to the PDE
Sourcepub fn with_reaction(
self,
reaction_term: impl Fn(f64, f64, f64) -> f64 + Send + Sync + 'static,
) -> Self
pub fn with_reaction( self, reaction_term: impl Fn(f64, f64, f64) -> f64 + Send + Sync + 'static, ) -> Self
Add a reaction term to the PDE
Sourcepub fn with_fd_scheme(self, scheme: FiniteDifferenceScheme) -> Self
pub fn with_fd_scheme(self, scheme: FiniteDifferenceScheme) -> Self
Set the finite difference scheme for spatial discretization
Trait Implementations§
Source§impl Clone for MOLParabolicSolver1D
impl Clone for MOLParabolicSolver1D
Source§fn clone(&self) -> MOLParabolicSolver1D
fn clone(&self) -> MOLParabolicSolver1D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MOLParabolicSolver1D
impl !RefUnwindSafe for MOLParabolicSolver1D
impl Send for MOLParabolicSolver1D
impl Sync for MOLParabolicSolver1D
impl Unpin for MOLParabolicSolver1D
impl !UnwindSafe for MOLParabolicSolver1D
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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