Chapter 20
Package structure

The NekPy wrapper is designed to mimic the library structure of Nektar++, with directories for the LibUtilities, SpatialDomains and StdRegions libraries. This is a deliberate design decision, so that classes and definitions in Nektar++ can be easily located inside NekPy.

There are also some other directories and files:

Figure 20.1 shows the location of Python wrapper files within Nektar++ structure. Every sub-module of Nektar++ hosts an additional folder for Python files and the structure of the Python folder mimics the structure of the sub-module itself, as shown on the left of the figure with LibUtilities sub-module. Individual .cpp files, such as Expansion.cpp contain the wrappers for classes and methods from corresponding Nektar++ library files whereas .cpp files named after sub-modules (e.g. LibUtilities.cpp) contain BOOST_PYTHON_MODULE definitions which create package modules (e.g. NekPy.LibUtilities).


PIC

Figure 20.1 The location of Python wrapper files within Nektar++ structure.