pub struct SpectralElementPoisson2D { /* private fields */ }Expand description
2D Poisson solver using spectral element method
Solves: ∇²u = f(x,y) with appropriate boundary conditions
Implementations§
Source§impl SpectralElementPoisson2D
impl SpectralElementPoisson2D
Sourcepub fn new(
domain: Domain,
source_term: impl Fn(f64, f64) -> f64 + Send + Sync + 'static,
boundary_conditions: Vec<BoundaryCondition<f64>>,
options: Option<SpectralElementOptions>,
) -> PDEResult<Self>
pub fn new( domain: Domain, source_term: impl Fn(f64, f64) -> f64 + Send + Sync + 'static, boundary_conditions: Vec<BoundaryCondition<f64>>, options: Option<SpectralElementOptions>, ) -> PDEResult<Self>
Create a new spectral element Poisson solver
§Arguments
domain- Computational domainsource_term- Function f(x,y) for the Poisson equation ∇²u = f(x,y)boundary_conditions- Boundary conditions for the domainoptions- Solver options (or None for defaults)
§Returns
PDEResult<Self>- New solver instance
Sourcepub fn solve(&self) -> PDEResult<SpectralElementResult>
pub fn solve(&self) -> PDEResult<SpectralElementResult>
Solve the Poisson equation using spectral element method
§Returns
PDEResult<SpectralElementResult>- Solution result
Auto Trait Implementations§
impl Freeze for SpectralElementPoisson2D
impl !RefUnwindSafe for SpectralElementPoisson2D
impl Send for SpectralElementPoisson2D
impl Sync for SpectralElementPoisson2D
impl Unpin for SpectralElementPoisson2D
impl !UnwindSafe for SpectralElementPoisson2D
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