19.2 Using the bindings

By default, the bindings will install into the dist directory, along with a number of examples that are stored in the $NEKDIR/library/Demos/Python directory. To test your installation, you can for example run one of these (e.g. python Basis.py) or launch an interactive session:

1$ cd builds 
2$ python 
3Python 2.7.13 (default, Apr  4 2017, 08:47:57) 
4[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin 
5Type "help", "copyright", "credits" or "license" for more information. 
6>>> from NekPy.LibUtilities import PointsKey, PointsType 
7>>> PointsKey(10, PointsType.GaussLobattoLegendre) 
8<NekPy.LibUtilities._LibUtilities.PointsKey object at 0x11005c310>

19.2.1 Examples

A number of examples of the wrappers can be found in the $NEKDIR/library/Demos/Python directory, along with a sample mesh newsquare_2x2.xml:

If you want to modify the source files, it’s advisable to edit them in the $NEKDIR/library/Demos/Python directory and re-run make install, otherwise local changes will be overwritten by the next make install.