#661 Use Python to evaluate function strings
|Reported by||Carsten Gräser (email@example.com)|
|Reported at||Nov 18, 2009 13:34|
|Version||Git (pre2.4) [autotools]|
|Operating System||Unspecified / All|
We have a small class that allows to use python expressions/functions/callable objects as functions in dune. Using such an approach we would not need to implement our own parsers e.g. for coarse grid creation while having the full power of python.
Currently it implements the old dune-disc FunctionBase interface and uses some stuff from our own modules. However we could easily change this switching to the new function interface in dune-common. Furthermore there are the following issues:
- It leads to many un-avoidable valgrind warnings (this is an issue of embedded python)
- We don't have a nice configure test for this.
- Implementation is not very robust (python syntax error leads to segfault).
- Implementation would be much simpler, more readable, more robust using boost::python.
Nevertheless it might also be very usefull for others.
It would we nice to have your comments on whether you'd like to see it in dune.