4.1.3.1 pde.backends.numba_mpi.backend module
Defines a numba backend class that support MPI parallelism.
- class NumbaMPIBackend(config, *, name=None)[source]
Bases:
NumbaBackendDefines MPI-compatible numba backend.
Initialize the backend.
- Parameters:
- config_inheritance = ['numba']
Additional backends that are queried for configuration parameters.
- Type:
- make_integrator(grid)[source]
Return function that integrates discretized data over a grid.
If this function is used in a multiprocessing run (using MPI), the integrals are performed on all subgrids and then accumulated. Each process then receives the same value representing the global integral.
- Parameters:
grid (
GridBase) – Grid for which the integrator is defined- Returns:
A function that takes a numpy array and returns the integral with the correct weights given by the cell volumes.
- Return type:
Callable[[NumericArray], NumberOrArray]