Modernized version of DASKR, a differential-algebraic system solver with rootfinding.
Note
This is a work in progress. I've modernized the examples and the preconditioners, and I'm now working on the library code itself.
daskr
is a library for solving systems of differential-algebraic equations of the form:
where
The first version of the library, named DASSL 1, solved the linear systems arising from the implicit time integration methods at each time step using direct methods. DASPK 23 extended the capabilities of DASSL to include iterative methods, which can be significantly more efficient, especially for large-scale problems. Furthermore, DASPK added the ability to initialize
Version | Date written | Last update | Direct solver | Iterative solver | Root finding | Standard |
---|---|---|---|---|---|---|
daskr | 2025 | -- | ☑ | ☑ | ☑ | Fortran 2018 |
DASKR | 2002 | 2011 | ☑ | ☑ | ☑ | FORTRAN 77 |
DASPK | 1989 | 2000 | ☑ | ☑ | ☐ | FORTRAN 77 |
DASSL | 1983 | 2000 | ☑ | ☐ | ☐ | FORTRAN 77 |
daskr
is a modernization of the DASKR code [4], intended to make the library easier to use and maintain. The main changes include:
- Conversion from fixed-form (
.f
) to free-form (.f90
). - Conversion from upper case to lower case.
- Modularization.
- Removal of
DATA
statements, labeled do loops, and (most)goto
s. - Addition of
intent(in/out)
to all procedures. - Addition of explicit interfaces to BLAS routines.
- Implementation of a C API.
- Automatic code documentation with FORD.
The easiest way to build/test the code and run the examples is by means of fpm
.
To build the library, do:
fpm build --profile release
To run the tests, do:
fpm test --profile release
To run the provided examples, do:
fpm run --example "example_name" --profile release
First, setup the build:
meson setup builddir -Dbuild_tests=true
To build the libraries, do:
meson compile -C builddir
To run the tests, do:
meson test -C builddir
- The original
daskr
code is covered by this license. - Modifications introduced in this project are covered under the MIT license.
Footnotes
-
L. Petzold, "A Description of DASSL: A Differential/Algebraic System Solver, 1982. ↩
-
Brown, Peter N., Alan C. Hindmarsh, and Linda R. Petzold. "Using Krylov methods in the solution of large-scale differential-algebraic systems." SIAM Journal on Scientific Computing 15.6 (1994): 1467-1488. https://doi.org/10.1137/0915088 ↩
-
Brown, Peter N., Alan C. Hindmarsh, and Linda R. Petzold. "Consistent initial condition calculation for differential-algebraic systems." SIAM Journal on Scientific Computing 19.5 (1998): 1495-1512. https://doi.org/10.1137/S1064827595289996 ↩