meas: Energy: allow non-meas code to query a simulation's energy
this is especially useful in test
This commit is contained in:
@@ -615,7 +615,7 @@ impl Energy {
|
||||
region: Box::new(region),
|
||||
}
|
||||
}
|
||||
fn data<S: AbstractSim>(&self, state: &S) -> f32 {
|
||||
pub(crate) fn data<S: AbstractSim>(&self, state: &S) -> f32 {
|
||||
// Potential energy stored in a E/M field:
|
||||
// https://en.wikipedia.org/wiki/Magnetic_energy
|
||||
// https://en.wikipedia.org/wiki/Electric_potential_energy#Energy_stored_in_an_electrostatic_field_distribution
|
||||
|
Reference in New Issue
Block a user