Struct SimulationSupervisor

Source
pub struct SimulationSupervisor<MVC, Dom, Cel, Cont = (), Obs = ()>
where Cel: Serialize + for<'a> Deserialize<'a>, Dom: Serialize + for<'a> Deserialize<'a>, Cont: Serialize + for<'a> Deserialize<'a>,
{ pub storage: StorageBuilder<true>, pub config: SimulationConfig, /* private fields */ }
Available on crate feature cpu_os_threads only.
Expand description

§Supervisor controlling simulation execution

Fields§

§storage: StorageBuilder<true>

Defines in which format and if results should be saved. See StorageBuilder.

§config: SimulationConfig

Overall parameters of the simulation. See SimulationConfig.

Implementations§

Source§

impl<Pos, For, Inf, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Cel, Ind, Vox, Dom, Cont, Obs> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>
where Dom: Domain<Cel, Ind, Vox> + Clone + 'static, Ind: Index + 'static, Pos: Serialize + for<'a> Deserialize<'a> + PositionBound + 'static + Debug, For: Serialize + for<'a> Deserialize<'a> + ForceBound + 'static, Vel: Serialize + for<'a> Deserialize<'a> + VelocityBound + 'static, ConcVecExtracellular: Serialize + for<'a> Deserialize<'a>, ConcBoundaryExtracellular: Serialize + for<'a> Deserialize<'a>, ConcVecIntracellular: Serialize + for<'a> Deserialize<'a> + Zero, Vox: Voxel<Ind, Pos, Vel, For> + Clone + 'static, Cel: Agent<Pos, Vel, For, Inf> + 'static, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone, Cont: Serialize + for<'a> Deserialize<'a>,

Source

pub fn initialize_from_setup( setup: SimulationSetup<Dom, Cel, Cont>, ) -> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>
where Cel: Sized,

Construct a new SimulationSupervisor from a given SimulationSetup.

Source

pub fn initialize_with_strategies( setup: SimulationSetup<Dom, Cel, Cont>, strategies: Strategies<'_, Vox>, ) -> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>
where Cel: Sized,

Construct a new SimulationSupervisor from a given SimulationSetup with Strategies.

Source§

impl<Pos, Vel, For, Inf, Cel, Ind, Vox, Dom, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Cont, Obs> SimulationSupervisor<MultiVoxelContainer<Ind, Pos, Vel, For, Inf, Vox, Dom, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>, Dom, Cel, Cont, Obs>
where Dom: 'static + Serialize + for<'a> Deserialize<'a>, Pos: 'static + Serialize + for<'a> Deserialize<'a>, For: 'static + Serialize + for<'a> Deserialize<'a>, Inf: 'static, Vel: 'static + Serialize + for<'a> Deserialize<'a>, ConcVecExtracellular: 'static + Serialize + for<'a> Deserialize<'a>, ConcBoundaryExtracellular: 'static + Serialize + for<'a> Deserialize<'a>, ConcVecIntracellular: 'static + Serialize + for<'a> Deserialize<'a>, Cel: 'static + Serialize + for<'a> Deserialize<'a>, Ind: 'static + Serialize + for<'a> Deserialize<'a>, Vox: 'static + Serialize + for<'a> Deserialize<'a>, Cont: 'static + Serialize + for<'a> Deserialize<'a> + Send + Sync, Obs: 'static + Send + Sync,

Source

pub fn run_full_sim<ConcGradientExtracellular, ConcTotalExtracellular>( &mut self, ) -> Result<SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>, SimulationError>
where Dom: Domain<Cel, Ind, Vox>, Pos: PositionBound, For: ForceBound, Inf: InteractionInformation, Vel: VelocityBound, ConcVecExtracellular: Concentration, ConcTotalExtracellular: Concentration, ConcBoundaryExtracellular: Send + Sync + 'static, ConcVecIntracellular: Send + Sync + Concentration + Mul<f64, Output = ConcVecIntracellular> + Add<ConcVecIntracellular, Output = ConcVecIntracellular> + AddAssign<ConcVecIntracellular>, Ind: Index, Vox: Voxel<Ind, Pos, Vel, For> + ExtracellularMechanics<Ind, Pos, ConcVecExtracellular, ConcGradientExtracellular, ConcTotalExtracellular, ConcBoundaryExtracellular> + Volume, Cel: Agent<Pos, Vel, For, Inf> + CellularReactions<ConcVecIntracellular, ConcVecExtracellular> + InteractionExtracellularGradient<Cel, ConcGradientExtracellular> + Volume, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone, AuxiliaryCellPropertyStorage<Pos, Vel, For, ConcVecIntracellular>: Clone, Cont: Controller<Cel, Obs>,

Runs a full simulation and returns a SimulationResult after having completed

Source

pub fn save_current_setup( &mut self, iteration: u64, ) -> Result<(), SimulationError>
where Dom: Clone, Cont: Clone, Obs: Clone, Cel: Clone,

Saves the current SimulationSetup via the internal StorageManager

Auto Trait Implementations§

§

impl<MVC, Dom, Cel, Cont, Obs> Freeze for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
where Dom: Freeze,

§

impl<MVC, Dom, Cel, Cont = (), Obs = ()> !RefUnwindSafe for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>

§

impl<MVC, Dom, Cel, Cont, Obs> Send for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
where Dom: Send, Obs: Send, Cont: Send, MVC: Send, Cel: Send,

§

impl<MVC, Dom, Cel, Cont, Obs> Sync for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
where Dom: Sync + Send, Obs: Sync + Send, Cont: Sync + Send, MVC: Sync, Cel: Sync + Send,

§

impl<MVC, Dom, Cel, Cont, Obs> Unpin for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>
where Dom: Unpin, Obs: Unpin, Cont: Unpin, MVC: Unpin, Cel: Unpin,

§

impl<MVC, Dom, Cel, Cont = (), Obs = ()> !UnwindSafe for SimulationSupervisor<MVC, Dom, Cel, Cont, Obs>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Ungil for T
where T: Send,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,