Comments (8)
Hi,
Note that you may be interested in using
DefaultLS(false)
to remove the need to definefactorize
.
One thing I noticed (maybe unimportant) is that F
returns a MArray
when given a SArray
.
I cannot even make
########################################################### normal arrays
x = @SVector[-1.0,42.0]
deflated_root = @SVector[Inf,Inf]
deflation = DeflationOperator(1.0, dot, 1.0, [ deflated_root ] )
u, = newton( F, J, x, p, NewtonPar() ) # success
work. Basically, the methods of KrylovKit
have to be defined (see here). How did you solve this?
ERROR: setindex!(::SArray{Tuple{2},Float64,1,2}, value, ::Int) is not defined.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] setindex!(::SArray{Tuple{2},Float64,1,2}, ::Float64, ::Int64) at /Users/rveltz/.julia/packages/StaticArrays/l7lu2/src/indexing.jl:3
[3] axpy!(::Int64, ::MArray{Tuple{2},Float64,1,2}, ::SArray{Tuple{2},Float64,1,2}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/generic.jl:1390
[4] minus!(::SArray{Tuple{2},Float64,1,2}, ::MArray{Tuple{2},Float64,1,2}) at /Users/rveltz/work/prog_gd/julia/dev/dev1/BifurcationKit/src/BorderedArrays.jl:99
[5] newton(::typeof(F), ::typeof(J), ::SArray{Tuple{2},Float64,1,2}, ::NamedTuple{(:k,),Tuple{Array{Float64,1}}}, ::NewtonPar{Float64,DefaultLS,DefaultEig{typeof(real)}}; normN::typeof(LinearAlgebra.norm), callback::Function, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/rveltz/work/prog_gd/julia/dev/dev1/BifurcationKit/src/Newton.jl:116
[6] newton(::Function, ::Function, ::SArray{Tuple{2},Float64,1,2}, ::NamedTuple{(:k,),Tuple{Array{Float64,1}}}, ::NewtonPar{Float64,DefaultLS,DefaultEig{typeof(real)}}) at /Users/rveltz/work/prog_gd/julia/dev/dev1/BifurcationKit/src/Newton.jl:92
[7] top-level scope at REPL[47]:1
from bifurcationkit.jl.
One thing I noticed (maybe unimportant) is that
F
returns aMArray
when given aSArray
.
this is because similar(::SArray)
returns an MArray
which is mutable. Otherwise you can't assign values F[1] = ...
. setindex!(::SArray...)
is not defined on purpose to prevent mutation. Since netwon
has in-place methods similar(::SArray)
should be used to convert to mutable type before other methods are called.
I cannot even make
########################################################### normal arrays x = @SVector[-1.0,42.0] deflated_root = @SVector[Inf,Inf] deflation = DeflationOperator(1.0, dot, 1.0, [ deflated_root ] ) u, = newton( F, J, x, p, NewtonPar() ) # success
work. Basically, the methods of
KrylovKit
have to be defined (see here). How did you solve this?
I am one subversion of BifurcationKit
behind you I think pkg status
reads
[0f109fa4] BifurcationKit v0.1.0
[f6369f11] ForwardDiff v0.10.12
[d96e819e] Parameters v0.12.1
[90137ffa] StaticArrays v0.12.4
from bifurcationkit.jl.
Note that you may be interested in using
DefaultLS(false)
to remove the need to definefactorize
.
this is very useful thank you! Although it is the BorderedLinearSolver
that eventually calls factorize
which is sadly not accessible through ContinuationPar
. Perhaps it should be? The way I set it at the moment is with the last positional argument linearAlgo
of
Cont/PALCIterable(Fhandle, Jhandle, x0, par, lens::Lens, contParams::ContinuationPar, linearAlgo::AbstractBorderedLinearSolver)
from bifurcationkit.jl.
It should be, you pass MatrixBLS(DefaultLS(false))
.
from bifurcationkit.jl.
how? currently to pass DefaultLS
I have to do this. I can't see a kwarg for to place a MatrixBLS
struct
ContinuationPar(newtonOptions=NewtonPar(linsolver=DefaultLS(false)))
from bifurcationkit.jl.
no, you pass this to continuation
as linearAlgo
. There are 2 continuation
, chose this one
If you pass linearAlgo = MatrixBLS(DefaultLS(false))
to the usual (simple) continuation
, it might be overwritten here.
from bifurcationkit.jl.
I'm using the iterator interface so I need it initialise ContIterable
rather than continuation
what I'm suggesting is that rather than having to pass ContinuationPar
and linearAlgo
in separate positional arguments, linearAlgo
should be a field in the ContinuationPar
struct and let continuation
extract it from there. This way the user only needs to modify ContinuationPar
to configure the method
from bifurcationkit.jl.
Ill think about this.
from bifurcationkit.jl.
Related Issues (20)
- typos HOT 3
- acceptSolution in DefCont() not used HOT 1
- continuation of periodic orbit from Hopf curve HOT 1
- Issue when implementing the KdV equation HOT 9
- Continuation of LPC from Bautin/GH point HOT 2
- Out of memory for 1D periodic non-linear system HOT 8
- Plotting with Makie HOT 3
- Getting print statements despite `verbosity=0` HOT 6
- BifurcationKit not working with ArrayPartitions ? HOT 1
- getperiod vs. getPeriod HOT 3
- _isinplace causes incorrect dispatch when both out of place and in place versions of a function is defined HOT 9
- Add `BifurcationProblem` dispatch for ModelingToolkit problems (possibly in an extension?) HOT 8
- BifurcationKit incompatible with latest ModelingToolkit version HOT 8
- record from solution title looks werid in docs HOT 2
- Incorrect calls to `EventSpecialPoint` HOT 2
- Problems with event detection HOT 5
- using `ContinuationPar` directly as input to `bifurcationdiagram` (rather than `(args...) -> opts_br`) HOT 2
- Custom BorderedLinearSolver interface requirements for PALC are missing HOT 5
- Generated function error HOT 2
- record_from_solution shoud have acces to the entire set of parameters HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bifurcationkit.jl.