21#ifdef VIRTUAL_SITES_RELATIVE
68 auto const omega_space_frame =
84 if (vs_rel.to_particle_id == -1) {
86 <<
" is a dangling virtual site";
91 runtimeErrorMsg() <<
"No real particle with id " << vs_rel.to_particle_id
92 <<
" for virtual site with id " << p.
id();
128 for (
auto &p : particles) {
137 auto const &p_ref = *p_ref_ptr;
141 p.image_box() = p_ref.image_box();
155 p.quat() = p_ref.quat() * p.vs_relative().quat;
178 assert(p_ref_ptr !=
nullptr);
180 auto &p_ref = *p_ref_ptr;
182 p_ref.force() += p.force();
187 p_ref.torque() += p.torque();
200 p.vs_relative().to_particle_id)) {
Vector implementation and trait types for boost qvm interoperability.
This file contains everything related to the global cell structure / cell system.
void fold_position(Utils::Vector3d &pos, Utils::Vector3i &image_box) const
Fold coordinates to primary simulation box in-place.
This file contains the defaults for ESPResSo.
__device__ void vector_product(float const *a, float const *b, float *out)
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeErrorMsg()
void init_forces_ghosts(ParticleRange const &particles)
Set forces of all ghosts to zero.
@ DATA_PART_MOMENTUM
Particle::m.
@ DATA_PART_POSITION
Particle::r.
Vector< T, 3 > convert_quaternion_to_director(Quaternion< T > const &quat)
Convert quaternion to director.
Quaternion implementation and trait types for boost qvm interoperability.
Utils::Matrix< double, 3, 3 > vs_relative_pressure_tensor(CellStructure const &cell_structure)
static bool is_vs_relative_rot(Particle const &p)
void vs_relative_back_transfer_forces_and_torques(CellStructure &cell_structure)
static auto connection_vector(Particle const &p_ref, Particle const &p_vs)
Vector pointing from the real particle to the virtual site.
void vs_relative_update_particles(CellStructure &cell_structure, BoxGeometry const &box_geo)
static Utils::Vector3d velocity(Particle const &p_ref, Particle const &p_vs)
Velocity of the virtual site.
static Particle * get_reference_particle(CellStructure &cell_structure, Particle const &p)
Get real particle tracked by a virtual site.
static bool is_vs_relative_trans(Particle const &p)
static bool is_vs_relative(Particle const &p)
static auto constraint_stress(Particle const &p_ref, Particle const &p_vs)
Constraint force to hold the particle at its prescribed position.
This file contains all subroutines required to process rotational motion.
Utils::Vector3d convert_vector_body_to_space(const Particle &p, const Utils::Vector3d &vec)
Describes a cell structure / cell system.
ParticleRange ghost_particles() const
Particle * get_local_particle(int id)
Get a local particle by id.
void ghosts_update(unsigned data_parts)
Update ghost particles.
void ghosts_reduce_forces()
Add forces from ghost particles to real particles.
bool check_resort_required(Utils::Vector3d const &additional_offset={}) const
Check whether a particle has moved further than half the skin since the last Verlet list update,...
void set_resort_particles(Cells::Resort level)
Increase the local resort level at least to level.
ParticleRange local_particles() const
Struct holding all information for one particle.
auto const & propagation() const
auto const & quat() const
auto const & vs_relative() const
auto const & omega() const
auto const & force() const
Matrix representation with static size.