Engine prototype #13

Open
Vectornaut wants to merge 117 commits from engine-proto into main
Showing only changes of commit 6f18d4efcc - Show all commits

View File

@ -78,7 +78,7 @@ is_nontrivial = soln -> norm2(abs.(real.(soln)) - trivial_soln) > 1e-4*length(ge
##max_slope = 5 ##max_slope = 5
##binom = Binomial(2max_slope, 1/2) ##binom = Binomial(2max_slope, 1/2)
Random.seed!(6071) Random.seed!(6071)
n_planes = 3 n_planes = 36
for through_trivial in [false, true] for through_trivial in [false, true]
samples = [] samples = []
for _ in 1:n_planes for _ in 1:n_planes
@ -91,10 +91,10 @@ for through_trivial in [false, true]
## 1 2 1 2 0 1 1 0 1 1 0; ## 1 2 1 2 0 1 1 0 1 1 0;
## 1 1 0 1 0 1 2 0 2 0 0 ## 1 1 0 1 0 1 2 0 2 0 0
##] ##]
display(cut_matrix) ## [verbose] ## display(cut_matrix) ## [verbose]
if through_trivial if through_trivial
cut_offset = [sum(cf[sph_z_ind]) for cf in eachrow(cut_matrix)] cut_offset = [sum(cf[sph_z_ind]) for cf in eachrow(cut_matrix)]
display(cut_offset) ## [verbose] ## display(cut_offset) ## [verbose]
cut_subspace = LinearSubspace(cut_matrix, cut_offset) cut_subspace = LinearSubspace(cut_matrix, cut_offset)
else else
cut_subspace = LinearSubspace(cut_matrix, fill(0., freedom)) cut_subspace = LinearSubspace(cut_matrix, fill(0., freedom))
@ -117,7 +117,7 @@ for through_trivial in [false, true]
end end
println("$(length(samples)) sample solutions, not including the trivial one:") println("$(length(samples)) sample solutions, not including the trivial one:")
for soln in samples for soln in samples
## [verbose] display([vbls round.(soln, digits = 6)]) ## display([vbls round.(soln, digits = 6)]) ## [verbose]
k_sq = abs2(soln[1]) k_sq = abs2(soln[1])
if abs2(soln[end-2]) > 1e-12 if abs2(soln[end-2]) > 1e-12
if k_sq < 1e-12 if k_sq < 1e-12