ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Propagation.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010-2023 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 "
PropagationMode.hpp
"
25
26
class
Propagation
{
27
public
:
28
int
integ_switch
=
INTEG_METHOD_NVT
;
29
int
used_propagations
=
PropagationMode::NONE
;
30
int
default_propagation
=
PropagationMode::NONE
;
31
int
lb_skipped_md_steps
= 0;
32
int
ek_skipped_md_steps
= 0;
33
/** If true, forces will be recalculated before the next integration. */
34
bool
recalc_forces
=
true
;
35
36
void
update_default_propagation
(
int
thermo_switch);
37
38
template
<
typename
Particle>
39
bool
should_propagate_with
(
Particle
const
&p,
int
mode)
const
{
40
return
(p.
propagation
() & mode) or
41
((
default_propagation
& mode) and
42
(p.
propagation
() &
PropagationMode::SYSTEM_DEFAULT
));
43
}
44
45
void
set_integ_switch
(
int
value) {
46
integ_switch
= value;
47
recalc_forces
=
true
;
48
}
49
};
PropagationMode.hpp
INTEG_METHOD_NVT
@ INTEG_METHOD_NVT
Definition
PropagationMode.hpp:46
Propagation
Definition
Propagation.hpp:26
Propagation::set_integ_switch
void set_integ_switch(int value)
Definition
Propagation.hpp:45
Propagation::recalc_forces
bool recalc_forces
If true, forces will be recalculated before the next integration.
Definition
Propagation.hpp:34
Propagation::lb_skipped_md_steps
int lb_skipped_md_steps
Definition
Propagation.hpp:31
Propagation::default_propagation
int default_propagation
Definition
Propagation.hpp:30
Propagation::update_default_propagation
void update_default_propagation(int thermo_switch)
Definition
integrate.cpp:130
Propagation::ek_skipped_md_steps
int ek_skipped_md_steps
Definition
Propagation.hpp:32
Propagation::should_propagate_with
bool should_propagate_with(Particle const &p, int mode) const
Definition
Propagation.hpp:39
Propagation::integ_switch
int integ_switch
Definition
Propagation.hpp:28
Propagation::used_propagations
int used_propagations
Definition
Propagation.hpp:29
PropagationMode::SYSTEM_DEFAULT
@ SYSTEM_DEFAULT
Definition
PropagationMode.hpp:26
PropagationMode::NONE
@ NONE
Definition
PropagationMode.hpp:25
Particle
Struct holding all information for one particle.
Definition
Particle.hpp:395
Particle::propagation
auto const & propagation() const
Definition
Particle.hpp:421
src
core
integrators
Propagation.hpp
Generated on Fri Nov 22 2024 02:13:54 for ESPResSo by
1.9.8