# tree_d_3d.kernels.evaluate_log_quadtree.evaluate_log_quadtree_pyccel

*module*

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

``evaluate_log_quadtree_cuda.cu`` next to this file is the CUDA version (GPU) and ``evaluate_log_quadtree_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/evaluate_log_quadtree/evaluate_log_quadtree_pyccel.py#L1-L1)

## tree_d_3d.kernels.evaluate_log_quadtree.evaluate_log_quadtree_pyccel.evaluate_log_quadtree

*function*

```python
def evaluate_log_quadtree(targets: float[:, :], exclude: int64[:], pos: float[:, :], charge: float[:], perm: int64[:], node_center: float[:, :], node_half: float[:], node_start: int64[:], node_end: int64[:], node_child: int64[:], node_qabs: float[:], moment_re: float[:, :], moment_im: float[:, :], theta: float, softening: float, stack: int64[:], phi: float[:], field: float[:, :], status: int64[:]) -> None
```

Line-charge potential and field at targets, without k_e.

Same traversal and opening rule as :func:`evaluate_quadtree`. Accepted
cells use the order-p expansion, unsoftened: for a target at z,
``sum q/(z - z_j) = sum_n a_n w**(n+1)`` and
``sum q ln(z - z_j) = a_0 ln(z - c) - sum_{n>=1} a_n w**n / n`` with
``w = 1 / (z - c)``. ``status[0]`` becomes 1 + a target that met an unsoftened coincident charge
(the first, on the CPU).

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/evaluate_log_quadtree/evaluate_log_quadtree_pyccel.py#L17-L148)
