Trait ExtracellularMechanics

Source
pub trait ExtracellularMechanics<Ind, Pos, ConcVec, ConcGradient, ConcTotal = ConcVec, ConcBoundary = ConcVec>:
    Send
    + Sync
    + Clone
    + Serialize
    + for<'a> Deserialize<'a> {
    // Required methods
    fn get_extracellular_at_point(
        &self,
        pos: &Pos,
    ) -> Result<ConcVec, RequestError>;
    fn get_total_extracellular(&self) -> ConcTotal;
    fn update_extracellular_gradient(
        &mut self,
        boundaries: &[(Ind, BoundaryCondition<ConcBoundary>)],
    ) -> Result<(), CalcError>;
    fn get_extracellular_gradient_at_point(
        &self,
        pos: &Pos,
    ) -> Result<ConcGradient, RequestError>;
    fn set_total_extracellular(
        &mut self,
        concentration_total: &ConcTotal,
    ) -> Result<(), CalcError>;
    fn calculate_increment(
        &self,
        total_extracellular: &ConcTotal,
        point_sources: &[(Pos, ConcVec)],
        boundaries: &[(Ind, BoundaryCondition<ConcBoundary>)],
    ) -> Result<ConcTotal, CalcError>;
    fn boundary_condition_to_neighbor_voxel(
        &self,
        neighbor_index: &Ind,
    ) -> Result<BoundaryCondition<ConcBoundary>, IndexError>;
}
Expand description

First approach on how to generalize over extracellular mechanics. Future versions will not depend on the Voxel Index but be more general.

Required Methods§

Source

fn get_extracellular_at_point(&self, pos: &Pos) -> Result<ConcVec, RequestError>

Obtain the extracellular concentration at a specified point.

Source

fn get_total_extracellular(&self) -> ConcTotal

Obtain every concentration in the current voxel. This function is only relevant for the backend.

Source

fn update_extracellular_gradient( &mut self, boundaries: &[(Ind, BoundaryCondition<ConcBoundary>)], ) -> Result<(), CalcError>

Update function to calculate the gradient of concentrations in this voxel.

Source

fn get_extracellular_gradient_at_point( &self, pos: &Pos, ) -> Result<ConcGradient, RequestError>

Obtain the gradient at a certain point.

Source

fn set_total_extracellular( &mut self, concentration_total: &ConcTotal, ) -> Result<(), CalcError>

Simple setter function to specify concentrations after backend has updated values.

Source

fn calculate_increment( &self, total_extracellular: &ConcTotal, point_sources: &[(Pos, ConcVec)], boundaries: &[(Ind, BoundaryCondition<ConcBoundary>)], ) -> Result<ConcTotal, CalcError>

Calculates the time-derivative of the function that increments the concentrations.

Source

fn boundary_condition_to_neighbor_voxel( &self, neighbor_index: &Ind, ) -> Result<BoundaryCondition<ConcBoundary>, IndexError>

Gets the boundary to the specified neighboring voxel.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§