Explicit and Implicit Brusselator Comparision - #323
GeorgeR227 wants to merge 1 commit into
Conversation
Based on the Brusselator dynamics. Diffusion has been upped to increase the stiffness and favor implicit solvers.
|
When running this script with diffusion constant Solver stats are shown below, demonstrating how the explicit solver requires around 2 orders of magnitude more function evaluations than the implicit and around the same order of accepted steps. SciMLBase.DEStats
Number of function 1 evaluations: 858
Number of function 2 evaluations: 0
Number of W matrix evaluations: 87
Number of linear solves: 617
Number of Jacobians created: 2
Number of nonlinear solver iterations: 607
Number of nonlinear solver convergence failures: 0
Number of fixed-point solver iterations: 0
Number of fixed-point solver convergence failures: 0
Number of rootfind condition calls: 0
Number of accepted steps: 187
Number of rejected steps: 25Explicit: SciMLBase.DEStats
Number of function 1 evaluations: 83121
Number of function 2 evaluations: 0
Number of W matrix evaluations: 0
Number of linear solves: 0
Number of Jacobians created: 0
Number of nonlinear solver iterations: 0
Number of nonlinear solver convergence failures: 0
Number of fixed-point solver iterations: 0
Number of fixed-point solver convergence failures: 0
Number of rootfind condition calls: 0
Number of accepted steps: 13852
Number of rejected steps: 1 |
| Point2D = Point2{Float64} | ||
| Point3D = Point3{Float64} | ||
|
|
||
| Brusselator = @decapode begin |
There was a problem hiding this comment.
Using the Brusselator exported from the main library is probably a good pattern for our docs examples that are focusing on a different solver configuration rather than the physics themselves.
|
@copilot, can you refactor this PR so that instead of creating two examples that are both run and compared, it is a single docs page that runs both the explicit and implicit solver and compares the run times? We want a page showing that you can run the same physics with different solvers to improve performance. |


This file is meant to demonstrate Decapodes support of implicit solvers. The physics are the Brusselator dynamics, with an increased diffusion rate to increase stiffness. For high enough diffusion rates, the implicit solver will noticeably outperform the explicit solver.