The C interface is defined in the header file StrumpackSparseSolver.h and is very similar to the C++ interface. For example usage see the programs sexample.c, dexample.c, cexample.c and zexample.c in the examples/sparse/ directory, for simple single and double precision real and complex example programs. Note that since the STRUMPACK code is written in C++, even when using the C interface you should link with a C++ aware linker or link with the standard C++ library. For instance when using the GNU toolchain, link with g++ instead of gcc or link with gcc and include -lstdc++.
Two fortran module files are installed in the include folder under the CMAKE_INSTALL_PREFIX directory, one for the sparse solvers strumpack.mod, and one for the dense solvers strumpack_dense.mod. The use of this Fortran interfaces is illustrated in examples/sparse/fexample.f90 and examples/dense/fstructured.f90.
The fortran modules are build from the src/fortran/fortran.f90 file, which is generated from the C interface in src/StrumpackSparseSolver.h using SWIG-Fortran ["Automated Fortran-C++ Bindings for Large-Scale Scientific Applications", https://ieeexplore.ieee.org/abstract/document/8745480].
To use the STRUMPACK Fortran interface and link to the Fortran library in an application, we recommend CMake. An example CMake project looks like:
And then invoke CMake with the path to the STRUMPACK installation folder set: