ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
sd_interface.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010-2022 The ESPResSo project
3
*
4
* This file is part of ESPResSo.
5
*
6
* ESPResSo is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* ESPResSo is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
/** @file
23
* See @cite durlofsky87a for the Stokesian dynamics method used here.
24
* See @cite banchio03a and @cite brady88a for the thermalization method.
25
*/
26
27
#include "
config/config.hpp
"
28
29
#ifdef STOKESIAN_DYNAMICS
30
31
#include "
ParticleRange.hpp
"
32
#include "
PropagationMode.hpp
"
33
#include "
PropagationPredicate.hpp
"
34
#include "thermostat.hpp"
35
36
#include <unordered_map>
37
38
struct
PropagationPredicateStokesian
{
39
int
modes
;
40
PropagationPredicateStokesian
(
int
default_propagation) {
41
modes
=
PropagationMode::TRANS_STOKESIAN
;
42
if
(default_propagation &
PropagationMode::TRANS_STOKESIAN
) {
43
modes
|=
PropagationMode::SYSTEM_DEFAULT
;
44
}
45
}
46
47
bool
operator()
(
int
prop)
const
{
return
(prop &
modes
); }
48
};
49
50
using
ParticleRangeStokesian
=
51
ParticleRangeFiltered<PropagationPredicateStokesian>
;
52
53
struct
StokesianDynamicsParameters
{
54
double
viscosity
;
55
std::unordered_map<int, double>
radii
;
56
int
flags
;
57
StokesianDynamicsParameters
(
double
viscosity
,
58
std::unordered_map<int, double>
radii
,
int
flags
);
59
};
60
61
enum class
sd_flags
:
int
{
62
NONE
= 0,
63
SELF_MOBILITY
= 1 << 0,
64
PAIR_MOBILITY
= 1 << 1,
65
LUBRICATION
= 1 << 2,
66
FTS
= 1 << 3
67
};
68
69
void
register_integrator
(
StokesianDynamicsParameters
const
&obj);
70
71
/** Takes the forces and torques on all particles and computes their
72
* velocities. Acts globally on particles on all nodes; i.e. particle data
73
* is gathered from all nodes and their velocities and angular velocities are
74
* set according to the Stokesian Dynamics method.
75
*/
76
void
propagate_vel_pos_sd
(
ParticleRangeStokesian
const
&particles,
77
StokesianThermostat
const
&stokesian,
78
double
time_step,
double
kT);
79
80
#endif
// STOKESIAN_DYNAMICS
ParticleRange.hpp
PropagationMode.hpp
PropagationPredicate.hpp
ParticleRangeFiltered
Definition
PropagationPredicate.hpp:40
config.hpp
This file contains the defaults for ESPResSo.
PropagationMode::TRANS_STOKESIAN
@ TRANS_STOKESIAN
Definition
PropagationMode.hpp:34
PropagationMode::SYSTEM_DEFAULT
@ SYSTEM_DEFAULT
Definition
PropagationMode.hpp:26
propagate_vel_pos_sd
void propagate_vel_pos_sd(ParticleRangeStokesian const &particles, StokesianThermostat const &stokesian, double time_step, double kT)
Takes the forces and torques on all particles and computes their velocities.
Definition
sd_interface.cpp:127
sd_flags
sd_flags
Definition
sd_interface.hpp:61
sd_flags::NONE
@ NONE
sd_flags::LUBRICATION
@ LUBRICATION
sd_flags::PAIR_MOBILITY
@ PAIR_MOBILITY
sd_flags::SELF_MOBILITY
@ SELF_MOBILITY
sd_flags::FTS
@ FTS
register_integrator
void register_integrator(StokesianDynamicsParameters const &obj)
Definition
sd_interface.cpp:77
PropagationPredicateStokesian
Definition
sd_interface.hpp:38
PropagationPredicateStokesian::modes
int modes
Definition
sd_interface.hpp:39
PropagationPredicateStokesian::operator()
bool operator()(int prop) const
Definition
sd_interface.hpp:47
PropagationPredicateStokesian::PropagationPredicateStokesian
PropagationPredicateStokesian(int default_propagation)
Definition
sd_interface.hpp:40
StokesianDynamicsParameters
Definition
sd_interface.hpp:53
StokesianDynamicsParameters::radii
std::unordered_map< int, double > radii
Definition
sd_interface.hpp:55
StokesianDynamicsParameters::viscosity
double viscosity
Definition
sd_interface.hpp:54
StokesianDynamicsParameters::flags
int flags
Definition
sd_interface.hpp:56
StokesianThermostat
Thermostat for Stokesian dynamics.
Definition
core/thermostat.hpp:355
src
core
stokesian_dynamics
sd_interface.hpp
Generated on Fri Nov 22 2024 02:13:54 for ESPResSo by
1.9.8