58 return p.
quat() * vec;
63 assert(p.
quat().norm() > 0.0);
64 return rotation_matrix(p.
quat()).transposed() * v;
88 auto const O = rotation_matrix(quat);
107inline std::pair<Utils::Quaternion<double>,
double>
110 return {quat, dip.
norm()};
125 if (std::abs(phi) > std::numeric_limits<double>::epsilon())
127 boost::qvm::rot_quat(mask(p.
rotation(), axis_body_frame), phi);
136 if (std::abs(phi) > std::numeric_limits<double>::epsilon()) {
Vector implementation and trait types for boost qvm interoperability.
This file contains the defaults for ESPResSo.
Matrix implementation and trait types for boost qvm interoperability.
Quaternion< T > convert_director_to_quaternion(Vector< T, 3 > const &d)
Convert director to quaternion.
Quaternion implementation and trait types for boost qvm interoperability.
auto convert_body_to_space(const Utils::Quaternion< double > &quat, const Utils::Matrix< T, 3, 3 > &A)
Transform matrix from body- to space-fixed frame.
void convert_torque_to_body_frame_apply_fix(Particle &p)
void convert_initial_torques(const ParticleRange &particles)
Convert torques to the body-fixed frame before the integration loop.
Utils::Vector3d convert_vector_body_to_space(const Particle &p, const Utils::Vector3d &vec)
void propagate_omega_quat_particle(Particle &p, double time_step)
Propagate angular velocities and update quaternions on a particle.
void convert_torque_propagate_omega(Particle &p, double time_step)
std::pair< Utils::Quaternion< double >, double > convert_dip_to_quat(const Utils::Vector3d &dip)
convert a dipole moment to quaternions and dipolar strength
Utils::Vector3d convert_vector_space_to_body(const Particle &p, const Utils::Vector3d &v)
Utils::Quaternion< double > local_rotate_particle_body(Particle const &p, const Utils::Vector3d &axis_body_frame, const double phi)
Rotate the particle p around the body-frame defined NORMALIZED axis aBodyFrame by amount phi.
void local_rotate_particle(Particle &p, const Utils::Vector3d &axis_space_frame, const double phi)
Rotate the particle p around the NORMALIZED axis aSpaceFrame by amount phi.
Struct holding all information for one particle.
auto const & quat() const
auto const & rotation() const
auto const & torque() const
Matrix representation with static size.
Matrix< T, Cols, Rows > transposed() const
Retrieve a transposed copy of the matrix.
Quaternion representation.