658b8616d7
Torus: correct the cross_section_normal method -- again
...
i should add integration tests
2022-08-12 02:23:53 -07:00
084c5bc342
Region: remove Clone
from the trait, and also parameterize everything
...
i didn't necessarily *want* to parameterize it all,
but it turned out to be easier to do that than to force all users to
workaround the lack of Clone.
2022-08-12 01:42:19 -07:00
d5fbb4e9b2
Region: remove the Serialization requirement
2022-08-12 00:57:01 -07:00
090b1ca09a
BUGFIX: Torus: don't norm
alize the cross section normal
...
this would have led to incorrectly scaled current measurements
(but not incorrect current generation). we were likely severely
over-estimating the current.
2022-08-12 00:41:25 -07:00
ae1eb861be
instrument the stimulus evaluation in our sim
...
... stimulus evaluation accounts for like 80% of the execution time 🤦
2022-08-11 22:57:43 -07:00
09bc7492ed
expose diagnostics into the Sim, and capture stimuli evaluation
...
this isn't publicly exposed yet.
2022-08-11 22:43:07 -07:00
e7cc78a947
diagnostics: split into their own file
2022-08-11 22:31:05 -07:00
aa8f474f52
driver: Diagnostics: clean up the impl a bit
2022-08-11 19:04:12 -07:00
4a33912164
driver: abstract the render time measurements behind a Diagnostics api
2022-08-11 18:58:22 -07:00
f7b72a72be
driver: abstract the step
diagnostics measurements
2022-08-11 18:41:41 -07:00
a413a4d391
driver: move last_diag_time out of the Diagnostics object
2022-08-11 18:38:36 -07:00
0c9f04981a
driver: relegate more diagnostics formatting to the Diagnostics impl
2022-08-11 18:36:35 -07:00
6f1e1557b3
driver: diagnostics: track the actual number of frames stepped
...
this allows fps-related diagnostics to be meaningful after
serialization / restarts.
2022-08-11 18:29:58 -07:00
e85d38d415
driver: split the Diagnostics out into their own object
...
more diagnostic refactoring to come
2022-08-11 18:27:30 -07:00
1928ad71cd
serializer renderer: gracefully handle the case where we run out of disk space
...
we might still run out of space when writing CSVs and other outputs...
but that's at least less likely,
as long as we serialize the rendering.
2022-08-11 18:21:46 -07:00
4fe8be8951
when writing Measurements to a CSV, format them in a machine-readable manner
...
i haven't tested the ones which contains commas -- hopefully the CSV
encoder deals with these :-)
2022-08-10 01:34:37 -07:00
8a3a64face
meas: correctly render SI prefixes for negative numbers
...
the previous implementation treated negative numbers as effectively
having unknown magnitude, rendering them without any adjustment.
2022-08-10 01:17:49 -07:00
e08c6dbaa3
stim: backfill tests for CurlStimulus
2022-08-09 22:54:21 -07:00
520e9d9f68
CurlStimulus: re-use the HasCrossSection trait code
...
i believe this inverts the sign, but it also looks more correct this way
so i'm not immediately correcting that in this patch.
will backfill tests to verify.
2022-08-09 22:14:38 -07:00
1771973c6d
CurlStimulus: take axis
and center
directly from the Region
...
by taking more from the region, we'll be able to reuse common code
and also make this more testable
2022-08-09 22:10:16 -07:00
7d1ee0ad50
meas: backfill tests for CurrentLoop
2022-08-05 17:35:55 -07:00
06379ffd30
CurrentLoop: use a better justified measurement algorithm
...
'course the best way to justify it is with tests: hopefully those will
come shortly.
2022-08-01 06:12:16 -07:00
527814e38a
convert HasTangent -> HasCrossSection
...
i believe the current loop algorithm (which i'm just preserving here) is
actually not correct. i'll work through it more.
2022-08-01 05:17:35 -07:00
cc876d72d6
CurrentLoop: factor out the tangent calculation
2022-08-01 00:50:02 -07:00
723fed4786
rename meas::{eval_multiple_kv -> eval_multiple}
2022-07-31 23:27:37 -07:00
0e0945f744
measurement: remove the eval
method
2022-07-31 23:26:53 -07:00
5362dacf3a
Measurement: don't use SI prefix if there's no unit
2022-07-30 21:21:46 -07:00
b5c58c03ce
meas: add a missing unit to the Energy measurement
2022-07-30 21:21:02 -07:00
530ab890e6
meas: render the SI prefix
2022-07-30 21:15:51 -07:00
542d700f69
meas: finish porting to a concrete type.
...
this will in future let me more easily test each individual measurement
type
2022-07-30 20:56:19 -07:00
60840aec36
WIP: make the measurement type concrete
2022-07-30 20:33:03 -07:00
4361167f99
stim: strongly-type the return type of AbstractSim::at with a Fields
struct
...
this will help me not mix up the E and H fields.
2022-07-30 17:17:17 -07:00
6a511943f7
note a few suspect areas of code
2022-07-30 17:02:10 -07:00
a14625b493
meas: add SI units for some things
...
this is an uncommon code path, apparently: only visible when rendering
BEFORE serialization. may want to implement a richer meas format.
2022-07-29 23:54:02 -07:00
7f3c2a9395
render: transform inaccurate float-based indexing into integer indexing
2022-07-29 21:53:49 -07:00
349e01ba16
fix Vec3::with_mag to return an Option
...
and thereby simplify it into just one method.
2022-07-29 21:45:25 -07:00
ba6ef3c5c2
viewer: add a render mode to display just the Material
2022-07-29 16:28:58 -07:00
c5e2713b51
remove unused enum_dispatch
2022-07-29 16:07:07 -07:00
9c1fc65068
convert AbstractSim::sample to include a reference to the material -- not just its conductivity
2022-07-29 16:02:16 -07:00
895c87869b
rename CellStateWithM => Fields; parameterize Sample over R
2022-07-29 14:55:12 -07:00
7e452f508f
AbstractSim: convert the {get,put}_material
functions to use only Index
2022-07-29 14:43:59 -07:00
e2c156e790
meas: Evaluated: fix eval
to return both key and value
2022-07-29 13:39:33 -07:00
604f368f0d
SerializeRenderer: render to GenericSim
, not StaticSim
2022-07-29 13:27:05 -07:00
95ffb73fe3
add a to_generic
method to the AbstractSim trait
2022-07-29 13:11:16 -07:00
56f74e6b4a
AbstractSim: remove the Send bound
2022-07-28 23:49:45 -07:00
4f2345f608
rename GenericSim -> AbstractSim
2022-07-28 23:41:42 -07:00
3104c06d95
fold MaterialSim into GenericSim trait
2022-07-28 22:31:47 -07:00
71ab89c4c9
de-virtualize GenericSim
...
this should let us fold the GenericSim and MaterialSim traits together.
2022-07-28 22:22:07 -07:00
2d1a15eabc
AbstractMeasurement: remove the DynClone requirement
2022-07-28 21:49:28 -07:00
3722512554
AbstractMeasurement: remove the serde typetag stuff
2022-07-28 21:46:01 -07:00