Giter Club home page Giter Club logo

Comments (3)

ChrisRackauckas avatar ChrisRackauckas commented on July 23, 2024

The Jacobian for the ODE system sys is the matrix J[i,j] = Derivative(sys.dvs[j])*sys.eqs[i], i.e. the derivative of the ith equation by the jth dependent variable. The Rosenbrock W is the matrix

M - γJ
# Transformed
M/γ - J

those are two different versions, and some ODE solvers use the former while others use the latter. γ is just some input constant and M is the mass matrix. The mass matrix is the matrix for Mu' = f(t,u) in vector notation, so normally an ODE just has M = I unless explicitly stated.

That's an intermediate step to the calculation of W^(-1) which is what the solvers actually want. We can also looking into just solving for the components of qrfact(W). If our Jacobian is just represented by a matrix of operations, then generic routines should directly give us this results, and then we would want to run simplification routines on it (Julia's compiler automatically does some if we @fastmath so that's an option to add as well).

For now we should make their computation explicit, i.e. add in extra fields and let the user do calculate_jacobian!(sys), etc., and then add a caclulate_performance_functions!(sys) that does them all. Then finally after we have all of that together, we can do an operation check on the Jacobian and calculate W^(-1) only when it's appropriate, i.e. when J is sufficiently small or sufficiently sparse. I am not sure what a good heuristic is there (ParameterizedFunctions.jl just does "try it and see if it fails"), so it'll take some testing which is why I am saying that should be done last.

This is the last issue for becoming feature-complete with ParameterizedFunctions.jl

from modelingtoolkit.jl.

ChrisRackauckas avatar ChrisRackauckas commented on July 23, 2024

Jacobians are working. W is working. Inversion is all that's left.

from modelingtoolkit.jl.

ChrisRackauckas avatar ChrisRackauckas commented on July 23, 2024

Inversion is working. We need better simplification routines but it does work.

from modelingtoolkit.jl.

Related Issues (20)

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.