Trait Interaction

pub trait Interaction<Pos, Vel, Force, Inf = ()>: InteractionInformation<Inf> {
    // Required method
    fn calculate_force_between(
        &self,
        own_pos: &Pos,
        own_vel: &Vel,
        ext_pos: &Pos,
        ext_vel: &Vel,
        ext_info: &Inf,
    ) -> Result<(Force, Force), CalcError>;
}
Expand description

Trait describing force-interactions between cellular agents.

Required Methods§

fn calculate_force_between( &self, own_pos: &Pos, own_vel: &Vel, ext_pos: &Pos, ext_vel: &Vel, ext_info: &Inf, ) -> Result<(Force, Force), CalcError>

Calculates the forces (velocity-derivative) on the corresponding external position given external velocity. By providing velocities, we can calculate terms that are related to friction. The function returns two forces, one acting on the current agent and the other on the external agent.

Implementors§

§

impl Interaction<Matrix<f64, Const<2>, Const<1>, ArrayStorage<f64, 2, 1>>, Matrix<f64, Const<2>, Const<1>, ArrayStorage<f64, 2, 1>>, Matrix<f64, Const<2>, Const<1>, ArrayStorage<f64, 2, 1>>, f64> for BacteriaReactions

§

impl<F, S, A, R, I1, I2, D> Interaction<Matrix<F, D, Const<2>, S>, Matrix<F, D, Const<2>, S>, Matrix<F, D, Const<2>, S>, (I1, I2)> for VertexDerivedInteraction<A, R, I1, I2>
where A: Interaction<Matrix<F, Const<2>, Const<1>, ArrayStorage<F, 2, 1>>, Matrix<F, Const<2>, Const<1>, ArrayStorage<F, 2, 1>>, Matrix<F, Const<2>, Const<1>, ArrayStorage<F, 2, 1>>, I1>, R: Interaction<Matrix<F, Const<2>, Const<1>, ArrayStorage<F, 2, 1>>, Matrix<F, Const<2>, Const<1>, ArrayStorage<F, 2, 1>>, Matrix<F, Const<2>, Const<1>, ArrayStorage<F, 2, 1>>, I2>, D: Dim, F: Scalar + RealField + Copy, Matrix<F, D, Const<2>, S>: Mul<F, Output = Matrix<F, D, Const<2>, S>>, S: RawStorageMut<F, D, Const<2>> + Storage<F, D, Const<2>> + Clone,

§

impl<I, F, Inf, const D: usize> Interaction<Matrix<F, Dyn, Const<D>, VecStorage<F, Dyn, Const<D>>>, Matrix<F, Dyn, Const<D>, VecStorage<F, Dyn, Const<D>>>, Matrix<F, Dyn, Const<D>, VecStorage<F, Dyn, Const<D>>>, Inf> for RodInteraction<I>
where I: Interaction<Matrix<F, Const<D>, Const<1>, ArrayStorage<F, D, 1>>, Matrix<F, Const<D>, Const<1>, ArrayStorage<F, D, 1>>, Matrix<F, Const<D>, Const<1>, ArrayStorage<F, D, 1>>, Inf>, F: 'static + RealField + Copy + Debug + Zero,

§

impl<Pos, Vel, For> Interaction<Pos, Vel, For> for NoInteraction
where For: Zero,

§

impl<Pos, Vel, For, Inf, A> Interaction<Pos, Vel, For, Inf> for CellBox<A>
where A: Interaction<Pos, Vel, For, Inf> + Serialize + for<'a> Deserialize<'a>,

§

impl<Pos, Vel, For, Inf, Mec, Int, Cyc, React, IntExtracellular> Interaction<Pos, Vel, For, Inf> for ModularCell<Mec, Int, Cyc, React, IntExtracellular>
where Int: Interaction<Pos, Vel, For, Inf>,

§

impl<__cr_private_Pos, __cr_private_Vel, __cr_private_For, __cr_private_Inf> Interaction<__cr_private_Pos, __cr_private_Vel, __cr_private_For, __cr_private_Inf> for Bacteria
where BacteriaReactions: Interaction<__cr_private_Pos, __cr_private_Vel, __cr_private_For, __cr_private_Inf> + InteractionInformation<__cr_private_Inf>,

§

impl<const D: usize> Interaction<Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>> for BoundLennardJonesF32

§

impl<const D: usize> Interaction<Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, f32> for MiePotentialF32

§

impl<const D: usize> Interaction<Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, Matrix<f32, Const<D>, Const<1>, ArrayStorage<f32, D, 1>>, f32> for MorsePotentialF32

§

impl<const D: usize> Interaction<Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>> for BoundLennardJones

§

impl<const D: usize> Interaction<Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, f64> for MiePotential

§

impl<const D: usize> Interaction<Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, Matrix<f64, Const<D>, Const<1>, ArrayStorage<f64, D, 1>>, f64> for MorsePotential