pub struct HeatEquationSolver { /* private fields */ }Expand description
Heat equation solver implementing PDESolver trait
Implementations§
Source§impl HeatEquationSolver
impl HeatEquationSolver
Sourcepub fn with_max_terms(max_terms: usize) -> Self
pub fn with_max_terms(max_terms: usize) -> Self
Creates solver with custom maximum number of terms
Sourcepub fn solve_heat_equation_1d(
&self,
pde: &Pde,
alpha: &Expression,
boundary_conditions: &[BoundaryCondition],
_initial_condition: &InitialCondition,
) -> PDEResult
pub fn solve_heat_equation_1d( &self, pde: &Pde, alpha: &Expression, boundary_conditions: &[BoundaryCondition], _initial_condition: &InitialCondition, ) -> PDEResult
Solves the 1D heat equation with full Fourier series computation
§Arguments
pde- The heat equation PDEalpha- Thermal diffusivity coefficientboundary_conditions- Boundary conditions_initial_condition- Initial temperature distribution (currently unused)
§Returns
A PDESolution containing the heat equation solution with eigenvalues and
symbolic Fourier coefficients.
§Errors
Returns PDEError::InvalidForm if the PDE does not have exactly 2 independent
variables (x and t for 1D heat equation).
§Mathematical Background
Solution form: u(x,t) = sum A_n sin(sqrt(lambda_n) x) exp(-lambda_n alpha t) where lambda_n are eigenvalues determined by boundary conditions and A_n are Fourier coefficients determined by initial condition.
Trait Implementations§
Source§impl Default for HeatEquationSolver
impl Default for HeatEquationSolver
Auto Trait Implementations§
impl Freeze for HeatEquationSolver
impl RefUnwindSafe for HeatEquationSolver
impl Send for HeatEquationSolver
impl Sync for HeatEquationSolver
impl Unpin for HeatEquationSolver
impl UnwindSafe for HeatEquationSolver
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