pub struct MOLParabolicSolver2D { /* private fields */ }Expand description
Method of Lines solver for 2D parabolic PDEs
Solves equations of the form: ∂u/∂t = ∂/∂x(D_x(x,y,t,u) ∂u/∂x) + ∂/∂y(D_y(x,y,t,u) ∂u/∂y) + v_x(x,y,t,u) ∂u/∂x + v_y(x,y,t,u) ∂u/∂y + f(x,y,t,u)
Implementations§
Source§impl MOLParabolicSolver2D
impl MOLParabolicSolver2D
Sourcepub fn new(
domain: Domain,
time_range: [f64; 2],
diffusion_x: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static,
diffusion_y: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static,
initial_condition: impl Fn(f64, 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_x: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static, diffusion_y: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static, initial_condition: impl Fn(f64, f64) -> f64 + Send + Sync + 'static, boundary_conditions: Vec<BoundaryCondition<f64>>, options: Option<MOLOptions>, ) -> PDEResult<Self>
Create a new Method of Lines solver for 2D parabolic PDEs
Sourcepub fn with_advection(
self,
advection_x: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static,
advection_y: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static,
) -> Self
pub fn with_advection( self, advection_x: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static, advection_y: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static, ) -> Self
Add advection terms to the PDE
Sourcepub fn with_reaction(
self,
reaction_term: impl Fn(f64, f64, f64, f64) -> f64 + Send + Sync + 'static,
) -> Self
pub fn with_reaction( self, reaction_term: impl Fn(f64, 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
Sourcepub fn solve(&self) -> PDEResult<MOL2DResult>
pub fn solve(&self) -> PDEResult<MOL2DResult>
Solve the 2D parabolic PDE
Trait Implementations§
Source§impl Clone for MOLParabolicSolver2D
impl Clone for MOLParabolicSolver2D
Source§fn clone(&self) -> MOLParabolicSolver2D
fn clone(&self) -> MOLParabolicSolver2D
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 MOLParabolicSolver2D
impl !RefUnwindSafe for MOLParabolicSolver2D
impl Send for MOLParabolicSolver2D
impl Sync for MOLParabolicSolver2D
impl Unpin for MOLParabolicSolver2D
impl !UnwindSafe for MOLParabolicSolver2D
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