![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
This file contains all subroutines required to process rotational motion. More...
#include <config/config.hpp>#include "Particle.hpp"#include "ParticleRange.hpp"#include <utils/Vector.hpp>#include <utils/mask.hpp>#include <utils/math/quaternion.hpp>#include <utils/matrix.hpp>#include <utils/quaternion.hpp>#include <cassert>#include <cmath>#include <limits>#include <utility>Go to the source code of this file.
Functions | |
| 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) |
| auto | convert_vector_body_to_space (Utils::Quaternion< double > const &quat, Utils::Vector3d const &vec) |
| auto | convert_vector_space_to_body (Utils::Quaternion< double > const &quat, Utils::Vector3d const &vec) |
| void | convert_torque_to_body_frame_apply_fix (Particle &p) |
| template<class T> | |
| 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. | |
| template<class T> | |
| auto | convert_body_to_space (const Particle &p, const Utils::Matrix< T, 3, 3 > &A) |
| Transform matrix from body- to space-fixed frame. | |
| std::pair< Utils::Quaternion< double >, double > | convert_dip_to_quat (const Utils::Vector3d &dip) |
| convert a dipole moment to quaternions and dipolar strength | |
| 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. | |
This file contains all subroutines required to process rotational motion.
Definition in file rotation.hpp.
| auto convert_body_to_space | ( | const Particle & | p, |
| const Utils::Matrix< T, 3, 3 > & | A ) |
Transform matrix from body- to space-fixed frame.
| T | Scalar type |
| p | Particle transforming from. |
| A | Matrix representation in body-fixed coordinates. |
Definition at line 103 of file rotation.hpp.
References convert_body_to_space(), and Particle::quat().
| 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.
Given a linear map represented by \( A \in \mathbb{R}^{3 \times 3}\) in the body-fixed frame, this returns the matrix \( A \in \mathbb{R}^{3 \times 3}\) representing the map in the space-fixed frame. They are related by the map between the space-fixed and body-fixed frame \(O\) like
\[ A' = O A O^T. \]
| T | Scalar type |
| quat | quaternion to transform from, i.e. the rotation that transforms space- to body-fixed frame. |
| A | Matrix representation in body-fixed coordinates. |
Definition at line 89 of file rotation.hpp.
References Utils::Matrix< T, Rows, Cols >::transposed().
Referenced by convert_body_to_space(), and Thermostat::handle_particle_anisotropy().
|
inline |
convert a dipole moment to quaternions and dipolar strength
Definition at line 111 of file rotation.hpp.
References Utils::convert_director_to_quaternion(), and Utils::Vector< T, N >::norm().
Referenced by ScriptInterface::Particles::ParticleHandle::ParticleHandle(), stoner_wohlfarth_main(), and stoner_wohlfarth_no_field().
| void convert_torque_propagate_omega | ( | Particle & | p, |
| double | time_step ) |
Definition at line 163 of file rotation.cpp.
References Particle::can_rotate(), convert_torque_to_body_frame_apply_fix(), Particle::omega(), Particle::rinertia(), and Particle::torque().
Referenced by symplectic_euler_rotator_1(), and velocity_verlet_rotator_2().
|
inline |
Definition at line 65 of file rotation.hpp.
References convert_vector_space_to_body(), Utils::mask(), Particle::quat(), Particle::rotation(), and Particle::torque().
Referenced by brownian_dynamics_rotator(), convert_torque_propagate_omega(), and velocity_verlet_rotator_1().
|
inline |
Definition at line 54 of file rotation.hpp.
Referenced by ParticleObservables::traits< Particle >::angular_velocity(), bd_drag(), bd_drag_vel(), bd_random_walk(), ScriptInterface::Particles::ParticleHandle::do_call_method(), init_forces_and_thermostat(), ScriptInterface::Particles::ParticleHandle::ParticleHandle(), and velocity().
|
inline |
Definition at line 59 of file rotation.hpp.
References Utils::Quaternion< T >::norm().
Referenced by bd_drag(), bd_drag_vel(), convert_torque_to_body_frame_apply_fix(), ScriptInterface::Particles::ParticleHandle::do_call_method(), local_rotate_particle(), ScriptInterface::Particles::ParticleHandle::ParticleHandle(), and ParticleObservables::traits< Particle >::velocity_body().
|
inline |
Rotate the particle p around the NORMALIZED axis aSpaceFrame by amount phi.
Definition at line 136 of file rotation.hpp.
References convert_vector_space_to_body(), local_rotate_particle_body(), and Particle::quat().
Referenced by ScriptInterface::Particles::ParticleHandle::do_call_method(), SteepestDescent::propagate(), ScriptInterface::System::rotate_system(), and stokesian_dynamics_step_1().
|
inline |
Rotate the particle p around the body-frame defined NORMALIZED axis aBodyFrame by amount phi.
Definition at line 122 of file rotation.hpp.
References Particle::can_rotate(), Particle::quat(), and Particle::rotation().
Referenced by bd_drag_rot(), bd_random_walk_rot(), and local_rotate_particle().
| void propagate_omega_quat_particle | ( | Particle & | p, |
| double | time_step ) |
Propagate angular velocities and update quaternions on a particle.
Propagate angular velocities and update quaternions on a particle.
Please note that ESPResSo uses scalar-first notation for quaternions, while [34] uses scalar-last notation.
For very high angular velocities (e.g. if the product of time_step with the largest component of p.omega() is superior to ~2.0) and for time_step superior or equal to unity, the calculation might fail.
Definition at line 129 of file rotation.cpp.
References Particle::can_rotate(), define_Qdd(), Utils::Quaternion< T >::identity(), Utils::mask(), Particle::omega(), Particle::quat(), and Particle::rotation().
Referenced by symplectic_euler_rotator_1(), and velocity_verlet_rotator_1().