API reference
PVFMM exposes the same functionality through five language surfaces. The C++
interface is the native one; the C interface wraps it (compiled into
libpvfmm), the Fortran interface binds to the C symbols, and the Python and
Julia bindings load libpvfmm dynamically.
Surface |
Entry point |
Notes |
|---|---|---|
|
Header-only templates; full feature set |
|
|
Works with or without MPI |
|
|
|
|
|
ctypes + mpi4py, loads |
|
|
Libdl, loads |
Feature-parity notes:
The Helmholtz kernel and the Stokes stress kernel are available only from C++ (they are not in the C
PVFMMKernelenum, and hence absent from Fortran/Python/Julia).Per-axis periodic boundary conditions (
PX,PXY) are available from every interface: C++ takes apvfmm::BoundaryType, the C-level interfaces take aPVFMMBoundaryType(whose values 0/1 remain compatible with the older booleanperiodicflag), and Python/Julia exposeFMMBoundaryType— see Boundary conditions.The C and Fortran interfaces take an explicit communicator; the C particle-context creator initializes MPI on demand, and all communicator arguments are ignored when the library is built without MPI. The Python and Julia particle-context constructors make the communicator optional — when omitted they use the world communicator from
PVFMMGetCommWorld, so Python needs nompi4pyand Julia no MPI.jl for that path (the volume constructors still take an explicit communicator).Every C/Fortran function comes in a double-precision variant (suffix
D) and a single-precision variant (suffixF); C++/Python/Julia select precision through the template/dtype/type parameter instead.