46 if (
name ==
"count_number_of_particles_per_type") {
47 auto const &cs = m_cell_system->get_cell_structure();
52 for (
auto const &type :
types) {
54 throw std::runtime_error(
"Types may not be negative");
57 for (
auto const &p : cs.local_particles()) {
58 if (p.type() == type) {
69 if (
name ==
"single_update") {
73 auto const &cs = m_cell_system->get_cell_structure();
74 auto const *p = cs.get_local_particle(pid);
75 if (p !=
nullptr and p->is_ghost()) {
79 if (
context()->is_head_node()) {
94 if (
name ==
"batch_update") {
97 for (
int pid :
pids) {
99 for (
auto const &[
param_name, value] : std::map<std::string, Variant>(
106 if (
name ==
"delete_particle") {
111 if (
name ==
"delete_particles") {
113 for (
int pid :
pids) {
121 throw std::runtime_error(
"unknown method '" +
name +
"'");
virtual void parallel_try_catch(std::function< void()> const &cb) const =0
virtual bool is_head_node() const =0
virtual boost::mpi::communicator const & get_comm() const =0