Skip to main content

MeshBundle

Struct MeshBundle 

Source
pub struct MeshBundle<S, V, St, CtSt>
where St: Storage<V>, CtSt: Storage<CellType>,
{ pub meshes: Vec<MeshData<S, V, St, CtSt>>, }
Expand description

Collection of mesh topologies with separate section data.

Fields§

§meshes: Vec<MeshData<S, V, St, CtSt>>

Individual mesh containers.

Implementations§

Source§

impl<S, V, St, CtSt> MeshBundle<S, V, St, CtSt>
where St: Storage<V>, CtSt: Storage<CellType>,

Source

pub fn new(meshes: Vec<MeshData<S, V, St, CtSt>>) -> Self

Construct a bundle from a list of meshes.

Source

pub fn push(&mut self, mesh: MeshData<S, V, St, CtSt>)

Add a mesh to the bundle.

Source

pub fn meshes(&self) -> &[MeshData<S, V, St, CtSt>]

Borrow all meshes immutably.

Source

pub fn meshes_mut(&mut self) -> &mut [MeshData<S, V, St, CtSt>]

Borrow all meshes mutably.

Source§

impl<S, V, St, CtSt> MeshBundle<S, V, St, CtSt>
where S: Sieve<Point = PointId>, St: Storage<V>, CtSt: Storage<CellType>,

Source

pub fn sync_labels(&mut self) -> usize

Synchronize label entries for shared points across all meshes.

For every label entry appearing in any mesh, this updates every other mesh that contains the same point to carry that label value.

Returns the number of label entries applied across meshes.

Source§

impl<S, V, St, CtSt> MeshBundle<S, V, St, CtSt>
where S: Sieve<Point = PointId>, V: Clone + Default + PartialEq, St: Storage<V> + Clone, CtSt: Storage<CellType>,

Source

pub fn sync_coordinates(&mut self) -> Result<(), MeshSieveError>

Synchronize coordinate values for shared points across all meshes.

Returns an error if coordinate dimensions differ or if conflicting values are detected for the same point.

Trait Implementations§

Source§

impl<S: Debug, V: Debug, St, CtSt> Debug for MeshBundle<S, V, St, CtSt>
where St: Storage<V> + Debug, CtSt: Storage<CellType> + Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S, V, St, CtSt> Freeze for MeshBundle<S, V, St, CtSt>

§

impl<S, V, St, CtSt> RefUnwindSafe for MeshBundle<S, V, St, CtSt>

§

impl<S, V, St, CtSt> Send for MeshBundle<S, V, St, CtSt>
where S: Send, CtSt: Send, St: Send, V: Send,

§

impl<S, V, St, CtSt> Sync for MeshBundle<S, V, St, CtSt>
where S: Sync, CtSt: Sync, St: Sync, V: Sync,

§

impl<S, V, St, CtSt> Unpin for MeshBundle<S, V, St, CtSt>
where S: Unpin, CtSt: Unpin, St: Unpin, V: Unpin,

§

impl<S, V, St, CtSt> UnsafeUnpin for MeshBundle<S, V, St, CtSt>

§

impl<S, V, St, CtSt> UnwindSafe for MeshBundle<S, V, St, CtSt>

Blanket Implementations§

Source§

impl<T> AccumulatePathExt for T

Source§

fn accumulate_path<O, I>(path: I) -> O
where O: Orientation, I: IntoIterator<Item = O>,

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