Struct SimulationSetup
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: D
The physical simulation domain which is specified by the Domain trait.
Implementations§
§impl<C, D> SimulationSetup<C, D>
impl<C, D> SimulationSetup<C, D>
pub fn insert_cells<I>(&mut self, cells: I)where
I: IntoIterator<Item = C>,
Available on crate feature cpu_os_threads
only.
pub fn insert_cells<I>(&mut self, cells: I)where
I: IntoIterator<Item = C>,
cpu_os_threads
only.Insert more cells into the setup after having already initialized the setup.
pub fn decompose<S>(
self,
n_subdomains: NonZero<usize>,
) -> Result<DecomposedDomain<<D as Domain<C, S>>::SubDomainIndex, S, C>, DecomposeError>
Available on crate feature cpu_os_threads
only.
pub fn decompose<S>( self, n_subdomains: NonZero<usize>, ) -> Result<DecomposedDomain<<D as Domain<C, S>>::SubDomainIndex, S, C>, DecomposeError>
cpu_os_threads
only.Decomposes the struct into a DecomposedDomain which can be taken by the backend and turned into multiple subdomains.
pub fn decompose_auto_tune<S>(
self,
) -> Result<DecomposedDomain<<D as Domain<C, S>>::SubDomainIndex, S, C>, DecomposeError>
Available on crate feature cpu_os_threads
only.
pub fn decompose_auto_tune<S>( self, ) -> Result<DecomposedDomain<<D as Domain<C, S>>::SubDomainIndex, S, C>, DecomposeError>
cpu_os_threads
only.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§
§impl<C, D> Clone for SimulationSetup<C, D>
impl<C, D> Clone for SimulationSetup<C, D>
§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 more§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>,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SimulationSetup<C, D>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SimulationSetup<C, D>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl<C, D> Serialize for SimulationSetup<C, D>
impl<C, D> Serialize for SimulationSetup<C, D>
§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,
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,
§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> ⓘ
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§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>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.