ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
steepest_descent.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
#ifndef CORE_INTEGRATORS_STEEPEST_DESCENT_HPP
23
#define CORE_INTEGRATORS_STEEPEST_DESCENT_HPP
24
25
#include "
ParticleRange.hpp
"
26
27
/** Parameters for the steepest descent algorithm */
28
struct
SteepestDescentParameters
{
29
/** Maximal particle force
30
*
31
* If the maximal force experienced by particles in the system (in any
32
* direction) is inferior to this threshold, minimization stops.
33
*/
34
double
f_max
;
35
/** Dampening constant */
36
double
gamma
;
37
/** Maximal particle displacement
38
*
39
* Maximal distance that a particle can travel during one integration step,
40
* in one direction.
41
*/
42
double
max_displacement
;
43
44
SteepestDescentParameters
(
double
f_max
,
double
gamma
,
45
double
max_displacement
);
46
};
47
48
void
register_integrator
(
SteepestDescentParameters
const
&obj);
49
50
/** Steepest descent integrator
51
* @return whether the maximum force/torque encountered is below the user
52
* limit @ref SteepestDescentParameters::f_max "f_max".
53
*/
54
bool
steepest_descent_step
(
const
ParticleRange
&particles);
55
56
#endif
/* CORE_INTEGRATORS_STEEPEST_DESCENT_HPP */
ParticleRange.hpp
ParticleRange
A range of particles.
Definition
ParticleRange.hpp:38
steepest_descent_step
bool steepest_descent_step(const ParticleRange &particles)
Steepest descent integrator.
Definition
steepest_descent.cpp:46
register_integrator
void register_integrator(SteepestDescentParameters const &obj)
Definition
steepest_descent.cpp:104
SteepestDescentParameters
Parameters for the steepest descent algorithm.
Definition
steepest_descent.hpp:28
SteepestDescentParameters::gamma
double gamma
Dampening constant.
Definition
steepest_descent.hpp:36
SteepestDescentParameters::max_displacement
double max_displacement
Maximal particle displacement.
Definition
steepest_descent.hpp:42
SteepestDescentParameters::f_max
double f_max
Maximal particle force.
Definition
steepest_descent.hpp:34
src
core
integrators
steepest_descent.hpp
Generated on Thu Dec 19 2024 02:13:16 for ESPResSo by
1.9.8