pub struct Domain {
pub ranges: Vec<Range<f64>>,
pub grid_points: Vec<usize>,
}Expand description
Domain for the PDE problem
Fields§
§ranges: Vec<Range<f64>>Ranges defining the spatial domain for each dimension
grid_points: Vec<usize>Number of grid points in each dimension
Implementations§
Source§impl Domain
impl Domain
Sourcepub fn new(ranges: Vec<Range<f64>>, grid_points: Vec<usize>) -> PDEResult<Self>
pub fn new(ranges: Vec<Range<f64>>, grid_points: Vec<usize>) -> PDEResult<Self>
Create a new domain with given ranges and number of grid points
Sourcepub fn dimensions(&self) -> usize
pub fn dimensions(&self) -> usize
Get the number of dimensions in the domain
Sourcepub fn grid_spacing(&self, dimension: usize) -> PDEResult<f64>
pub fn grid_spacing(&self, dimension: usize) -> PDEResult<f64>
Get the grid spacing for a given dimension
Sourcepub fn grid(&self, dimension: usize) -> PDEResult<Array1<f64>>
pub fn grid(&self, dimension: usize) -> PDEResult<Array1<f64>>
Generate a grid for the given dimension
Sourcepub fn total_grid_points(&self) -> usize
pub fn total_grid_points(&self) -> usize
Get the total number of grid points in the domain
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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