Line data Source code
1 : ! ***********************************************************************
2 : !
3 : ! Copyright (C) 2009 Bill Paxton, Frank Timmes & The MESA Team
4 : !
5 : ! This program is free software: you can redistribute it and/or modify
6 : ! it under the terms of the GNU Lesser General Public License
7 : ! as published by the Free Software Foundation,
8 : ! either version 3 of the License, or (at your option) any later version.
9 : !
10 : ! This program is distributed in the hope that it will be useful,
11 : ! but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 : ! See the GNU Lesser General Public License for more details.
14 : !
15 : ! You should have received a copy of the GNU Lesser General Public License
16 : ! along with this program. If not, see <https://www.gnu.org/licenses/>.
17 : !
18 : ! ***********************************************************************
19 :
20 : module mod_test_net
21 :
22 : implicit none
23 :
24 : contains
25 :
26 2 : subroutine test(quiet)
27 : use net_def
28 : use net_lib
29 : use mod_one_zone_burn, only: do_one_burn
30 : use test_net_support
31 : use utils_lib, only: mesa_error
32 :
33 : logical, intent(in) :: quiet
34 :
35 : integer :: ierr
36 :
37 2 : qt = quiet
38 :
39 2 : call load_libs
40 :
41 2 : test_logT = 7.833d0
42 2 : test_logRho = 2d0
43 2 : screening_mode = extended_screening
44 :
45 : if (.false.) then
46 : call Do_One_Test('approx21_cr60_plus_co56.net', .false.)
47 : stop
48 : end if
49 :
50 : if (.false.) then
51 : write (*, *) 'inlist_one_zone_burn'
52 : call do_one_burn('inlist_one_zone_burn', qt)
53 : stop
54 : end if
55 :
56 : if (.false.) then
57 : write (*, *) 'test_one_zone_burn_const_density'
58 : call do_one_burn('inlist_one_zone_burn_const_density', qt)
59 : stop
60 : end if
61 :
62 : if (.false.) then
63 : write (*, *) 'test_one_zone_burn_const_P'
64 : call do_one_burn('inlist_test_one_zone_burn_const_P', qt)
65 : stop
66 : end if
67 :
68 : if (.false.) then
69 : call Do_One_Test('pp_extras_alternate.net', .false.)
70 : stop
71 : end if
72 :
73 : if (.false.) then
74 : test_logRho = 6d0
75 : test_logT = 9.6d0
76 : call Do_One_Test('approx21.net', .false.)
77 : stop
78 : end if
79 :
80 : if (.false.) then
81 : call Do_One_Test('approx21.net', .false.); stop
82 : end if
83 :
84 : if (.false.) then
85 : call Do_One_Test_and_show_Qs('pp_and_cno_extras.net', .false.)
86 : stop
87 : end if
88 :
89 : if (.false.) then
90 : call Do_One_Test('wd_o_ne_ignite.net', .false.)
91 : stop
92 : end if
93 :
94 2 : if (.not. qt) write (*, *) ' **************** basic **************** '
95 :
96 : ! 1st one calls test_net_setup -- after than call change_net
97 2 : call test_net_setup('basic.net')
98 2 : call do_test_net(.false., .false.)
99 :
100 2 : if (.not. qt) write (*, *)
101 2 : if (.not. qt) write (*, *)
102 2 : if (.not. qt) write (*, *) ' **************** o18_and_ne22 **************** '
103 :
104 2 : call change_net('o18_and_ne22.net')
105 2 : call do_test_net(.false., .false.)
106 :
107 2 : if (.not. qt) write (*, *)
108 2 : if (.not. qt) write (*, *)
109 2 : if (.not. qt) write (*, *) ' **************** pp_extras **************** '
110 :
111 2 : call change_net('pp_extras.net')
112 2 : call do_test_net(.false., .false.)
113 :
114 2 : if (.not. qt) write (*, *)
115 2 : if (.not. qt) write (*, *)
116 2 : if (.not. qt) write (*, *) ' **************** cno_extras **************** '
117 :
118 2 : call change_net('cno_extras.net')
119 2 : call do_test_net(.false., .false.)
120 :
121 2 : if (.not. qt) write (*, *)
122 2 : if (.not. qt) write (*, *)
123 2 : if (.not. qt) write (*, *) ' **************** approx21 **************** '
124 :
125 2 : call change_net('approx21.net')
126 2 : test_logRho = 6d0
127 2 : test_logT = 9.6d0
128 2 : call do_test_net(.false., .false.)
129 :
130 2 : if (.not. qt) write (*, *)
131 2 : if (.not. qt) write (*, *)
132 2 : if (.not. qt) write (*, *) ' **************** approx21_plus_co56 **************** '
133 :
134 2 : call change_net('approx21_plus_co56.net')
135 2 : test_logRho = 6d0
136 2 : test_logT = 9.6d0
137 2 : call do_test_net(.false., .false.)
138 :
139 2 : if (.not. qt) write (*, *)
140 2 : if (.not. qt) write (*, *)
141 2 : if (.not. qt) write (*, *) ' **************** approx21_cr60_plus_co56 **************** '
142 :
143 2 : call change_net('approx21_cr60_plus_co56.net')
144 2 : call do_test_net(.false., .false.)
145 :
146 2 : if (.not. qt) write (*, *)
147 2 : if (.not. qt) write (*, *)
148 :
149 2 : if (.not. qt) write (*, *) 'test_one_zone_burn_small_net'
150 2 : call do_one_burn('inlist_test_one_zone_burn_small_net', qt)
151 : !
152 : ! if (.not. qt) write(*,*) 'test_one_zone_burn_big_net'
153 : ! call do_one_burn('inlist_test_one_zone_burn_big_net',qt)
154 : !
155 2 : if (.not. qt) write (*, *) 'test_one_zone_burn_const_P'
156 2 : call do_one_burn('inlist_test_one_zone_burn_const_P', qt)
157 :
158 2 : call test_net_cleanup
159 2 : call net_shutdown
160 2 : if (.not. qt) write (*, *)
161 :
162 2 : end subroutine test
163 :
164 : end module mod_test_net
|