Exporting mathematical functions

More
7 years 1 month ago #189 by Guosheng Fu
Hello,

I used Joachim's trick
ngsolve.sourceforge.io/index.php/blog/ng...thematical-functions
to import the Bessel functions before, but it stopped working after I upgraded NGsolve to the newest version.

I got the following warning:
warning: ‘PyObject* pybind11_init()’ is deprecated: PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
return pybind11_init();
when building the myfunctions.so library.

And got import error when trying to import function from myfunctions.so:
undefined symbol: _ZN5ngfem20ExportUnaryFunction2ERN8pybind116moduleESsSt8functionIFSt10shared_ptrINS_19CoefficientFunctionEES6_EES3_IFddEES3_IFSt7complexIdESC_EE

Any idea what might be wrong?

Best,
Guosheng
More
7 years 1 month ago #190 by joachim
Hi Guosheng,

have a look into the github project:
github.com/NGSolve/ngs-special-functions

It's work in progress, its aim is to provide the 1400 special functions from slatec (including complex Bessels).

You can find the new pybind syntax there,

Joachim
More
7 years 1 month ago #191 by Guosheng Fu
Hi Joachim,

This is great! Compiled and succeed.
The function structure looks easy to generalize.
It seems a very recent project and you have 1398 functions to go ;)

Thanks for the quick response!

Best,
Guosheng
More
7 years 1 month ago - 7 years 1 month ago #192 by christopher
Hi Guosheng,
maybe you want to try the cpp17 branch there. You need a compiler with c++17 support, but then you can easily export more functions from there (or from boost.math.special_functions, we started a branch for that too).
In this branch we changed the naming of the functions to be like it is in scipy.special

Best
Christopher
Last edit: 7 years 1 month ago by christopher.
Time to create page: 0.103 seconds