instrument the stimulus evaluation in our sim

... stimulus evaluation accounts for like 80% of the execution time 🤦
This commit is contained in:
2022-08-11 22:57:43 -07:00
parent 09bc7492ed
commit ae1eb861be
4 changed files with 14 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
use crate::diagnostics::SyncDiagnostics;
use crate::geom::{Coord, Cube, Index, InvertedRegion, Region};
use crate::cross::mat::{FullyGenericMaterial, Material, Vacuum};
use crate::cross::real::Real;
@@ -209,6 +210,9 @@ pub trait AbstractSim: Sync {
/// Take a "snapshot" of the simulation, dropping all material-specific information.
fn to_static(&self) -> StaticSim;
fn to_generic(&self) -> GenericSim<Self::Real>;
fn use_diagnostics(&mut self, _diag: SyncDiagnostics) {
// optional
}
//--- HELPER METHODS below (derived) ---//