Giter VIP home page Giter VIP logo

cannoles.jl's People

Contributors

abelsiqueira avatar amontoison avatar dpo avatar github-actions[bot] avatar jsobot avatar juliatagbot avatar monssaftoukal avatar tmigot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cannoles.jl's Issues

Bug: `AssertionError: LDLT.factor != nothing`

I tried to solve the following problem modeled with PDENLPModels.jl

using Gridap, PDENLPModels

  # Definition of the domain
  n = 100
  domain = (-1, 1, -1, 1)
  partition = (n, n)
  model = CartesianDiscreteModel(domain, partition)

  # Definition of the spaces:
  valuetype = Float64
  reffe = ReferenceFE(lagrangian, valuetype, 2)
  Xpde = TestFESpace(model, reffe; conformity = :H1, dirichlet_tags = "boundary")
  y0(x) = 0.0
  Ypde = TrialFESpace(Xpde, y0)

  reffe_con = ReferenceFE(lagrangian, valuetype, 1)
  Xcon = TestFESpace(model, reffe_con; conformity = :H1)
  Ycon = TrialFESpace(Xcon)
  Y = MultiFieldFESpace([Ypde, Ycon])

  # Integration machinery
  trian = Triangulation(model)
  degree = 1
  dΩ = Measure(trian, degree)

  # Objective function:
  yd(x) = -x[1]^2
  α = 1e-2
  function f(y, u)
    ∫(0.5 * (yd - y) * (yd - y) + 0.5 * α * u * u) * dΩ
  end

  # Definition of the constraint operator
  ω = π - 1 / 8
  h(x) = -sin(ω * x[1]) * sin(ω * x[2])
  function res(y, u, v)
    ∫(∇(v) ⊙ ∇(y) - v * u - v * h) * dΩ
  end
  op = FEOperator(res, Y, Xpde)
  npde = Gridap.FESpaces.num_free_dofs(Ypde)
  ncon = Gridap.FESpaces.num_free_dofs(Ycon)
  x0 = zeros(npde + ncon)
  nlp = GridapPDENLPModel(x0, f, trian, Ypde, Ycon, Xpde, Xcon, op, name = "Control elastic membrane")

using CaNNOLeS, NLPModelsModifiers
nls = FeasibilityResidual(nlp)
stats_cannoles = cannoles(nls)

However, I get the following mysterious error:

┌ Warning: linsolve ma57 not available. Using :ldlfactorizations instead
└ @ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:60
[ Info:      I      #F        fx        Δt      ‖∇L‖  ‖Fx - r‖    ‖c(x)‖         α         η         ρ         δ   in_it     nbk  
[ Info:      0       2   2.2e-04   0.0e+00   1.6e-07   0.0e+00   0.0e+00
ERROR: LoadError: AssertionError: LDLT.factor != nothing
Stacktrace:
 [1] newton_system(x::Vector{Float64}, r::Vector{Float64}, λ::Vector{Float64}, Fx::Vector{Float64}, rhs::Vector{Float64}, LDLT::CaNNOLeS.LDLFactStruct, ρold::Float64, params::Dict{Symbol, Float64}, method::Symbol, linsolve::Symbol)
   @ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:616
 [2] cannoles(nls::FeasibilityResidual{Float64, Vector{Float64}}; x::Vector{Float64}, λ::Vector{Float64}, method::Symbol, merit::Symbol, linsolve::Symbol, max_f::Int64, max_time::Float64, max_inner::Int64, ϵtol::Float64, check_small_residual::Bool, always_accept_extrapolation::Bool, ϵkchoice::Symbol, δdec::Float64)
   @ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:315
 [3] cannoles(nls::FeasibilityResidual{Float64, Vector{Float64}})
   @ CaNNOLeS .julia\packages\CaNNOLeS\CGoHr\src\CaNNOLeS.jl:50

Any idea?

My environment is the following:

  [5a1c9e79] CaNNOLeS v0.5.3
  [56d4f2e9] Gridap v0.15.5
  [40e66cde] LDLFactorizations v0.8.1
  [a4795742] NLPModels v0.18.1
  [e01155f1] NLPModelsModifiers v0.5.1
  [80da258d] PDENLPModels v0.3.0

Add other merit functions

Only one merit function is accepted, so I suggest to add a package issue and remove from the kwargs until done. #72

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Use `atol` and `rtol`

To have uniform stopping with other JSO-solvers.

Right now there is just a ϵtol that correspond to the relative tolerance I think.

Public release

@dpo, I'm thinking of making this public, so I can start testing with Travis and Appveyor. Any suggestions on what to do before that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.