Modern Fortran interfaces to SINTEF Spline Library (SISL)

In response to a request in a previous thread by @Rob77 for a Fortran library for creating lines and surfaces, I have created a package of Modern Fortran C-Interoperability interfaces to the SINTEF Spline Library (SISL). See https://github/SINTEF-Geometry/SISL. SISL is a package of over 600 C routines that date back to the late 1980s and are part of the SINTEF Geometry libraries. Most of the 600 routines are either low-level routines or routines not documented in the most recent SISL reference manual which is quite old (March 2005). I have implemented interfaces for all but a handful of the C functions described in version 4.4 of the SISL reference manual. In total, I’ve implemented interfaces for about 171 or so of the routines described in the reference manual. The routines I chose not to support are graphics routines that serve as placeholders for user supplied routines of the same name that call the users favorite graphics package.

In addition to the base SISL routines, I have also created Fortran versions of the 15 C|++ example problems provided with the SISL library. As of today (March 7, 2021) the status of this project is as follows

  1. All of the interfaces compile without error using Intel oneAPI Fortran and C compilers as well as GCC gfortran 9.2 and gfortran 10.1 compilers

  2. Initial tests run useing the example programs show that the SISL routines called by the example programs produce the same results as the C++ examples with the C library with one exception. Example15 implements two simple ray-tracing algorithms (one labeled robust and one quick) that finds the intersection between a line and a B-spline surface. The robust algorithm generates the same result as C++ but the Fortran implemenation of the quick algorithm produces 5 fewer points than the C++ version. I think I know the reason but I’ve not had time to verify it.

  3. One example exhibits a small memory leak with GCC 9 (running under valgrind) that I’ve been unable to trace. All the other examples show no leaks.

  4. The example problems only call a small subset of the total number of C funtions in the SISL library but they are representative of all the other functions. To do a proper V&V I’ll have to write unit tests that exercise all of the interfaces. That will take several months of time I don’t have so I’ve decided to release the code into the wild as a github project in the hope that interested Fortraners will take a look at the code, try creating their own test problems and let me know what works and what doesn’t.

The code along with some preliminary documentation, build instructions etc can be downloaded from: GitHub - rweed/forSISL: Modern Fortran interfaces to the SINTEF Spline Library (SISL). The code is currently only supported on Linux systems. However, the entire codebase consist of only 15 files so porting to a Mac or Windows as an Xcode or Visual Studio project should be straigthforward.

Note you don’t need the SINTEF library to build forSISL but you do need it to run the examples and build your own applications.

So I request interested parties look the code over and let me know what you think.

RW

7 Likes

That looks very interesting, I will try to find some time to look at this.
Thanks for posting this.

Thanks. Great to see (though probably not something I personally will use in the immediate future. I tend to plot output in GIS software for debugging and displaying results)

Incidentally, the link given for SISL appears to be incorrect (missing .com ?)

Correct link is https://github.com/SINTEF-Geometry/SISL

@DSNZ you are correct. Thanks for catching this typo.

@rwmsu Thanks for your great work. I’m taking a look at the library and I’ll test it as soon as possible.

@rwmsu Big thanks for your very nice work and well structured instructions. I’ll have a deeper look into it as soon as I find time to play around.