PhysicsSimulation

Trait PhysicsSimulation 

Source
pub trait PhysicsSimulation: Send + Sync {
    // Required methods
    fn simulation_type(&self) -> &str;
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        params: &'life1 SimulationParameters,
    ) -> Pin<Box<dyn Future<Output = PhysicsResult<SimulationResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn validate_results(&self, result: &SimulationResult) -> PhysicsResult<()>;
}
Expand description

Trait for physics simulations (SciRS2 integration)

Required Methods§

Source

fn simulation_type(&self) -> &str

Get simulation type name

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 SimulationParameters, ) -> Pin<Box<dyn Future<Output = PhysicsResult<SimulationResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run the simulation

Source

fn validate_results(&self, result: &SimulationResult) -> PhysicsResult<()>

Validate results against physics constraints

Implementors§