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