34#include "system/System.hpp"
41#include <boost/mpi/collectives/reduce.hpp>
55 auto const pref = (
pid1 <
pid2) ? 1.0 : -1.0;
56 return pref * Random::noise_uniform<RNGSalt::SALT_DPD>(
68 sqrt(24.0 * kT *
ia_params.dpd.radial.gamma / time_step);
70 sqrt(24.0 * kT *
ia_params.dpd.trans.gamma / time_step);
82 double dist,
double dist2) {
98 auto const P = tensor_product(d / dist2, d);
106 auto const &box_geo = *
system.box_geo;
107 auto const &nonbonded_ias = *
system.nonbonded_ias;
108 auto &cell_structure = *
system.cell_structure;
109 system.on_observable_calc();
112 cell_structure.non_bonded_loop([&
stress, &box_geo, &nonbonded_ias](
116 box_geo.velocity_difference(
p1.pos(),
p2.pos(),
p1.v(),
p2.v());
118 auto const &
ia_params = nonbonded_ias.get_ia_param(
p1.type(),
p2.type());
157 boost::mpi::communicator
const &comm) {
Vector implementation and trait types for boost qvm interoperability.
Utils::Vector3d velocity_difference(Utils::Vector3d const &x, Utils::Vector3d const &y, Utils::Vector3d const &u, Utils::Vector3d const &v) const
Calculate the velocity difference including the Lees-Edwards velocity.
void dpd_init(double kT, double time_step)
auto & get_ia_param(int i, int j)
Get interaction parameters between particle types i and j.
auto get_max_seen_particle_type() const
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
static auto dpd_viscous_stress_local(System::System &system)
Utils::Vector9d dpd_stress(System::System &system, boost::mpi::communicator const &comm)
Viscous stress tensor of the DPD interaction.
Utils::Vector3d dpd_pair_force(Utils::Vector3d const &p1_position, Utils::Vector3d const &p1_velocity, int const &p1_id, Utils::Vector3d const &p2_position, Utils::Vector3d const &p2_velocity, int const &p2_id, DPDThermostat const &dpd, BoxGeometry const &box_geo, IA_parameters const &ia_params, Utils::Vector3d const &d, double dist, double dist2)
Utils::Vector9d dpd_pressure_local(System::System &system)
Local contribution to the pressure tensor.
static Utils::Vector3d dpd_noise(DPDThermostat const &dpd, int pid1, int pid2)
Return a random uniform 3D vector with the Philox thermostat.
Routines to use DPD as thermostat or pair force .
Matrix implementation and trait types for boost qvm interoperability.
void flatten(Range const &v, OutputIterator out)
Flatten a range of ranges.
Various procedures concerning interactions between particles.
Random number generation using Philox.
uint64_t rng_counter() const
Get current value of the RNG.
uint32_t rng_seed() const
Thermostat for dissipative particle dynamics.
Distance vector and length handed to pair kernels.
Parameters for non-bonded interactions.
Struct holding all information for one particle.
Matrix representation with static size.