Struct Voxel
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: VoxelPlainIndexThe 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: u64A counter to make sure that each Id of a cell is unique.
rng: ChaCha8RngA random number generator which is unique to this voxel and thus able to produce repeatable results even for parallelized simulations.
Trait Implementations§
§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>,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Voxel<C, A>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Voxel<C, A>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<C, A> Serialize for Voxel<C, A>
impl<C, A> Serialize for Voxel<C, A>
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.