30#include <boost/mpi/collectives/reduce.hpp>
42 std::ranges::fill(m_data, 0.);
46 m_n_bonded = n_bonded;
52#ifdef ESPRESSO_VIRTUAL_SITES
53 constexpr std::size_t
n_vs = 1;
55 constexpr std::size_t
n_vs = 0;
58 constexpr std::size_t
n_dpd = 1;
60 constexpr std::size_t
n_dpd = 0;
70 m_data = std::vector<double>(m_chunk_size *
n_elements);
73 kinetic_lin = std::span<double>(m_data.data(), m_chunk_size);
88std::size_t Observable_stat::get_non_bonded_offset(
int type1,
int type2)
const {
89 return static_cast<std::size_t
>(
95 std::vector<double>
temp(m_data);
96 boost::mpi::reduce(
comm_cart,
temp, m_data, std::plus<>{}, 0);
98 boost::mpi::reduce(
comm_cart, m_data, std::plus<>{}, 0);
std::span< double > coulomb
Contribution(s) from Coulomb interactions.
std::span< double > non_bonded_inter
Contribution(s) from non-bonded intermolecular interactions.
std::span< double > dpd
Contribution from DPD.
std::span< double > kinetic_rot
Contribution from angular kinetic energy.
std::span< double > kinetic_lin
Contribution from linear kinetic energy.
std::span< double > virtual_sites
Contribution from virtual sites (accumulated).
std::span< double > non_bonded_intra
Contribution(s) from non-bonded intramolecular interactions.
void mpi_reduce()
MPI reduction.
std::span< double > dipolar
Contribution(s) from dipolar interactions.
std::span< double > external_fields
Contribution from external fields (accumulated).
void reset(std::size_t n_bonded, int max_type)
Reinitialize the underlying storage.
std::span< double > bonded
Contribution(s) from bonded interactions.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
boost::mpi::communicator comm_cart
The communicator.
DEVICE_QUALIFIER T lower_triangular(T i, T j)
Linear index into a lower triangular matrix.