Manipulate the assembly #29

Merged
glen merged 16 commits from tangent-space into main 2024-12-30 22:53:09 +00:00

16 Commits

Author SHA1 Message Date
Aaron Fenyes
7c8539fe54 Remove trailing space in console log 2024-12-25 23:14:27 -05:00
Aaron Fenyes
f5ba861ffa Clarify that projection is Euclidean 2024-12-23 11:28:19 -08:00
Aaron Fenyes
6df0e855cf Make the deformation matrix just the right size
Also, correct the check for whether an element had a column index when
we started. The previous revision would've gotten the wrong answer for
an element without a column index that appeared more than once in the
motion.
2024-12-18 11:43:54 -08:00
Aaron Fenyes
e2c5ba0fc7 Set out invariants for column indices
This should make it safe to use the elements' column indices outside the
realization method—for unpacking tangent vectors, at least.
2024-12-18 09:49:14 -08:00
Aaron Fenyes
967daa595d Deform fresh elements too
Implement deformation of elements that haven't gone through realization.
2024-12-18 00:34:25 -08:00
Aaron Fenyes
dc067976eb Implement projection onto the zero subspace 2024-12-18 00:25:15 -08:00
Aaron Fenyes
971a7ca7e2 Check tangent space sync when deforming
Only give elements column indices once they've actually been through a
realization. Ignore motions of elements that haven't been through a
realization. Get the dimensions of the projected motion matrix from the
saved tangent space, not the current number of elements.
2024-12-17 21:24:38 -08:00
Aaron Fenyes
4fd79b9e47 Add structures for element and assembly motions 2024-12-17 18:21:53 -08:00
Aaron Fenyes
90834fbb93 Adapt symmetric_kernel for non-WASM targets
The examples call `engine::realize_gram`, which now includes a call to
`symmetric_kernel`, so we need to make sure that `symmetric_kernel`
can run on whatever target Cargo uses for examples. For that target on
my machine, `console::log_1` panics with the message "function not
implemented on non-`wasm32` targets".
2024-12-11 13:01:17 -08:00
Aaron Fenyes
c87367a276 Tweak comment wording 2024-12-10 01:56:10 -08:00
Aaron Fenyes
64da1ba577 Enable translation along all axes 2024-12-09 21:09:21 -08:00
Aaron Fenyes
9f85ce5608 Step elements geodesically instead of linearly
This helps prevent small spheres from shrinking during deformations.
2024-12-09 15:58:45 -08:00
Aaron Fenyes
2906571f32 Correct the translation direction
Make the x translation keys translate along the x axis, as intended.
2024-12-09 01:22:54 -08:00
Aaron Fenyes
58e7587131 Deform the assembly
This seems like a good starting point, even though the code is messy and
the deformation routine has some numerical quirks. Note that the translation
direction is mixed up: the keys are for x, but the velocity field is for z.
2024-12-09 01:09:37 -08:00
Aaron Fenyes
7aa69bdfcd Set the console error panic hook
Turn on the browser console panic message output provided by the
`console_error_panic_hook` feature. This feature was already enabled by
default in our Cargo configuration, but it wasn't actually being used.
2024-12-08 19:59:25 -08:00
Aaron Fenyes
2c55a63a6f Engine: Find the tangent space of the solution variety
At the end of the realization routine, use the computed Hessian to find
the tangent space of the solution variety, and return it alongside the
realization. Since altering the constraints can change the tangent space
without changing the solution, we compute the tangent space even when
the guess passed to the realization routine is already a solution.
2024-12-06 14:35:30 -08:00