pub struct LaplaceEquationSolver { /* private fields */ }Expand description
Laplace equation solver implementing PDESolver trait
Implementations§
Source§impl LaplaceEquationSolver
impl LaplaceEquationSolver
pub fn new() -> Self
pub fn with_max_terms(max_terms: usize) -> Self
Sourcepub fn solve_laplace_equation_2d(
&self,
pde: &Pde,
boundary_conditions: &[BoundaryCondition],
) -> Result<LaplaceSolution, PDEError>
pub fn solve_laplace_equation_2d( &self, pde: &Pde, boundary_conditions: &[BoundaryCondition], ) -> Result<LaplaceSolution, PDEError>
Solves the 2D Laplace equation on a rectangle
For the Laplace equation: ∂²u/∂x² + ∂²u/∂y² = 0
on a rectangular domain [0,a] × [0,b] with Dirichlet boundary conditions
§Mathematical Background
Eigenvalues for rectangular domain with Dirichlet BCs:
- x-direction: λₙ = nπ/a for n = 1, 2, 3, …
- y-direction: μₘ = mπ/b for m = 1, 2, 3, …
Solution form: u(x,y) = Σ Cₙ sin(λₙx) sinh(λₙy)
Trait Implementations§
Source§impl Default for LaplaceEquationSolver
impl Default for LaplaceEquationSolver
Auto Trait Implementations§
impl Freeze for LaplaceEquationSolver
impl RefUnwindSafe for LaplaceEquationSolver
impl Send for LaplaceEquationSolver
impl Sync for LaplaceEquationSolver
impl Unpin for LaplaceEquationSolver
impl UnwindSafe for LaplaceEquationSolver
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