From 32b7e894489f03dc7e90a60d9e8944bb3929839c Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Wed, 6 Dec 2023 14:29:28 +0100 Subject: [PATCH] [FTheoryTools] Blowup remembers all attributes of original model --- .../FTheoryTools/src/TateModels/methods.jl | 14 ++++++++------ .../FTheoryTools/src/WeierstrassModels/methods.jl | 12 +++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/experimental/FTheoryTools/src/TateModels/methods.jl b/experimental/FTheoryTools/src/TateModels/methods.jl index f8b056e85a8b..167d52e07d46 100644 --- a/experimental/FTheoryTools/src/TateModels/methods.jl +++ b/experimental/FTheoryTools/src/TateModels/methods.jl @@ -96,7 +96,7 @@ Construction over concrete base may lead to singularity enhancement. Consider co Global Tate model over a concrete base -- SU(5)xU(1) restricted Tate model based on arXiv paper 1109.3454 Eq. (3.1) julia> blow_up(t, ["x", "y", "x1"]; coordinate_name = "e1") -Partially resolved global Tate model over a concrete base +Partially resolved global Tate model over a concrete base -- SU(5)xU(1) restricted Tate model based on arXiv paper 1109.3454 Eq. (3.1) ``` """ function blow_up(t::GlobalTateModel, ideal_gens::Vector{String}; coordinate_name::String = "e") @@ -148,11 +148,13 @@ function blow_up(t::GlobalTateModel, I::MPolyIdeal; coordinate_name::String = "e # Change/Fix? We may want to provide not only output that remains true forever but also output, while the internals may change? model = GlobalTateModel(ais[1], ais[2], ais[3], ais[4], ais[5], new_pt, base_space(t), new_ambient_space) - # Set attributes - set_attribute!(model, :base_fully_specified, true) - set_attribute!(model, :partially_resolved, true) - if has_attribute(t, :explicit_model_sections) - set_attribute!(model, :explicit_model_sections => get_attribute(t, :explicit_model_sections)) + # Copy known attributes from old model and overwrite as appropriate + model_attributes = t.__attrs + for (key, value) in model_attributes + set_attribute!(model, key, value) end + set_attribute!(model, :partially_resolved, true) + + # Return the model return model end diff --git a/experimental/FTheoryTools/src/WeierstrassModels/methods.jl b/experimental/FTheoryTools/src/WeierstrassModels/methods.jl index 0a84d12c3f4b..f7d4dedfef4c 100644 --- a/experimental/FTheoryTools/src/WeierstrassModels/methods.jl +++ b/experimental/FTheoryTools/src/WeierstrassModels/methods.jl @@ -74,11 +74,13 @@ function blow_up(w::WeierstrassModel, I::MPolyIdeal; coordinate_name::String = " # Change/Fix? We may want to provide not only output that remains true forever but also output, while the internals may change? model = WeierstrassModel(f, g, new_pw, base_space(w), new_ambient_space) - # Set attributes - set_attribute!(model, :base_fully_specified, true) - set_attribute!(model, :partially_resolved, true) - if has_attribute(w, :explicit_model_sections) - set_attribute!(model, :explicit_model_sections => get_attribute(w, :explicit_model_sections)) + # Copy known attributes from old model and overwrite as appropriate + model_attributes = w.__attrs + for (key, value) in model_attributes + set_attribute!(model, key, value) end + set_attribute!(model, :partially_resolved, true) + + # Return the partially resolved model return model end