Struct rustencils::grid::CartesianGridSpec [−][src]
The CartesianGridSpec struct represents the specifications of a Grid in Cartesian coordinates. The dimensionality can be any size, which means it could be more or less than the standard 3-dimensional Cartesian coordinate space.
Implementations
impl CartesianGridSpec
[src]
pub fn new(axes: Vec<AxisSetup>) -> Self
[src]
Returns a CartesianGridSpec built from a vector of AxisSetup structs.
Arguments
axes
- vector containing one or more instances of AxisSetup (Vec)
Examples
use rustencils::grid::{AxisSetup, GridSpec, CartesianGridSpec}; let x = AxisSetup::new(0., 0.01, 100); let y = x.clone(); let axs = vec![x, y]; let spec = CartesianGridSpec::new(axs); assert_eq!(spec.get_gridshape(), &vec![100,100]); assert_eq!(spec.get_spacing(), &vec![0.01,0.01]);
Trait Implementations
impl Debug for CartesianGridSpec
[src]
impl GridSpec for CartesianGridSpec
[src]
fn get_coords(&self) -> &Vec<Vec<f64>>
[src]
fn get_ndim(&self) -> usize
[src]
fn get_gridshape(&self) -> &Vec<usize>
[src]
fn get_spacing(&self) -> &Vec<f64>
[src]
fn get_grid(&self) -> &Grid
[src]
fn get_bound_pts(&self, dimension: usize, side: BoundarySide) -> Vec<Point>
[src]
fn get_bound_idxs(&self, dimension: usize, side: BoundarySide) -> Vec<usize>
[src]
impl PartialEq<CartesianGridSpec> for CartesianGridSpec
[src]
fn eq(&self, other: &CartesianGridSpec) -> bool
[src]
fn ne(&self, other: &CartesianGridSpec) -> bool
[src]
impl StructuralPartialEq for CartesianGridSpec
[src]
Auto Trait Implementations
impl RefUnwindSafe for CartesianGridSpec
impl Send for CartesianGridSpec
impl Sync for CartesianGridSpec
impl Unpin for CartesianGridSpec
impl UnwindSafe for CartesianGridSpec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,