pub struct WaveEquationSolver { /* private fields */ }Expand description
Wave equation solver implementing PDESolver trait
Implementations§
Source§impl WaveEquationSolver
impl WaveEquationSolver
pub fn new() -> Self
pub fn with_max_terms(max_terms: usize) -> Self
Sourcepub fn solve_wave_equation_1d(
&self,
pde: &Pde,
wave_speed: &Expression,
boundary_conditions: &[BoundaryCondition],
initial_position: &InitialCondition,
initial_velocity: &InitialCondition,
) -> Result<WaveSolution, PDEError>
pub fn solve_wave_equation_1d( &self, pde: &Pde, wave_speed: &Expression, boundary_conditions: &[BoundaryCondition], initial_position: &InitialCondition, initial_velocity: &InitialCondition, ) -> Result<WaveSolution, PDEError>
Solves the 1D wave equation with full Fourier series computation
For the wave equation: ∂²u/∂t² = c²∂²u/∂x² with Dirichlet boundary conditions and initial conditions for u and ∂u/∂t
§Arguments
pde- The wave equation PDEwave_speed- Wave propagation speed coefficient cboundary_conditions- Boundary conditions (typically Dirichlet: u(0,t)=0, u(L,t)=0)initial_position- Initial displacement: u(x,0) = f(x)initial_velocity- Initial velocity: ∂u/∂t(x,0) = g(x)
Trait Implementations§
Source§impl Default for WaveEquationSolver
impl Default for WaveEquationSolver
Auto Trait Implementations§
impl Freeze for WaveEquationSolver
impl RefUnwindSafe for WaveEquationSolver
impl Send for WaveEquationSolver
impl Sync for WaveEquationSolver
impl Unpin for WaveEquationSolver
impl UnwindSafe for WaveEquationSolver
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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