Mesh2D

Struct Mesh2D 

Source
pub struct Mesh2D<U = u32, F = f64>{
    pub material_count_per_element: Option<MaterialCountPerElement<U>>,
    pub nodes: Vec<Node<U, F>>,
    pub e2ls: Vec<E2L<U>>,
    pub e3ls: Vec<E3L<U>>,
    pub e3ts: Vec<E3T<U>>,
    pub e6ts: Vec<E6T<U>>,
    pub e4qs: Vec<E4Q<U>>,
    pub e8qs: Vec<E8Q<U>>,
    pub e9qs: Vec<E9Q<U>>,
    pub nodestring: Vec<Nodestring<U>>,
}
Expand description

Representation of a .2dm file, as defined in https://www.xmswiki.com/wiki/SMS:2D_Mesh_Files_*.2dm.

You can optionally specify the types of unsigned integers and floats used in this struct using generic types U and F respectively. The defaults are U = u32 and F = f64.

Fields§

§material_count_per_element: Option<MaterialCountPerElement<U>>

Defines number of materials per element.

Corresponds to the card NUM_MATERIALS_PER_ELEM.

This card is mandatory, but did not exist prior to v11.0.

§nodes: Vec<Node<U, F>>

All nodes defined by the mesh.

§e2ls: Vec<E2L<U>>

All 2-noded linear elements defined by the mesh.

§e3ls: Vec<E3L<U>>

All 3-noded linear elements defined by the mesh.

§e3ts: Vec<E3T<U>>

All 3-noded triangular elements defined by the mesh.

§e6ts: Vec<E6T<U>>

All 6-noded triangular elements defined by the mesh.

§e4qs: Vec<E4Q<U>>

All 4-noded quadrilateral elements defined by the mesh.

§e8qs: Vec<E8Q<U>>

All 8-noded quadrilateral elements defined by the mesh.

§e9qs: Vec<E9Q<U>>

All 9-noded quadrilateral elements defined by the mesh.

§nodestring: Vec<Nodestring<U>>

All nodestrings defined by the mesh.

Trait Implementations§

Source§

impl<U, F> Clone for Mesh2D<U, F>

Source§

fn clone(&self) -> Mesh2D<U, F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<U, F> Debug for Mesh2D<U, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<U, F> FromStr for Mesh2D<U, F>

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<U, F> PartialEq for Mesh2D<U, F>

Source§

fn eq(&self, other: &Mesh2D<U, F>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, F> StructuralPartialEq for Mesh2D<U, F>

Auto Trait Implementations§

§

impl<U, F> Freeze for Mesh2D<U, F>
where Error: Sized, U: Freeze,

§

impl<U, F> RefUnwindSafe for Mesh2D<U, F>

§

impl<U, F> Send for Mesh2D<U, F>
where Error: Sized, U: Send, F: Send,

§

impl<U, F> Sync for Mesh2D<U, F>
where Error: Sized, U: Sync, F: Sync,

§

impl<U, F> Unpin for Mesh2D<U, F>
where Error: Sized, U: Unpin, F: Unpin,

§

impl<U, F> UnwindSafe for Mesh2D<U, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.