1 /*
2  *  - - - - - - - - - - - -
3  *   g a l _ r z _ t e s t
4  *  - - - - - - - - - - - -
5  *
6  *  This routine is part of the General Astrodynamics Library
7  *
8  *  Description:
9  *
10  *     Test gal_rz routine.
11  *
12  *  Status:
13  *
14  *     Internal test routine
15  *
16  *  Called:
17  *
18  *     gal_rz
19  *     gal_vdv
20  *
21  *  This Revision:
22  *
23  *     2008 January 7 ( c version 2008 June 14 )
24  *
25  *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.
26  */
27 
28 #include "gal_rz.h"
29 #include "gal_rz_test.h"
30 #include "gal_test.h"
31 
32 void
gal_rz_test()33 gal_rz_test
34  (
35  )
36 {
37 
38     double psi, r[3][3] ;
39 
40     extern int gal_tfunc ;
41 
42 /*
43  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44  */
45 
46     psi = 0.3456789 ;
47     r[0][0] = 2.0 ;
48     r[0][1] = 3.0 ;
49     r[0][2] = 2.0 ;
50     r[1][0] = 3.0 ;
51     r[1][1] = 2.0 ;
52     r[1][2] = 3.0 ;
53     r[2][0] = 3.0 ;
54     r[2][1] = 4.0 ;
55     r[2][2] = 5.0 ;
56 
57     gal_rz ( psi, r ) ;
58     gal_vdv ( r[0][0], 2.898197754208926558,  1e-12, "gal_rz", "r[0][0]" ) ;
59     gal_vdv ( r[0][1], 3.500207892850426994,  1e-12, "gal_rz", "r[0][1]" ) ;
60     gal_vdv ( r[0][2], 2.898197754208926558,  1e-12, "gal_rz", "r[0][2]" ) ;
61     gal_vdv ( r[1][0], 2.144865911309686624,  1e-12, "gal_rz", "r[1][0]" ) ;
62     gal_vdv ( r[1][1], 0.8651847818978157800, 1e-12, "gal_rz", "r[1][1]" ) ;
63     gal_vdv ( r[1][2], 2.144865911309686624,  1e-12, "gal_rz", "r[1][2]" ) ;
64     gal_vdv ( r[2][0], 3.0,                   1e-12, "gal_rz", "r[2][0]" ) ;
65     gal_vdv ( r[2][1], 4.0,                   1e-12, "gal_rz", "r[2][1]" ) ;
66     gal_vdv ( r[2][2], 5.0,                   1e-12, "gal_rz", "r[2][2]" ) ;
67 
68     gal_tfunc++ ;
69 
70 /*
71  * Finished.
72  */
73 
74 }
75 
76 /*
77  *  gal - General Astrodynamics Library
78  *  Copyright (C) 2008 Paul C. L. Willmott
79  *
80  *  This program is free software; you can redistribute it and/or modify
81  *  it under the terms of the GNU General Public License as published by
82  *  the Free Software Foundation; either version 2 of the License, or
83  *  (at your option) any later version.
84  *
85  *  This program is distributed in the hope that it will be useful,
86  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
87  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
88  *  GNU General Public License for more details.
89  *
90  *  You should have received a copy of the GNU General Public License along
91  *  with this program; if not, write to the Free Software Foundation, Inc.,
92  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
93  *
94  *  Contact:
95  *
96  *  Paul Willmott
97  *  vp9mu@amsat.org
98  */
99