MMSPDEProblem

Struct MMSPDEProblem 

Source
pub struct MMSPDEProblem<F: IntegrateFloat, S: ExactSolution<F>> { /* private fields */ }
Expand description

Manufactured PDE problem for verification

Implementations§

Source§

impl<F: IntegrateFloat, S: ExactSolution<F>> MMSPDEProblem<F, S>

Source

pub fn new_poisson_2d( exact_solution: S, domain_x: [F; 2], domainy: [F; 2], ) -> Self

Create manufactured 2D Poisson problem: -∇²u = f

Source

pub fn new_poisson_3d( exact_solution: S, domain_x: [F; 2], domain_y: [F; 2], domain_z: [F; 2], ) -> Self

Create manufactured 3D Poisson problem: -∇²u = f

Source

pub fn new_diffusion_2d( exact_solution: S, domain_x: [F; 2], domain_y: [F; 2], diffusion_coeff: F, ) -> Self

Create manufactured 2D diffusion problem: ∂u/∂t = α∇²u + f

Source

pub fn new_wave_2d( exact_solution: S, domain_x: [F; 2], domain_y: [F; 2], wave_speed: F, ) -> Self

Create manufactured 2D wave problem: ∂²u/∂t² = c²∇²u + f

Source

pub fn new_helmholtz_2d( exact_solution: S, domain_x: [F; 2], domainy: [F; 2], k: F, ) -> Self

Create manufactured 2D Helmholtz problem: ∇²u + k²u = f

Source

pub fn source_term(&self, coordinates: &[F]) -> F

Get manufactured source term for the PDE

Source

pub fn boundary_condition(&self, x: F, y: F) -> F

Get boundary condition from exact solution (2D)

Source

pub fn boundary_condition_3d(&self, x: F, y: F, z: F) -> F

Get boundary condition from exact solution (3D)

Source

pub fn exact_at(&self, x: F, y: F) -> F

Evaluate exact solution (2D)

Source

pub fn exact_at_3d(&self, x: F, y: F, z: F) -> F

Evaluate exact solution (3D)

Source

pub fn domain(&self) -> ([F; 2], [F; 2])

Get domain bounds (2D)

Source

pub fn domain_3d(&self) -> ([F; 2], [F; 2], [F; 2])

Get domain bounds (3D)

Source

pub fn parameters(&self) -> &PDEParameters<F>

Get PDE parameters

Source

pub fn is_3d(&self) -> bool

Check if problem is 3D

Trait Implementations§

Source§

impl<F: Debug + IntegrateFloat, S: Debug + ExactSolution<F>> Debug for MMSPDEProblem<F, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F, S> Freeze for MMSPDEProblem<F, S>
where S: Freeze, F: Freeze,

§

impl<F, S> RefUnwindSafe for MMSPDEProblem<F, S>

§

impl<F, S> Send for MMSPDEProblem<F, S>
where S: Send, F: Send,

§

impl<F, S> Sync for MMSPDEProblem<F, S>
where S: Sync, F: Sync,

§

impl<F, S> Unpin for MMSPDEProblem<F, S>
where S: Unpin, F: Unpin,

§

impl<F, S> UnwindSafe for MMSPDEProblem<F, S>
where S: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V