pub struct Voxel<C, A> {
pub plain_index: VoxelPlainIndex,
pub neighbors: BTreeSet<VoxelPlainIndex>,
pub cells: Vec<(CellBox<C>, A)>,
pub new_cells: Vec<(C, Option<CellIdentifier>)>,
pub id_counter: u64,
pub rng: ChaCha8Rng,
}
Available on crate feature
chili
only.Expand description
Stores information related to a voxel of the physical simulation domain.
Fields§
§plain_index: VoxelPlainIndex
The index which is given when decomposing the domain and all indices are counted.
neighbors: BTreeSet<VoxelPlainIndex>
Indices of neighboring voxels
cells: Vec<(CellBox<C>, A)>
Cells currently in the voxel
new_cells: Vec<(C, Option<CellIdentifier>)>
New cells which are about to be included into this voxels cells.
id_counter: u64
A counter to make sure that each Id of a cell is unique.
rng: ChaCha8Rng
A random number generator which is unique to this voxel and thus able to produce repeatable results even for parallelized simulations.
Trait Implementations§
Source§impl<'de, C, A> Deserialize<'de> for Voxel<C, A>where
C: Deserialize<'de>,
A: Deserialize<'de>,
impl<'de, C, A> Deserialize<'de> for Voxel<C, A>where
C: Deserialize<'de>,
A: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<C, A> Freeze for Voxel<C, A>
impl<C, A> RefUnwindSafe for Voxel<C, A>where
A: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, A> Send for Voxel<C, A>
impl<C, A> Sync for Voxel<C, A>
impl<C, A> Unpin for Voxel<C, A>
impl<C, A> UnwindSafe for Voxel<C, A>where
A: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more