Chapter 21
NekPy wrapping guide

This section attempts to outline some of the basic principles of the NekPy wrapper, which relies entirely on the excellent Boost.Python library. An extensive documentation is therefore beyond the scope of this document, but we highlight aspects that are important for the NekPy wrappers.

In general, note that when things go wrong with Boost.Python, it’ll be indicated either by an extensive compiler error, or a runtime error in the Python interpreter when you try to use your wrapper. Judicious use of Google is therefore recommended to track down these issues!

You may also find the following resources useful:

To demonstrate how to wrap classes, we’ll refer to a number of existing parts of the code below.

  15.1.2 Discretization
 15.2 Functions of the implementation
 15.3 Data Structure of CompressibleFlowSolver
 15.4 Flow Chart of CompressibleFlowSolver