Struct SimulationResult
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<CellIdentifier, CellBox<Cel>>,
pub storage_voxels: StorageManager<usize, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>>,
pub plotting_config: PlottingConfig,
/* private fields */
}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<CellIdentifier, CellBox<Cel>>StorageManager responsible for saving and loading cells
storage_voxels: StorageManager<usize, VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>>StorageManager responsible for saving and loading voxels
plotting_config: PlottingConfigDefine properties of how to save results
Implementations§
§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,
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,
pub fn plot_spatial_at_iteration(
&self,
iteration: u64,
) -> Result<(), SimulationError>
pub fn plot_spatial_at_iteration( &self, iteration: u64, ) -> Result<(), SimulationError>
Plots a spatial image of the simulation result at given iteration.
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,
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.
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,
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.
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,
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.
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,
CellBox<Cel>: Send + Sync,
VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Send + Sync,
DomainBox<Dom>: Send + Sync,
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,
CellBox<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
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,
CellBox<Cel>: Send + Sync,
VoxelBox<Ind, Pos, Vel, For, Vox, Cel, ConcVecExtracellular, ConcBoundaryExtracellular, ConcVecIntracellular>: Send + Sync,
DomainBox<Dom>: Send + Sync,
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,
CellBox<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>
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>
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> 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
§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.