also, introduce a `Time` abstraction and allow for more precisely
simulating just a specific time range.
the Sim-related traits still need updating to better integrate this.
Git/crates.io version of plotly had some bugs which were patched locally.
But this added extra maintenance and I haven't used the plotly renderer for some time.
So, remove plotly & reintegrate it only when we need it.
The `Cell` type in sim.rs could be further improved:
it doesn't need to be parameterized over Material. It
should actually be renamed to `Sample`, and directly encode
the magnetization, etc.
There are still a few references to it, but it doesn't really exist in
the simulation proper.
The existing implementation is confusing and ineffective (broken?).
Upcoming patches will work to replace it with a more workable
implementation.
Also moves the Material::is_vacuum method to be on a helper trait.
That's just a point of hygeine. Meant to split it out to a separate
patch but messed up (-:
Notably, this allows the SerializerRenderer to serialize the actual
state to disk, as-is. That'll allow for more compact images, and
potentially also a way to resume simulations.
I expect the viewer will be broken for new simulations, initially.
Note that this REALLY slows it down, since it forces the Region to be
Boxed.
It might make sense at some point to consider introducing a RegionBitmap
type. Maybe keep the original Region type -- for serializing -- but
cache a Bitmap version where perf matters more.
It's CBOR, which seems to pack not so efficiently (250*250*20 * 12
floats takes 400 MB per frame, whereas this many doubles could pack into
120 MB). serde_cbor also seems to be extremely slow: taking multiple
minutes per frame. This could be parallelized to be less problematic
though (it already is -- just bump the parallelism).
Might be worth testing other formats.
NOTE: this requires you to clone `plotly`, copy the
`plotly_kaleido` folder to be adjacent to this one, and then run `cargo
build --release` from within that plotly_kaleido folder.
step_h was using the wrong timestep; fixing it caused update issues
based on the Courant number being 1.0, i.e. too large. Reducing it to
\sqrt{3}/3 fixes stability issues. Unfortunately, a non-Unity Courant
value prevents me from using the ideal Absorbing Boundary Condition I
had just implemented, so that's been disabled.