pub struct SimulationSetup<C, D> {
pub cells: Vec<C>,
pub domain: D,
}chili only.Expand description
Struct containing all necessary information to construct a fully working simulation and run it.
Fields§
§cells: Vec<C>The initial cells contained in the simulation. In the future we hope to provide an abstract type in order to allow for pure iterators to be stored here
domain: DThe physical simulation domain which is specified by the Domain trait.
Implementations§
Source§impl<C, D> SimulationSetup<C, D>
impl<C, D> SimulationSetup<C, D>
Sourcepub fn insert_cells<I>(&mut self, cells: I)where
I: IntoIterator<Item = C>,
pub fn insert_cells<I>(&mut self, cells: I)where
I: IntoIterator<Item = C>,
Insert more cells into the setup after having already initialized the setup.
Sourcepub fn decompose<S>(
self,
n_subdomains: NonZeroUsize,
) -> Result<DecomposedDomain<D::SubDomainIndex, S, C>, DecomposeError>
pub fn decompose<S>( self, n_subdomains: NonZeroUsize, ) -> Result<DecomposedDomain<D::SubDomainIndex, S, C>, DecomposeError>
Decomposes the struct into a DecomposedDomain which can be taken by the backend and turned into multiple subdomains.
Sourcepub fn decompose_auto_tune<S>(
self,
) -> Result<DecomposedDomain<D::SubDomainIndex, S, C>, DecomposeError>
pub fn decompose_auto_tune<S>( self, ) -> Result<DecomposedDomain<D::SubDomainIndex, S, C>, DecomposeError>
Similar to decompose method but does not require to specify how many subdomains should be chosen. It will attempt to retrieve resources available to the system and spawn threads which are either pre-calculated, read from an existing file or acquired by auto-tuning.
Trait Implementations§
Source§impl<C: Clone, D: Clone> Clone for SimulationSetup<C, D>
impl<C: Clone, D: Clone> Clone for SimulationSetup<C, D>
Source§fn clone(&self) -> SimulationSetup<C, D>
fn clone(&self) -> SimulationSetup<C, D>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de, C, D> Deserialize<'de> for SimulationSetup<C, D>where
C: Deserialize<'de>,
D: Deserialize<'de>,
impl<'de, C, D> Deserialize<'de> for SimulationSetup<C, D>where
C: Deserialize<'de>,
D: 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>,
Auto Trait Implementations§
impl<C, D> Freeze for SimulationSetup<C, D>where
D: Freeze,
impl<C, D> RefUnwindSafe for SimulationSetup<C, D>where
D: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, D> Send for SimulationSetup<C, D>
impl<C, D> Sync for SimulationSetup<C, D>
impl<C, D> Unpin for SimulationSetup<C, D>
impl<C, D> UnwindSafe for SimulationSetup<C, D>where
D: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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