24#ifdef ESPRESSO_SCAFACOS
32#include "communication.hpp"
33#include "system/System.hpp"
47std::shared_ptr<CoulombScafacos>
55 auto const &box_geo = *
system.box_geo;
56 auto const &cell_structure = *
system.cell_structure;
61 for (
auto const &p : cell_structure.local_particles()) {
62 auto const pos = box_geo.folded_position(p.pos());
63 positions.push_back(pos[0]);
64 positions.push_back(pos[1]);
65 positions.push_back(pos[2]);
66 charges.push_back(p.q());
71 if (positions.empty())
74 auto const &cell_structure = *
get_system().cell_structure;
77 for (
auto &p : cell_structure.local_particles()) {
87double CoulombScafacosImpl::time_r_cut(
double r_cut) {
88 set_r_cut_and_tune(r_cut);
93void CoulombScafacosImpl::tune_r_cut() {
96 auto const &box_geo = *
system.box_geo;
97 auto const &local_geo = *
system.local_geo;
100 auto const min_box_l = std::ranges::min(box_geo.length());
110 auto t_max = std::numeric_limits<double>::max();
139 if (ScafacosContext::get_near_field_delegation()
and
140 ScafacosContext::r_cut() <= 0.0) {
144 ScafacosContext::tune(charges, positions);
Vector implementation and trait types for boost qvm interoperability.
double prefactor
Electrostatics prefactor.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
boost::mpi::communicator comm_cart
The communicator.
std::shared_ptr< CoulombScafacos > make_coulomb_scafacos(std::string const &method, std::string const ¶meters)
void update_particle_data() override
void update_particle_forces() const override
void tune_impl() override
double benchmark_integration_step(System::System &system, int int_steps)
Benchmark the integration loop.