# tree_d_3d.kernels.log_targets_host.log_targets_host_pyccel

*module*

The Pyccel version (CPU) of the ``log_targets_host`` kernel of the FMM at targets.

``log_targets_host_numpy.py`` next to this file is the version for machines without
Pyccel, with the same arguments; the folder's ``__init__.py`` declares the kernel (see
`tree_d_3d.kernels`).

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

## tree_d_3d.kernels.log_targets_host.log_targets_host_pyccel.log_targets_host

*function*

```python
def log_targets_host(tpos: float[:, :], texclude: int64[:], t_count: int, t_center: float[:, :], t_start: int64[:], t_end: int64[:], t_child: int64[:], local_re: float[:, :], local_im: float[:, :], row_start: int64[:], partners: int64[:], spos: float[:, :], scharge: float[:], sindex: int64[:], s_start: int64[:], s_end: int64[:], softening: float, with_potential: int, phi: float[:], field: float[:, :]) -> None
```

Line-charge potential and field at the targets, in target-tree order.

A target leaf ``n`` evaluates its local expansion (``phi = -2 Re W``,
``E_x - i E_y = 2 W'``) and sums the source leaves
``partners[row_start[n]:row_start[n + 1]]`` exactly, skipping source
``texclude[i]`` (an index of ``sindex``). ``with_potential`` 0 leaves ``phi``
zero. A target that meets an unsoftened coincident charge gets ``phi = 1e300``.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/log_targets_host/log_targets_host_pyccel.py#L14-L94)
