From 5abd4ca6e16b1efc2c1ca8ad3d1610c920c41c5a Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Wed, 17 Jul 2024 17:49:43 -0700 Subject: [PATCH] Revert "Give spheres positive radii in examples" This reverts commit 4728959ae049f728c204e206236865427bad762c, which actually gave the spheres negative radii! I got confused by the sign convention differences between the notes and the engine. --- engine-proto/ConstructionViewer.jl | 4 ++-- engine-proto/gram-test/overlapping-pyramids.jl | 12 +++++++++--- engine-proto/gram-test/sphere-in-tetrahedron.jl | 6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/engine-proto/ConstructionViewer.jl b/engine-proto/ConstructionViewer.jl index 0ce6a6d..8cfa632 100644 --- a/engine-proto/ConstructionViewer.jl +++ b/engine-proto/ConstructionViewer.jl @@ -213,8 +213,8 @@ elements = begin 1 1 -1 -1 0 1 -1 1 -1 0 1 -1 -1 1 0 - 0.5 0.5 0.5 0.5 a+1 - -0.5 -0.5 -0.5 -0.5 a-1 + -0.5 -0.5 -0.5 -0.5 -a-1 + 0.5 0.5 0.5 0.5 -a+1 ] end diff --git a/engine-proto/gram-test/overlapping-pyramids.jl b/engine-proto/gram-test/overlapping-pyramids.jl index 757a18c..8edb981 100644 --- a/engine-proto/gram-test/overlapping-pyramids.jl +++ b/engine-proto/gram-test/overlapping-pyramids.jl @@ -23,7 +23,13 @@ end gram = sparse(J, K, values) # set the independent variable -indep_val = 2//5 +# +# using gram[6, 2] or gram[7, 1] as the independent variable seems to stall +# convergence, even if its value comes from a known solution, like +# +# gram[6, 2] = 0.9936131705272925 +# +indep_val = -9//5 gram[6, 1] = BigFloat(indep_val) gram[1, 6] = gram[6, 1] @@ -37,8 +43,8 @@ guess = begin 1 1 -1 -1 0 1 -1 1 -1 0 1 -1 -1 1 0 - 0.5 0.5 0.5 0.5 a+1 - -0.5 -0.5 -0.5 -0.5 a-1 + -0.5 -0.5 -0.5 -0.5 -a-1 + 0.5 0.5 0.5 0.5 -a+1 ] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 5)), Engine.rand_on_shell(fill(BigFloat(-1), 2)) ) diff --git a/engine-proto/gram-test/sphere-in-tetrahedron.jl b/engine-proto/gram-test/sphere-in-tetrahedron.jl index d703321..1c0dda8 100644 --- a/engine-proto/gram-test/sphere-in-tetrahedron.jl +++ b/engine-proto/gram-test/sphere-in-tetrahedron.jl @@ -28,7 +28,7 @@ for j in 1:6 push!(values, -1/BigFloat(3)) filled = true else - push!(values, 1) + push!(values, -1) filled = true end if filled @@ -46,8 +46,8 @@ guess = hcat( 1 1 -1 -1 0 1 -1 1 -1 0 1 -1 -1 1 0 - 0 0 0 0 1.5 - 1 1 1 1 0.5 + 0 0 0 0 -1.5 + 1 1 1 1 -0.5 ] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 5)), BigFloat[0, 0, 0, 0, 1] )