# tree_d_3d.kernels.fmm_downward.fmm_downward_pyccel

*module*

The Pyccel version (CPU) of the ``fmm_downward`` kernel of the Barnes-Hut and FMM solvers.

``fmm_downward_cuda.cu`` next to this file is the CUDA version (GPU) and ``fmm_downward_numpy.py`` the
version for machines without Pyccel, all with the same arguments; the folder's
``__init__.py`` declares the kernel (see :mod:`tree_d_3d.kernels`). The flat
quadtree is described in :mod:`tree_d_3d.flat_tree`.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/fmm_downward/fmm_downward_pyccel.py#L1-L1)

## tree_d_3d.kernels.fmm_downward.fmm_downward_pyccel.fmm_downward

*function*

```python
def fmm_downward(first_node: int, last_node: int, node_center: float[:, :], node_child: int64[:], binomial: float[:, :], power_re: float[:], power_im: float[:], local_re: float[:, :], local_im: float[:, :]) -> None
```

Shift the local expansions of nodes ``first_node:last_node`` into their children.

Call it level by level from the root: a node's expansion is complete only after
its parent's was shifted into it (the nodes of a level are contiguous).

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/fmm_downward/fmm_downward_pyccel.py#L15-L64)
