22#ifdef ESPRESSO_DIPOLES
29#include "communication.hpp"
42 impl = std::make_unique<Implementation>();
48 std::visit([](
auto &ptr) { ptr->sanity_checks(); }, *
impl->solver);
67 std::visit([](
auto &ptr) { ptr->on_node_grid_change(); }, *
impl->solver);
88 if (
auto dp3m = get_actor_by_type<DipolarP3M>(
impl->solver)) {
89 return dp3m->dp3m_params.r_cut;
100 if (
auto dp3m = get_actor_by_type<DipolarP3M>(
impl->solver)) {
101 dp3m->count_magnetic_particles();
110 template <
class Solver>
111 void operator()(std::shared_ptr<Solver>
const &actor)
const {
112 actor->add_long_range_forces();
117 template <
class Solver>
118 double operator()(std::shared_ptr<Solver>
const &actor)
const {
119 return actor->long_range_energy();
constexpr double inactive_cutoff
Special cutoff value for an inactive interaction.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeWarningMsg()
double operator()(std::shared_ptr< Solver > const &actor) const
void operator()(std::shared_ptr< Solver > const &actor) const
void sanity_checks() const
void on_cell_structure_change()
std::unique_ptr< Implementation > impl
Pointer-to-implementation.
void on_periodicity_change()
void calc_pressure_long_range() const
bool reinit_on_observable_calc
Whether to reinitialize the solver on observable calculation.
void on_observable_calc()
void calc_long_range_force() const
void on_node_grid_change()
double calc_energy_long_range() const
void visit_try_catch(Visitor &&visitor, Variant &actor)
Run a kernel on a variant and queue errors.