22#ifdef ESPRESSO_VIRTUAL_SITES_RELATIVE
69 auto const omega_space_frame =
78 if (vs_rel.to_particle_id == -1) {
80 <<
" is a dangling virtual site";
85 runtimeErrorMsg() <<
"No real particle with id " << vs_rel.to_particle_id
86 <<
" for virtual site with id " << p.
id();
135 auto const &p_ref = *p_ref_ptr;
177 assert(p_ref_ptr !=
nullptr);
179 auto &p_ref = *p_ref_ptr;
181 p_ref.force() += p.
force();
187 p_ref.torque() += p.
torque();
201 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.
Describes a cell structure / cell system.
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.
void for_each_local_particle(ParticleUnaryOp &&f, bool parallel=true) const
Run a kernel on all local 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
__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(const CellStructure &cell_structure)
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.
static bool is_vs_independent_rot(Particle const &p)
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 bool is_vs(Particle const &p)
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 bool is_vs_relative_trans(Particle const &p)
Particle * get_reference_particle(CellStructure &cell_structure, Particle const &p)
Get real particle tracked by a virtual site.
static auto constraint_stress(Particle const &p_ref, Particle const &p_vs)
Constraint force to hold the particle at its prescribed position.
static bool is_vs_rot(Particle const &p)
This file contains all subroutines required to process rotational motion.
Utils::Vector3d convert_vector_body_to_space(const Particle &p, const Utils::Vector3d &vec)
Struct holding all information for one particle.
auto const & propagation() const
auto const & quat() const
auto const & vs_relative() const
auto const & torque() const
auto const & omega() const
auto const & image_box() const
auto const & force() const
Matrix representation with static size.