cellular_raza_concepts

Trait Mechanics

Source
pub trait Mechanics<Pos, Vel, For, Float = f64> {
    // Required methods
    fn get_random_contribution(
        &self,
        rng: &mut ChaCha8Rng,
        dt: Float,
    ) -> Result<(Pos, Vel), RngError>;
    fn calculate_increment(&self, force: For) -> Result<(Pos, Vel), CalcError>;
}
Expand description

Describes the position of a cell-agent and allows to calculate increments and set/get information of the agent.

Required Methods§

Source

fn get_random_contribution( &self, rng: &mut ChaCha8Rng, dt: Float, ) -> Result<(Pos, Vel), RngError>

Define a new random variable in case that the mechanics type contains a random aspect to its motion. By default this function does nothing.

Source

fn calculate_increment(&self, force: For) -> Result<(Pos, Vel), CalcError>

Calculate the time-derivative of force and velocity given all the forces that act on the cell. Simple damping effects should be included in this trait if not explicitly given by the SubDomainForce trait.

Implementors§

Source§

impl<Pos, Vel, For, Float, A> Mechanics<Pos, Vel, For, Float> for CellAgentBox<A>
where A: Mechanics<Pos, Vel, For, Float>,