ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
core/galilei/Galilei.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 * Max-Planck-Institute for Polymer Research, Theory Group
5 *
6 * This file is part of ESPResSo.
7 *
8 * ESPResSo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ESPResSo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include "system/System.hpp"
25
26#include <utils/Vector.hpp>
27
28class Galilei {
29public:
30 /** Stop particle motion by setting the velocity of each particle to zero.
31 * @param system the system to modify
32 * @param omega if true, also set particle angular velocities to zero
33 */
34 void kill_particle_motion(System::System &system, bool omega) const;
35
36 /** Set all the forces acting on the particles to zero.
37 * @param system the system to modify
38 * @param torque if true, also set particle torques to zero
39 */
40 void kill_particle_forces(System::System &system, bool torque) const;
41
42 /** Calculate the CMS of the system */
44
45 /** Calculate the CMS velocity of the system */
47
48 /** Remove the CMS velocity */
49 void galilei_transform(System::System &system) const;
50};
Vector implementation and trait types for boost qvm interoperability.
__global__ float float * torque
void kill_particle_motion(System::System &system, bool omega) const
Stop particle motion by setting the velocity of each particle to zero.
Definition Galilei.cpp:38
void galilei_transform(System::System &system) const
Remove the CMS velocity.
Definition Galilei.cpp:101
Utils::Vector3d calc_system_cms_velocity(System::System const &system) const
Calculate the CMS velocity of the system.
Definition Galilei.cpp:86
Utils::Vector3d calc_system_cms_position(System::System const &system) const
Calculate the CMS of the system.
Definition Galilei.cpp:69
void kill_particle_forces(System::System &system, bool torque) const
Set all the forces acting on the particles to zero.
Definition Galilei.cpp:53
Main system class.