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.
This commit is contained in:
Aaron Fenyes 2024-12-06 14:35:30 -08:00
parent b490c8707f
commit 2c55a63a6f
5 changed files with 129 additions and 20 deletions

View file

@ -2,7 +2,7 @@ use dyna3::engine::{Q, irisawa::realize_irisawa_hexlet};
fn main() {
const SCALED_TOL: f64 = 1.0e-12;
let (config, success, history) = realize_irisawa_hexlet(SCALED_TOL);
let (config, _, success, history) = realize_irisawa_hexlet(SCALED_TOL);
print!("\nCompleted Gram matrix:{}", config.tr_mul(&*Q) * &config);
if success {
println!("Target accuracy achieved!");

View file

@ -18,7 +18,7 @@ fn main() {
]);
let frozen = [(3, 0)];
println!();
let (config, success, history) = realize_gram(
let (config, _, success, history) = realize_gram(
&gram, guess, &frozen,
1.0e-12, 0.5, 0.9, 1.1, 200, 110
);

View file

@ -21,7 +21,7 @@ fn main() {
])
};
println!();
let (config, success, history) = realize_gram(
let (config, _, success, history) = realize_gram(
&gram, guess, &[],
1.0e-12, 0.5, 0.9, 1.1, 200, 110
);