From f6680483fd41d2b9e23bb24ca3b73eafff78c0b3 Mon Sep 17 00:00:00 2001 From: MohamedLaghdafHABIBOULLAH Date: Fri, 12 Sep 2025 12:39:24 -0400 Subject: [PATCH 1/2] Add matrix_free parameter to make fh compatible with recent versions of ADNLPModels --- .gitignore | 1 + src/fh_model.jl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba39cc5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Manifest.toml diff --git a/src/fh_model.jl b/src/fh_model.jl index b8429e9..e1ada93 100644 --- a/src/fh_model.jl +++ b/src/fh_model.jl @@ -87,7 +87,7 @@ of an `ADNLSModel` that represents the same problem, and the exact solution. function fh_model(; kwargs...) data, simulate, resid, misfit, x0 = FH_smooth_term() nequ = 202 - ADNLPModels.ADNLPModel(misfit, ones(5); kwargs...), - ADNLPModels.ADNLSModel(resid, ones(5), nequ; kwargs...), + ADNLPModels.ADNLPModel(misfit, ones(5); matrix_free = true, kwargs...), + ADNLPModels.ADNLSModel(resid, ones(5), nequ; matrix_free = true, kwargs...), x0 end From bdb0d31dca0c32f3ac638058551e4e45fe310db6 Mon Sep 17 00:00:00 2001 From: MohamedLaghdafHABIBOULLAH Date: Fri, 12 Sep 2025 14:25:14 -0400 Subject: [PATCH 2/2] put back the definition of fh_model --- src/fh_model.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fh_model.jl b/src/fh_model.jl index e1ada93..b8429e9 100644 --- a/src/fh_model.jl +++ b/src/fh_model.jl @@ -87,7 +87,7 @@ of an `ADNLSModel` that represents the same problem, and the exact solution. function fh_model(; kwargs...) data, simulate, resid, misfit, x0 = FH_smooth_term() nequ = 202 - ADNLPModels.ADNLPModel(misfit, ones(5); matrix_free = true, kwargs...), - ADNLPModels.ADNLSModel(resid, ones(5), nequ; matrix_free = true, kwargs...), + ADNLPModels.ADNLPModel(misfit, ones(5); kwargs...), + ADNLPModels.ADNLSModel(resid, ones(5), nequ; kwargs...), x0 end