36 auto *p = cell_structure.get_local_particle(pid);
37 boost::optional<Particle> opt_part{boost::none};
39 if (p and not p->is_ghost()) {
42 opt_part = boost::mpi::all_reduce(
comm_cart, opt_part,
43 [](boost::optional<Particle>
const &acc,
44 boost::optional<Particle>
const &item) {
51 return opt_part.get().pos();
52 throw std::runtime_error(
"Immersed Boundary: Particle not found");