Git Product home page Git Product logo

Comments (5)

ChrisRackauckas avatar ChrisRackauckas commented on June 15, 2024 1

No. For the most part a direct method should be faster until you get to like >1000 ODEs. I don't know many reaction systems that get there. https://www.sciencedirect.com/science/article/abs/pii/S1540748914001163?via%3Dihub isn't a great example because it isn't comparing apples to apples.

The average computation times for integrating the constant volume WSR
are compared for three approaches in Figure 1. The first approach is based on
the traditional ODE solvers used in chemical kinetics, which can still be found
in some multi-dimensional CFD codes (e.g., Kiva3V-MZ [5]). The second approach uses the commercial package >CHEMKIN-PRO, which offers an advanced
ODE solver developed by Reaction Design that takes advantage of the sparsity
of detailed kinetic mechanisms. This particular solver is available in Reaction
Design’s FORTE´ CFD code, while other CFD codes like CONVERGE and some
of the newest Kiva variants (building on the work of Perini [9]) also take similar advantage of sparse solvers. The >third approach is based on the adaptive
preconditioner developed for this investigation with the improved exponential
functions and solver settings for CVODE and SuperLU from [27]

It will win out sooner or later, but what you really want to see is the improved everything with CVODE using sparse direct SuperLU vs the adaptive preconditioner form. That should have a cutoff around 1000 around or (from what we've seen with other preconditioners). The paper has the cutoff closer too 100, but against methods that we know are not efficient against sparse direct CVODE.

But back to the sensitivity, this means when n+p > 1000.

To me, my major pain now is the slow gradient computation comparing while I feel the forward pass is already pretty fast.

How are you doing the gradient computation? The details there are fairly important. We can probably discuss this off of this issue though.

from reactionmechanismsimulator.jl.

jiweiqi avatar jiweiqi commented on June 15, 2024

Hi @ChrisRackauckas , is there something already existing in DifferentialEquations.jl that does a similar thing for acceleration. Like keyword options that allow us to do it.

from reactionmechanismsimulator.jl.

ChrisRackauckas avatar ChrisRackauckas commented on June 15, 2024

https://diffeq.sciml.ai/stable/tutorials/advanced_ode_example/#Declaring-a-Jacobian-Free-Newton-Krylov-Implementation

https://diffeq.sciml.ai/stable/features/linear_nonlinear/#iterativesolvers-jl

Shows how to define linear solvers and add preconditioners. Indeed it would be good to get this preconditioner in a SciML repo and make it one of the default switches in the linear solver interface.

from reactionmechanismsimulator.jl.

jiweiqi avatar jiweiqi commented on June 15, 2024

@ChrisRackauckas Do you expect such kind of preconditioners can also accelerate the adjoint sensitivity, either in adjoint or forwarddiff. To me, my major pain now is the slow gradient computation comparing while I feel the forward pass is already pretty fast.

from reactionmechanismsimulator.jl.

mjohnson541 avatar mjohnson541 commented on June 15, 2024

Resolved with #185

from reactionmechanismsimulator.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.