Stimulus: parameterize over R.

this saves us from a `mem::transmute` in the sim code to get
`Fields<R>`.
This commit is contained in:
2022-08-22 00:37:34 -07:00
parent e32d500f8c
commit 24b82037b4
9 changed files with 315 additions and 285 deletions

View File

@@ -205,7 +205,7 @@ pub trait AbstractSim: Sync {
fn fields_at_index(&self, pos: Index) -> Fields<Self::Real>;
fn get_material_index(&self, at: Index) -> &Self::Material;
fn put_material_index(&mut self, at: Index, m: Self::Material);
fn step_multiple<S: Stimulus>(&mut self, num_steps: u32, s: &S);
fn step_multiple<S: Stimulus<Self::Real>>(&mut self, num_steps: u32, s: &S);
/// Take a "snapshot" of the simulation, dropping all material-specific information.
fn to_static(&self) -> StaticSim;