File: README.dev

package info (click to toggle)
galpy 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,520 kB
  • ctags: 2,166
  • sloc: python: 22,874; ansic: 8,249; makefile: 3
file content (37 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download
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
Develop README
==============

Adding a potential to the C integrator
--------------------------------------

1) Implement the potential in a .c file under
potential_src/potential_c_ext. Look at
potential_src/potential_c_ext/LogarithmicHaloPotential.c for the right
format

2) Add your new potential to
potential_src/potential_c_ext/galpy_potentials.h

3) Edit the code under orbit_src/orbit_c_ext/integratePlanarOrbit.c to
set up your new potential (in the 'parse_leapFuncArgs' function)

4) Edit the code in orbit_src/integratePlanarOrbit.py to set up your
new potential

5) Edit the code under orbit_src/orbit_c_ext/integrateFullOrbit.c to
set up your new potential (in the 'parse_leapFuncArgs_Full' function)

6) Edit the code in orbit_src/integrateFullOrbit.py to set up your
new potential

7) Edit the code in actionAngle_src/actionAngle_c_ext/actionAngle.c to
parse the new potential

8) Finally, add 'self.hasC= True' to the initialization of the
potential in question (after the initialization of the super class)

9) It should work now!

10) If you implement the second derivatives of the potential necessary
to integrate phase-space volumes, also set self.hasC_dxdv=True to the
initialization of the potential in question.