Struct rustencils::grid::CartesianGridSpec[][src]

pub struct CartesianGridSpec { /* fields omitted */ }

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]

impl PartialEq<CartesianGridSpec> for CartesianGridSpec[src]

impl StructuralPartialEq for CartesianGridSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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