bempp/bempp — pull request #153 by mdavezac (2014-09-01 12:01:01+00:00)
Title: Rsdt/cython context

Creates a general federating options object for python wrappers.
It conflates assembly, aca, paralellization, accuracy options, as well as the kind and precision of the arguments and outputs of the functions (basis and result types).

The options are instantiated and modifed as in:

~~~~{.ipython}
>>> from bempp import Options
>>> options = Options(eps=1e-8, recompress=False, aca_assembly_mode='local') # and any other option
>>> options.eps = 1e-3
~~~~

Of special interest, the result and basis types are linked, such that changing the kind and precision of one may alter the other as necessary.

~~~~{.ipython}
>>> options.result_type, options.basis_type = 'float32', 'float32'
>>> options.result_type = 'complex128'
>>> options.basis_type
'float64'
~~~~

The implementation goes through [mako](http://docs.makotemplates.org/en/latest/usage.html). The options are defined in python/mako/bempp_options.py in a dictionary called options.
This dictionary defines the options, their types, origin, docstrings, as well as how they should be wrapped.
A fair number of these characteristics are guessed at, or have defaults. These guesses are set in bempp_options.py, such that once done reading bempp_options, the options dictionary is complete.