[][src]Struct ohsl::mesh1d::Mesh1D

pub struct Mesh1D<T, X> { /* fields omitted */ }

Implementations

impl<T: Clone + Number, X: Clone + Number + Copy> Mesh1D<T, X>[src]

pub fn new(nodes: Vector<X>, nvars: usize) -> Self[src]

Create a new 1D mesh

pub fn nnodes(&self) -> usize[src]

Return the number of nodal points in the mesh

pub fn nvars(&self) -> usize[src]

Return the number of variables stored at each node in the mesh

pub fn coord(&self, node: usize) -> X[src]

Return the nodal coordinate at a specified index

pub fn set_nodes_vars(&mut self, node: usize, vec: Vector<T>)[src]

Set the variables stored at a specified node

pub fn get_nodes_vars(&self, node: usize) -> Vector<T>[src]

Get the vector of variables stored at a specified node

pub fn nodes(&self) -> Vector<X>[src]

Return the vector of nodal positions

impl Mesh1D<f64, f64>[src]

pub fn get_interpolated_vars(&self, x_pos: f64) -> Vector<f64>[src]

Get the variables at an interpolated position ( first order scheme )

pub fn trapezium(&self, var: usize) -> f64[src]

Integrate a given variable over the domain (trapezium rule)

pub fn read(&mut self, filename: &str)[src]

Read data from a file (overwrites nodes with file nodes)

impl<T: Display, X: Display> Mesh1D<T, X>[src]

pub fn output(&self, filename: &str, precision: usize)[src]

Print the mesh to a file

Trait Implementations

impl<T, X> Index<usize> for Mesh1D<T, X>[src]

type Output = Vector<T>

The returned type after indexing.

pub fn index<'a>(&'a self, node: usize) -> &'a Vector<T>[src]

Indexing operator [] (read only) - returns the vector of variables stored at the specified node.

impl<T, X> IndexMut<usize> for Mesh1D<T, X>[src]

pub fn index_mut(&mut self, node: usize) -> &mut Vector<T>[src]

Indexing operator [] (read/write) - returns the vector of variables stored at the specified node.

Auto Trait Implementations

impl<T, X> RefUnwindSafe for Mesh1D<T, X> where
    T: RefUnwindSafe,
    X: RefUnwindSafe
[src]

impl<T, X> Send for Mesh1D<T, X> where
    T: Send,
    X: Send
[src]

impl<T, X> Sync for Mesh1D<T, X> where
    T: Sync,
    X: Sync
[src]

impl<T, X> Unpin for Mesh1D<T, X> where
    T: Unpin,
    X: Unpin
[src]

impl<T, X> UnwindSafe for Mesh1D<T, X> where
    T: UnwindSafe,
    X: UnwindSafe
[src]

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>,