b309849e04
Parameterize the Renderer trait over GenericSim to avoid taking it dynamically
...
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.
2020-12-16 23:23:54 -08:00
6362b5a60e
parallelize render_scalar_field
2020-12-15 14:19:29 -08:00
cba2e3c3d2
Change up some measurement/rendering details
2020-12-14 21:44:07 -08:00
d619383fb9
Make Current measurement serializable
...
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.
2020-12-06 19:54:02 -08:00
8d4a3a91fe
Fix broken tests + misc cleanup
...
Move all the examples which don't compile to the `old/` directory.
2020-12-06 13:31:13 -08:00
ed86aff504
measurements are now rendered alongside the terminal view
2020-11-29 12:27:52 -08:00
70e6cdf0cb
Render to exactly the size of the terminal
2020-11-29 10:52:11 -08:00
8f8c42a853
renderer can navigate forward in time (and also in the + or - z direction)
...
Can't navigate backward yet
2020-11-28 13:49:30 -08:00
58fa41ce87
Viewer actually renders frames (no navigation yet)
2020-11-28 12:22:22 -08:00
d39a13190f
Use bincode instead of CBOR to cut file size by 70%
...
Also use a BufWriter to significantly speed up the serialization
2020-11-27 22:37:18 -08:00
2c042810d8
Implement a 'SerializerRenderer' output format
...
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.
2020-11-27 22:11:53 -08:00
9d15e126a7
Cleanup
...
AKA I made these changes a month ago but forgot to commit them and don't
really want to figure out what they did.
2020-11-27 21:22:42 -08:00
1a9093315a
Basic support for plotly backend
...
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.
2020-10-09 21:51:34 -07:00
f2ba6fdd1b
Troubleshoot toroid2.5d
2020-10-09 20:41:38 -07:00
4ac48bd3f1
Minor cleanup to Render size
2020-10-03 22:13:59 -07:00
0642f52172
Fix some issues related to the Courant number
...
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.
2020-10-03 19:44:30 -07:00
55d6171325
Add units to the different Vec3 "types" (Meters and Index, so far)
2020-09-26 17:05:15 -07:00
9a0f778db5
UPML boundary now applies to z dimension
2020-09-26 15:13:30 -07:00
d39db969b5
Consolidate Vec/Coord into the geom submodule
...
Also add the missing coord.rs to version control...
It should have been checked in earlier
2020-09-26 14:09:41 -07:00
bef423ce38
Rename Point -> Vec2 to distinguish it clearly from any 3d object
2020-09-26 13:25:49 -07:00
caa276295d
Move vec3.rs -> vec.rs in preparation for adding a 2d vec
2020-09-26 13:19:25 -07:00
2627852a39
Eradicate SimSnapshot
...
We do everything it achieved via the GenericSim trait, now.
2020-09-25 20:18:43 -07:00
cae84222c0
Rendering now mostly uses the GenericSim
2020-09-25 20:15:39 -07:00
a931252e9c
Convert render system to sample the simulation at a fixed resolution; no more decimation
2020-09-25 19:40:49 -07:00
6d77c85179
Abstract coordinates behind a Coord
type
...
This will allow adding another dimension to the coordinate, more easily.
2020-09-22 11:23:58 -07:00
f21c43d655
Misc measurement improvements
2020-09-20 21:56:30 -07:00
f6e4ed8cb9
Add a UPML boundary condition (needs improving in the corners, though)
2020-09-19 20:02:11 -07:00
ae93101676
Allow conductivity to be specified as a vector
...
This is necessary to implement UPML boundary conditions
2020-09-19 19:33:11 -07:00
1d303df409
Fix rendering to render (Bx,By,Ez). Also fix an infinite loop due to rounding errors in MHCurve
2020-09-18 22:22:54 -07:00
8a70276c78
Make measurements also be 3d
2020-09-18 17:11:05 -07:00
a1f5b96ae1
Model the H/B field in 3d, mostly
2020-09-17 22:53:12 -07:00
c0174b6483
Rename flt::Priv/Pub to Real and Flt
...
It's a little more readable
2020-09-13 22:45:02 -07:00
f50dbf7d4e
Make the float depth compile-time configurable
2020-09-13 22:38:00 -07:00
6664fea7c2
Use unchecked floats for release builds
2020-09-13 18:22:58 -07:00
53da11c874
Assorted minor aesthetic touchups
2020-09-13 17:19:44 -07:00
b4b0fde8af
Use ndarray's parallelism features
...
It's easier to read, and it also gets 10-30% perf improvement for
Driver::step
2020-09-12 20:37:31 -07:00
0fc973b409
Toy around with some other setups.
...
It's weird (maybe), that the behavior of the ferromagnet is to _prevent_ H
from getting very large
2020-09-09 22:41:41 -07:00
995b5b7c54
Render current as a vector field
...
hmm...
2020-09-07 21:34:33 -07:00
0c6a01c671
Make vector field rendering logic generic
2020-09-07 21:14:26 -07:00
0b9861d619
Cleanup RenderSteps
2020-09-07 21:07:26 -07:00
d611e822dd
Add a 'Measurement' concept, e.g. to display current at a point.
2020-09-07 20:14:41 -07:00
fbca8622df
Remove usize casts
2020-09-07 17:54:50 -07:00
14fa68bfb2
Snapshot and decimate before rendering; add an explicit boundary layer
2020-09-07 17:42:05 -07:00
d26b4197af
Introduce a Driver abstraction to encapsulate the SimState and the Renderers
2020-09-06 11:24:48 -07:00
3b1397e90c
Implement a NullRenderer
2020-09-05 23:41:28 -07:00
fc14961d32
Render simulations to the terminal and to disk simultaneously
2020-09-05 17:43:51 -07:00
861d7430e2
Tune some rendering constants
2020-09-05 14:44:26 -07:00
08461267be
Properly cast from RGB -> YCbCr
2020-09-05 14:31:29 -07:00
fd4e10b0d0
add transparency to vector fields
2020-09-05 14:21:32 -07:00
d6d42330c6
Apply a log-like scaling to all values being rendered
2020-09-05 14:06:53 -07:00