This is an add-on package to NGSolve, which shows how to bring special functions implemented elsewhere into NGSolve's python interface. We bring in the Bessel and Hankel function implementations of the Slatec package and the error function implementation from the Faddeeva package.
Make sure you have NGSolve installed. Building the package should be straight forward:
git clone https://github.com/NGSolve/ngs-special-functions.git
cd ngs-special-functions
mkdir build && cd build
cmake ..
# automatically installs during build to your NGSolve installation
make -j4
cd ..
cd demo
netgen gammaln.py
To extend by adding further functions from Slatec, follow these steps:
- In
src/fetch_and_convert_slatec.cmake
add an additional line:fetch_and_convert_slatec_sources(<what_you_want_to_add>)
- Modify
src/specialcf.cpp
to recognize the additional function. - Rebuild package (using
cmake
andmake
as above).