23#include "communication.hpp"
24#include "system/System.hpp"
29#include <boost/mpi/collectives/all_reduce.hpp>
37 std::optional<Particle> opt_part{std::nullopt};
39 if (p and not p->is_ghost()) {
42 opt_part = boost::mpi::all_reduce(
comm_cart, opt_part,
43 [](std::optional<Particle>
const &acc,
44 std::optional<Particle>
const &item) {
51 return opt_part.value().
pos();
52 throw std::runtime_error(
"Immersed Boundary: Particle not found");
Vector implementation and trait types for boost qvm interoperability.
boost::mpi::communicator comm_cart
The communicator.
Utils::Vector3d get_ibm_particle_position(CellStructure const &cell_structure, int pid)
Returns the position of a given particle.
Describes a cell structure / cell system.
Particle * get_local_particle(int id)
Get a local particle by id.