Struct SimulationResult

Source
pub struct SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>
where Pos: Serialize + for<'a> Deserialize<'a>, For: Serialize + for<'a> Deserialize<'a>, Vel: Serialize + for<'a> Deserialize<'a>, Cel: Serialize + for<'a> Deserialize<'a>, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: for<'a> Deserialize<'a> + Serialize, Dom: Serialize + for<'a> Deserialize<'a>, ConcVecExtracellular: Serialize + for<'a> Deserialize<'a> + 'static, ConcBoundaryExtracellular: Serialize + for<'a> Deserialize<'a>, ConcVecIntracellular: Serialize + for<'a> Deserialize<'a>,
{ pub storage: StorageBuilder<true>, pub storage_cells: StorageManager<CellularIdentifier, CellAgentBox<Cel>>, pub storage_voxels: StorageManager<PlainIndex, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>>, pub plotting_config: PlottingConfig, /* private fields */ }
Available on crate feature cpu_os_threads only.
Expand description

Returned after finishing a full simulation

Fields§

§storage: StorageBuilder<true>

Configure how to store results of the simulation

§storage_cells: StorageManager<CellularIdentifier, CellAgentBox<Cel>>

StorageManager responsible for saving and loading cells

§storage_voxels: StorageManager<PlainIndex, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>>

StorageManager responsible for saving and loading voxels

§plotting_config: PlottingConfig

Define properties of how to save results

Implementations§

Source§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>
where Pos: Serialize + for<'a> Deserialize<'a>, For: Serialize + for<'a> Deserialize<'a>, Vel: Serialize + for<'a> Deserialize<'a>, Cel: Serialize + for<'a> Deserialize<'a>, Dom: Serialize + for<'a> Deserialize<'a>, ConcVecExtracellular: Serialize + for<'a> Deserialize<'a> + 'static, ConcBoundaryExtracellular: Serialize + for<'a> Deserialize<'a>, ConcVecIntracellular: Serialize + for<'a> Deserialize<'a>, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Clone + for<'a> Deserialize<'a> + Serialize,

Source

pub fn plot_spatial_at_iteration( &self, iteration: u64, ) -> Result<(), SimulationError>
where Dom: CreatePlottingRoot, Cel: PlotSelf, Vox: PlotSelf,

Plots a spatial image of the simulation result at given iteration.

Source

pub fn plot_spatial_at_iteration_custom_functions<Cpf, Vpf, Dpf>( &self, iteration: u64, cell_plotting_func: Cpf, voxel_plotting_func: Vpf, domain_plotting_func: Dpf, ) -> Result<(), SimulationError>
where Dpf: for<'a> Fn(&Dom, u32, &'a String) -> Result<DrawingArea<BitMapBackend<'a>, Cartesian2d<RangedCoordf64, RangedCoordf64>>, DrawingError>, Cpf: Fn(&Cel, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync, Vpf: Fn(&Vox, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync,

Plots a spatial image of the simulation result at given iteration with custom functions.

Source

pub fn plot_spatial_at_iteration_custom_cell_voxel_functions<Cpf, Vpf>( &self, iteration: u64, cell_plotting_func: Cpf, voxel_plotting_func: Vpf, ) -> Result<(), SimulationError>
where Dom: CreatePlottingRoot, Cpf: Fn(&Cel, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync, Vpf: Fn(&Vox, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync,

Plots a spatial image of the simulation result at given iteration with custom functions for cells and voxels.

Source

pub fn plot_spatial_at_iteration_custom_cell_function<Cpf>( &self, iteration: u64, cell_plotting_func: Cpf, ) -> Result<(), SimulationError>
where Vox: PlotSelf, Dom: CreatePlottingRoot, Cpf: Fn(&Cel, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync,

Plots a spatial image of the simulation result at given iteration with custom functions for cells.

Source

pub fn plot_spatial_all_iterations_with_functions<Cpf, Vpf, Dpf>( &self, cell_plotting_func: &Cpf, voxel_plotting_func: &Vpf, domain_plotting_func: &Dpf, ) -> Result<(), SimulationError>
where Dpf: for<'a> Fn(&Dom, u32, &'a String) -> Result<DrawingArea<BitMapBackend<'a>, Cartesian2d<RangedCoordf64, RangedCoordf64>>, DrawingError> + Send + Sync, Cpf: Fn(&Cel, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync, Vpf: Fn(&Vox, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync, CellAgentBox<Cel>: Send + Sync, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Send + Sync, DomainBox<Dom>: Send + Sync,

Plots a spatial image of the simulation result for all iterations with custom functions

Source

pub fn plot_spatial_all_iterations_custom_cell_voxel_functions<Cpf, Vpf>( &self, cell_plotting_func: Cpf, voxel_plotting_func: Vpf, ) -> Result<(), SimulationError>
where Dom: CreatePlottingRoot, Cpf: Fn(&Cel, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync, Vpf: Fn(&Vox, &mut DrawingArea<BitMapBackend<'_>, Cartesian2d<RangedCoordf64, RangedCoordf64>>) -> Result<(), DrawingError> + Send + Sync, CellAgentBox<Cel>: Send + Sync, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Send + Sync, DomainBox<Dom>: Send + Sync,

Plots a spatial image of the simulation result for all iterations with custom cell and voxel functions

Auto Trait Implementations§

§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> Freeze for SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>
where VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: for<'a> Sized, Dom: Freeze,

§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> !RefUnwindSafe for SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>

§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> Send for SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>
where VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: for<'a> Sized, Dom: Send, Cel: Send, Ind: Send, Vox: Send, Pos: Send, ConcVecExtracellular: Send, For: Send, ConcVecIntracellular: Send, ConcBoundaryExtracellular: Send, Vel: Send,

§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> Sync for SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>
where VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: for<'a> Sized, Dom: Sync, Cel: Sync + Send, Ind: Sync + Send, Vox: Sync + Send, Pos: Sync + Send, ConcVecExtracellular: Sync + Send, For: Sync + Send, ConcVecIntracellular: Sync + Send, ConcBoundaryExtracellular: Sync + Send, Vel: Sync + Send,

§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> Unpin for SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>
where VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: for<'a> Sized, Dom: Unpin, Cel: Unpin, Ind: Unpin, Vox: Unpin, Pos: Unpin, ConcVecExtracellular: Unpin, For: Unpin, ConcVecIntracellular: Unpin, ConcBoundaryExtracellular: Unpin, Vel: Unpin,

§

impl<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel> !UnwindSafe for SimulationResult<Ind, Pos, For, Vel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular, Vox, Dom, Cel>

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,