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);
86 auto operator()(std::shared_ptr<DipolarDirectSum>
const &actor)
const {
87 return actor->long_range_pressure();
90 auto operator()(std::shared_ptr<DipolarP3M>
const &actor)
const {
91 return actor->long_range_pressure();
96 auto operator()(std::shared_ptr<T>
const &)
const {
106 return dp3m->dp3m_params.r_cut;
118 dp3m->count_magnetic_particles();
127 template <
class Solver>
128 void operator()(std::shared_ptr<Solver>
const &actor)
const {
129 actor->add_long_range_forces();
134 template <
class Solver>
135 double operator()(std::shared_ptr<Solver>
const &actor)
const {
136 return actor->long_range_energy();
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
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
auto operator()(std::shared_ptr< DipolarDirectSum > const &actor) const
auto operator()(std::shared_ptr< DipolarP3M > const &actor) const
void sanity_checks() const
void on_cell_structure_change()
Utils::Vector9d calc_pressure_long_range() const
std::unique_ptr< Implementation > impl
Pointer-to-implementation.
void on_periodicity_change()
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.