Coder Social home page Coder Social logo

Comments (3)

rveltz avatar rveltz commented on August 24, 2024

This call

ContinuationPar{eltype(u₀),AbstractLinearSolver,EigenSolver}

is strange. You should never use AbstractLinearSolver, it is used for dispatch. Looking at Newton.jl, I understand why you where mislead.

Something like the following should be favoured:

u₀, _, stable = Cont.newton( u -> f(u,p₀), u₀, Cont.NewtonPar(verbose=false) )
optCont = Cont.ContinuationPar{eltype(u₀),typeof(DefaultLS()), typeof(DefaultEig())}(
			pMin=kwargs[:pMin],pMax=kwargs[:pMax],ds=kwargs[:ds],
			maxSteps=kwargs[:maxSteps])

from bifurcationinference.jl.

rveltz avatar rveltz commented on August 24, 2024

It seems they did not implement broadcasting:

u0 = param([-2.0,0.0])
u1 = copy(u0)

All of this fails except the last one:

u0 .= u0 .- u1
axpy!(2,u0,u1)
u0 = u0 .- u1

It comes from the fact that copyto! is not implemented. This is troublesome because typeof(u0) <: AbstractArray and hence, all my BorderedArrays methods will be called, like this one.

So you have to extend minus!(x::TrackedArray, y::TrackedArray) = x = x .- y. However, in newton, the return type of d by the linear solver is not TrackedArray. So I define:

minus!(x::TrackedArray, y) = x = x .- y

Now the code works but newton does not converge. At least it does not error!

from bifurcationinference.jl.

rveltz avatar rveltz commented on August 24, 2024

The branch errors because of finiteDifferences. You can either import finiteDifferences and redefine it for TrackedArrays or use the function fdTracked I put on master.

from bifurcationinference.jl.

Related Issues (11)

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.