![]() |
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>
Include dependency graph for rotation.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
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 101 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 87 of file rotation.hpp.
References stream, and 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 109 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_initial_torques | ( | const ParticleRange & | particles | ) |
Convert torques to the body-fixed frame before the integration loop.
Definition at line 192 of file rotation.cpp.
References convert_torque_to_body_frame_apply_fix().
Referenced by System::System::integrate().
Definition at line 163 of file rotation.cpp.
References Particle::can_rotate(), convert_torque_to_body_frame_apply_fix(), Particle::omega(), Particle::rinertia(), stream, and Particle::torque().
Referenced by symplectic_euler_rotator_1(), and velocity_verlet_rotator_2().
Definition at line 144 of file rotation.hpp.
References convert_vector_space_to_body(), Particle::rotation(), and Particle::torque().
Referenced by brownian_dynamics_rotator(), convert_initial_torques(), and convert_torque_propagate_omega().
|
inline |
Definition at line 58 of file rotation.hpp.
References Particle::quat(), and stream.
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 62 of file rotation.hpp.
References Particle::quat(), and stream.
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 134 of file rotation.hpp.
References convert_vector_space_to_body(), local_rotate_particle_body(), Particle::quat(), and stream.
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 120 of file rotation.hpp.
References Particle::can_rotate(), Particle::quat(), Particle::rotation(), and stream.
Referenced by bd_drag_rot(), bd_random_walk_rot(), and local_rotate_particle().
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(), Particle::rotation(), and stream.
Referenced by symplectic_euler_rotator_1(), and velocity_verlet_rotator_1().