forked from hannorein/rebound
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintegrator.h
63 lines (58 loc) · 1.95 KB
/
integrator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* @file integrator.h
* @brief Interface for numerical particle integrators
* @author Hanno Rein <[email protected]>
*
* @section LICENSE
* Copyright (c) 2011 Hanno Rein, Shangfei Liu
*
* This file is part of rebound.
*
* rebound is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* rebound is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with rebound. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _INTEGRATOR_EULER_H
#define _INTEGRATOR_EULER_H
/*
* The first half of the integrator step.
* This function is called at the beginning of the timestep. It
* advances the positions by 1/2 timestep.
*/
void integrator_part1();
/*
* The second half of the integrator step.
* This function is called after gravitational (and non-gravitational)
* forces for each particle have been calculated. It advances the
* velocity by 1 timestep and the positions by 1/2 timestep.
* At the end of this function, the positions and velocities are in
* sync which is needed for collision detection.
*/
void integrator_part2();
/*
* Flag determining if the integrator needs to consider velocity
* dependent forces. This is only relevant for IAS15.
* Default is 1.
**/
extern int integrator_force_is_velocitydependent;
/*
* This parameter controls the accuracy of an adaptive integrator.
* Default is 0 (non-adaptive).
**/
extern double integrator_epsilon;
/*
* The minimum timestep to be used in an adaptive integrator.
* Default is 0 (no minimal timestep).
**/
extern double integrator_min_dt;
#endif