Efficient data transfer is achieved by combining ctypes, NumPy's built-in support for ctypes and OpenFOAM's data
(or cdata
) functions for OpenFOAM Lists/Fields
.
pythonPal
hides the details related to ctypes
, NumPy
and data
by offering higher-level methods to transfer data between OpenFOAM and Python and execute general Python code.