Fast, Bounded, Split Newton with pseudo-transient continuation and backtracking
Check out its Python cousin - SplitNewton
Good for ill-conditioned problems where there are two different sets of systems
Particular applications include
- Fast-Slow Reaction-Diffusion systems
- CFD - Pressure-Velocity coupling
The system is divided into two and for ease of communication, let's refer to first set of variables as "outer" and the second as "inner".
-
Holding the outer variables fixed, Newton iteration is performed till convergence using the sub-Jacobian
-
One Newton step is performed for the outer variables with inner held fixed (using its sub-Jacobian)
-
This process is repeated till convergence criterion is met for the full system (same as in Newton)
This is a header-only library and can be most easily used with VSCode. The tasks.json
contains the build and run commands that can be invoked directly from the IDE.
There is an example in main.cpp
which can be compiled and executed
For the bounded Rosenbrock problem with N=5000, the C++ version is almost 2.5x faster (even though the sparse linear solver is in C for the Python version). The comparison is as follows
Method | Time | Iterations | Time/Iteration |
---|---|---|---|
C++ | ~14 seconds | 21 | ~0.6 seconds |
Python | ~23 seconds | 15 | ~1.5 seconds |
You can run tests with the gtest
framework. There is a Bazel: Test
task in .vscode/tasks.json
which can be used to run the tests.
The coverage reports can be generated with llvm-cov
or gcov
depending on the OS being used
Please direct your queries to gpavanb1 for any questions.
If you are using SplitNewton++ in any scientific work, please make sure to cite as follows
@software{pavan_b_govindaraju_2024_14365897,
author = {Pavan B Govindaraju},
title = {gpavanb1/SplitNewtonpp: 0.1.0},
month = dec,
year = 2024,
publisher = {Zenodo},
version = {0.1.0},
doi = {10.5281/zenodo.14365897},
url = {https://doi.org/10.5281/zenodo.14365897}
}