Commit Graph

83 Commits

Author SHA1 Message Date
859a7f8b18 rename FullyGenericMaterial -> GenericMaterial
this naming was an artifact from the separate CPU/GPU material implementations.
2022-12-07 09:46:33 +00:00
98a7815cd7 enumerated: improve docs 2022-10-04 01:29:04 -07:00
c9dd27f741 mb_pgram: better docs 2022-10-02 04:39:22 -07:00
4ffbc0b8af fix broken tests:
- mb_ferromagnet_diff_repro
- mb_ferromagnet_diff_minimal_repro

as the comment hinted:
> these tests probably failed earlier because they were allowing negative mu_r values.
> no (ordinary?) material has a negative permeability.
> most materials (except superconductors) have >= 1.0 relative permeability
> permeability = mu = B/H (or, \Delta B/\Delta H)

in fact, the relative permeability was -0.56.
it's now 1.39
2022-10-02 03:27:02 -07:00
fdbe91b281 Vec2: re-enable the arg method 2022-09-13 00:48:13 -07:00
491b5d3591 cross: Vec3: implement rotate_{xy,xz,yz} operations 2022-09-01 21:38:06 -07:00
ec77584311 cross: notes about optimization 2022-08-28 02:00:49 -07:00
5dc619ebc9 cross: add Real::c_inv() 2022-08-28 02:00:18 -07:00
1be2dc2419 cross: step: test using f64 so we can enforce more precise limits
we're foremost testing the *math*, less than the precision under which
it's carried out
2022-08-27 02:41:16 -07:00
8a76b79e17 cross: step: backfill step_e tests 2022-08-27 02:38:50 -07:00
deaaefc3e7 add Real::eps0_inv() convenience method 2022-08-27 02:38:32 -07:00
c90a73d395 cross: step: finish backfilling step_h tests 2022-08-26 02:03:27 -07:00
a7a9a9ea84 cross: step: backfill step_h material-free test 2022-08-26 01:43:10 -07:00
267c9fd36e cross: step: backfill a trivial step_h test 2022-08-26 01:23:52 -07:00
a4008dcc1d cross: step: document the step_h math 2022-08-26 00:41:41 -07:00
64410da4fe cross: step: reconcile the difference between our two \Delta t's 2022-08-25 22:49:50 -07:00
bbd31cc7be cross: step: annotate step_e with a maths derivation
this derivation comes from the legacy cpu code.
it looks like the spirv implementation actually
pursued a conceptually simpler approach.
i'll try to reconcile these shortly.
2022-08-25 22:20:03 -07:00
10fefdc9a3 step: backfill some documentation 2022-08-24 17:52:46 -07:00
9e49538ba7 cross: split supporting types out of step.rs
this focuses the core "business logic" into a more narrow slice.
good for organization, and also to highlight where the complexity lies
(i.e. most valuable places to test).
2022-08-24 17:45:28 -07:00
cdb0c3eaaa leave a TODO: enumerated: make use of List abstractions 2022-08-23 23:51:03 -07:00
ab6496d5f6 backfill Vec2::rotate tests 2022-08-23 23:49:43 -07:00
8e48414d68 SimMeta: make the fields private 2022-08-23 23:23:49 -07:00
e32d500f8c real: add sin, cos and ln2 functions 2022-08-22 00:37:19 -07:00
29e78c74fe real: implement std::iter::Sum 2022-08-21 20:46:43 -07:00
d662ef24d3 SimMeta: implement PartialEq 2022-08-20 17:35:41 -07:00
69ee2070c8 DimSlice: impl Default 2022-08-20 17:04:56 -07:00
9f97f474d7 cross: DimSlice: allow the underlying data to be a Vec 2022-08-19 03:54:01 -07:00
0fa8cb0d20 cross: DimSlice: add into_inner method 2022-08-18 16:04:15 -07:00
e72c0ec11d cross: DimSlice: add dim/offset accessors 2022-08-18 04:32:43 -07:00
07fa4042a3 cross: list: add IntoVec trait 2022-08-18 04:00:41 -07:00
a3b15bd7e7 cross: DimSlice: add as_ref, as_mut methods to re-borrow the data with a different lifetime
we can't use the actual AsRef, AsMut trait because we aren't returning a
reference but a new type with an inner reference.
2022-08-18 03:25:52 -07:00
2a9c065cb0 cross: list: allow visit to be mutable 2022-08-18 02:45:15 -07:00
f2b23ace17 cross: list: implement a Visit trait.
it can't do much yet because the immutable-ness, but i can fix that.
2022-08-18 02:32:52 -07:00
a0d4a39a66 cross: OffsetDimSlice: implement enumeration 2022-08-17 21:41:26 -07:00
a34363122b cross: OffsetDimSlice: impl indices() enumeration 2022-08-17 21:37:40 -07:00
129aaadeac OffsetDimSlice: impl IntoIter 2022-08-17 21:20:24 -07:00
a247b861e1 cross: hide the iteration features behind a flag
they don't compile on spirv due to the inherent use of Options,
but they'll be useful in the CPU-side code.
2022-08-17 21:14:21 -07:00
198cc16f3f cross: compile tests with the fmt feature so we can use assert_eq 2022-08-17 21:06:23 -07:00
3ed4cd5059 rename DimensionedSlice -> DimSlice 2022-08-17 20:45:36 -07:00
694906aa32 add OffsetDimensionedSlice, with basic indexing operations 2022-08-17 20:43:38 -07:00
ae5bfcf311 rename dim.rs -> dim_slice.rs 2022-08-17 20:34:47 -07:00
7a1e5815a8 rename Vec3uIter -> DimIter 2022-08-17 20:32:31 -07:00
b82c127957 add an enumerated method to DimensionedSlice 2022-08-17 18:12:32 -07:00
2311cf1dd3 cross: DimensionedSlice: add an indices method 2022-08-17 18:04:21 -07:00
782ac4d2c1 cross: impl IntoIterator for DimensionedSlice 2022-08-17 17:41:39 -07:00
1688707aed cross: backfill test for DimensionedSlice::IndexMut 2022-08-17 17:31:11 -07:00
92d4f464e1 cross: DimensionedSlice: backfill Index test 2022-08-17 17:28:31 -07:00
2e667a02dd cross: list: add some conveniences to query list length and access the first element 2022-08-17 02:45:44 -07:00
d45b2042e1 cross: list: add more convenient indexing 2022-08-16 16:40:15 -07:00
4b04a48cc4 cross: list: allow enumerating by u32 instead of Tagged 2022-08-16 16:18:09 -07:00