Skip to content

Commit

Permalink
actually fix the darn dimension call!
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Oct 4, 2024
1 parent d9b504f commit e835876
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Attractors"
uuid = "f3fd9213-ca85-4dba-9dfd-7fc91308fec7"
authors = ["George Datseris <[email protected]>", "Kalel Rossi", "Alexandre Wagemakers"]
repo = "https://github.com/JuliaDynamics/Attractors.jl.git"
version = "1.19.11"
version = "1.19.12"

[deps]
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"
Expand Down
2 changes: 1 addition & 1 deletion src/basins/basins_utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ See also [`convergence_time`](@ref).
- `show_progress = true`: show progress bar.
"""
function convergence_and_basins_of_attraction(mapper::AttractorMapper, grid; show_progress = true)
if length(grid) != dimension(mapper.ds)
if length(grid) != dimension(referenced_dynamical_system(mapper))
@error "The mapper and the grid must have the same dimension"
end
basins = zeros(length.(grid))
Expand Down
4 changes: 2 additions & 2 deletions src/tipping/mfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ end

function _mfs(algorithm::MFSBruteForce, mapper, u0, search_area, idchecker, metric)
algorithm.sphere_decrease_factor 1 && error("Sphere decrease factor cannot be ≥ 1.")
dim = dimension(mapper.ds)
dim = length(u0)
best_shock, best_dist = crude_initial_radius(
mapper, u0, search_area, idchecker, metric, algorithm.initial_iterations
)
Expand Down Expand Up @@ -258,7 +258,7 @@ function _mfs(algorithm::MFSBlackBoxOptim, mapper, u0, search_area, idchecker, m
function objective_function(perturbation)
return mfs_objective(perturbation, u0, idchecker, metric, mapper, algorithm.penalty)
end
dim = dimension(mapper.ds)
dim = length(u0)
if algorithm.print_info == true
TraceMode = :compact
else
Expand Down

0 comments on commit e835876

Please sign in to comment.