[−][src]Struct ohsl::mesh1d::Mesh1D
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]
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]
Auto Trait Implementations
impl<T, X> RefUnwindSafe for Mesh1D<T, X> where
T: RefUnwindSafe,
X: RefUnwindSafe,
[src]
T: RefUnwindSafe,
X: RefUnwindSafe,
impl<T, X> Send for Mesh1D<T, X> where
T: Send,
X: Send,
[src]
T: Send,
X: Send,
impl<T, X> Sync for Mesh1D<T, X> where
T: Sync,
X: Sync,
[src]
T: Sync,
X: Sync,
impl<T, X> Unpin for Mesh1D<T, X> where
T: Unpin,
X: Unpin,
[src]
T: Unpin,
X: Unpin,
impl<T, X> UnwindSafe for Mesh1D<T, X> where
T: UnwindSafe,
X: UnwindSafe,
[src]
T: UnwindSafe,
X: UnwindSafe,
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>,