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>
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:
SessionReader.py is the simplest example and shows how to construct a session
reader object. Run it as python SessionReader.py mesh.xml.
Basis.py shows functionality of basic LibUtilities points and basis classes. Run
this as python Basis.py.
StdProject.py shows how to use some of the StdRegions wrappers and duplicates
the functionality of Basis.py using the StdExpansion class. Run this as python
StdProject.py.
MeshGraph.py loads a mesh and prints out some basic properties of its
quadrilateral elements. Run it as python MeshGraph.py 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.