[−][src]Struct ohsl::mesh2d::Mesh2D
Implementations
impl<T: Clone + Number> Mesh2D<T>
[src]
pub fn new(x_nodes: Vector<f64>, y_nodes: Vector<f64>, nvars: usize) -> Self
[src]
Create a new 2D mesh
pub fn nvars(&self) -> usize
[src]
Return the number of variables stored at each node in the mesh
pub fn nnodes(&self) -> (usize, usize)
[src]
Return the number of nodal points in each direction
pub fn coord(&self, nodex: usize, nodey: usize) -> (f64, f64)
[src]
Return the spatial position of a specfied nodes as a tuple
pub fn xnodes(&self) -> Vector<f64>
[src]
Return the vector of x-nodal positions
pub fn ynodes(&self) -> Vector<f64>
[src]
Return the vector of y-nodal positions
pub fn set_nodes_vars(&mut self, nodex: usize, nodey: usize, vec: Vector<T>)
[src]
Set the variables stored at a specified node
pub fn get_nodes_vars(&self, nodex: usize, nodey: usize) -> Vector<T>
[src]
Get the vector of variables stored at a specified node
pub fn assign(&mut self, element: T)
[src]
Assign an element to all entries in the mesh
pub fn cross_section_xnode(&self, nodex: usize) -> Mesh1D<T, f64>
[src]
Return a cross section of the 2D mesh at a specified x node
pub fn cross_section_ynode(&self, nodey: usize) -> Mesh1D<T, f64>
[src]
Return a cross section of the 2D mesh at a specified y node
pub fn var_as_matrix(&self, var: usize) -> Matrix<T>
[src]
Return a matrix for a variable corresponding to each nodal point
pub fn apply(&mut self, func: &dyn Fn(f64, f64) -> T, var: usize)
[src]
Apply a function to the a specified variable in the mesh
impl Mesh2D<f64>
[src]
pub fn trapezium(&self, var: usize) -> f64
[src]
Integrate a given variable over the domain (trapezium rule)
pub fn square_trapezium(&self, var: usize) -> f64
[src]
Integrate the square of a given variable over the domain (trapezium rule)
impl<T: Display> Mesh2D<T>
[src]
pub fn output(&self, filename: &str, precision: usize)
[src]
Print the mesh to a file
pub fn output_var(&self, filename: &str, var: usize, precision: usize)
[src]
Print the mesh of a single variable to a file
Trait Implementations
impl<T> Index<(usize, usize)> for Mesh2D<T>
[src]
type Output = Vector<T>
The returned type after indexing.
pub fn index<'a>(&'a self, node: (usize, usize)) -> &'a Vector<T>
[src]
Indexing operator [] (read only) - returns the vector of variables stored at the node specified by a tuple.
impl<T> IndexMut<(usize, usize)> for Mesh2D<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Mesh2D<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Mesh2D<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Mesh2D<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Mesh2D<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Mesh2D<T> where
T: UnwindSafe,
[src]
T: 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>,