pub struct DomainBox<Dom> {
pub domain_raw: Dom,
}
Available on crate feature
cpu_os_threads
only.Expand description
Wrapper around the user-defined simulation Domain
Fields§
§domain_raw: Dom
Raw simulation Domain
Trait Implementations§
Source§impl<'de, Dom> Deserialize<'de> for DomainBox<Dom>where
Dom: Deserialize<'de>,
impl<'de, Dom> Deserialize<'de> for DomainBox<Dom>where
Dom: 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
Source§impl<Cel, Ind, Vox, Dom> Domain<CellAgentBox<Cel>, Ind, Vox> for DomainBox<Dom>
impl<Cel, Ind, Vox, Dom> Domain<CellAgentBox<Cel>, Ind, Vox> for DomainBox<Dom>
Source§fn apply_boundary(
&self,
cbox: &mut CellAgentBox<Cel>,
) -> Result<(), BoundaryError>
fn apply_boundary( &self, cbox: &mut CellAgentBox<Cel>, ) -> Result<(), BoundaryError>
Applies boundary conditions to a cell in order to keep it inside the simulation.
For the future, we aim to apply boundary conditions to the position of the cell rather than itself.
In addition, we would like to be able to invoke events such as Remove to maximize flexibility.
Source§fn get_neighbor_voxel_indices(&self, index: &Ind) -> Vec<Ind>
fn get_neighbor_voxel_indices(&self, index: &Ind) -> Vec<Ind>
Retrieves the neighboring voxels of the one specified.
Source§fn get_voxel_index(&self, cbox: &CellAgentBox<Cel>) -> Ind
fn get_voxel_index(&self, cbox: &CellAgentBox<Cel>) -> Ind
Provided a cell, gives the corresponding Index and thus which voxel to sort into.
Source§fn get_all_indices(&self) -> Vec<Ind>
fn get_all_indices(&self) -> Vec<Ind>
Get all indices that are present in the simulation. Required for initial configuration of the simulation domain.
Source§fn generate_contiguous_multi_voxel_regions(
&self,
n_regions: usize,
) -> Result<Vec<Vec<(Ind, Vox)>>, CalcError>
fn generate_contiguous_multi_voxel_regions( &self, n_regions: usize, ) -> Result<Vec<Vec<(Ind, Vox)>>, CalcError>
Allows the backend to split the domain into continuous regions which contain voxels.
These regions can then be used for parallelization.
Auto Trait Implementations§
impl<Dom> Freeze for DomainBox<Dom>where
Dom: Freeze,
impl<Dom> RefUnwindSafe for DomainBox<Dom>where
Dom: RefUnwindSafe,
impl<Dom> Send for DomainBox<Dom>where
Dom: Send,
impl<Dom> Sync for DomainBox<Dom>where
Dom: Sync,
impl<Dom> Unpin for DomainBox<Dom>where
Dom: Unpin,
impl<Dom> UnwindSafe for DomainBox<Dom>where
Dom: 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