Line data Source code
1 : ! ***********************************************************************
2 : !
3 : ! Copyright (C) 2012 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 other_net_get
21 :
22 : ! consult star/other/README for general usage instructions
23 : ! control name: use_other_net_get = .true.
24 : ! procedure pointer: s% other_net_get => my_routine
25 :
26 : implicit none
27 :
28 : contains
29 :
30 0 : subroutine null_other_net_get( &
31 : id, k, net_handle, just_dxdt, n, num_isos, num_reactions, &
32 0 : x, temp, log10temp, rho, log10rho, &
33 : abar, zbar, z2bar, ye, eta, d_eta_dlnT, d_eta_dlnRho, &
34 : rate_factors, weak_rate_factor, &
35 : reaction_Qs, reaction_neuQs, &
36 0 : eps_nuc, d_eps_nuc_dRho, d_eps_nuc_dT, d_eps_nuc_dx, &
37 0 : dxdt, d_dxdt_dRho, d_dxdt_dT, d_dxdt_dx, &
38 : screening_mode, &
39 0 : eps_nuc_categories, eps_neu_total, &
40 : ierr)
41 : use star_def
42 : use net_lib, only: net_get
43 : use net_def, only: Net_Info
44 : integer, intent(in) :: id ! id for star
45 : integer, intent(in) :: k ! cell number or 0 if not for a particular cell
46 : integer, intent(in) :: net_handle
47 : logical, intent(in) :: just_dxdt
48 : type(Net_Info) :: n
49 : integer, intent(in) :: num_isos
50 : integer, intent(in) :: num_reactions
51 : real(dp), intent(in) :: x(:) ! (num_isos)
52 : real(dp), intent(in) :: temp, log10temp ! log10 of temp
53 : real(dp), intent(in) :: rho, log10rho ! log10 of rho
54 : real(dp), intent(in) :: abar ! mean number of nucleons per nucleus
55 : real(dp), intent(in) :: zbar ! mean charge per nucleus
56 : real(dp), intent(in) :: z2bar ! mean charge squared per nucleus
57 : real(dp), intent(in) :: ye
58 : real(dp), intent(in) :: eta, d_eta_dlnT, d_eta_dlnRho ! electron degeneracy from eos.
59 : real(dp), intent(in), pointer :: rate_factors(:) ! (num_reactions)
60 : real(dp), intent(in) :: weak_rate_factor
61 : real(dp), pointer, intent(in) :: reaction_Qs(:) ! (rates_reaction_id_max)
62 : real(dp), pointer, intent(in) :: reaction_neuQs(:) ! (rates_reaction_id_max)
63 : real(dp), intent(out) :: eps_nuc ! ergs/g/s from burning after including losses to reaction neutrinos
64 : real(dp), intent(out) :: d_eps_nuc_dT
65 : real(dp), intent(out) :: d_eps_nuc_dRho
66 : real(dp), intent(inout) :: d_eps_nuc_dx(:) ! (num_isos)
67 : real(dp), intent(inout) :: dxdt(:) ! (num_isos)
68 : real(dp), intent(inout) :: d_dxdt_dRho(:) ! (num_isos)
69 : real(dp), intent(inout) :: d_dxdt_dT(:) ! (num_isos)
70 : real(dp), intent(inout) :: d_dxdt_dx(:, :) ! (num_isos, num_isos)
71 : real(dp), intent(inout) :: eps_nuc_categories(:) ! (num_categories)
72 : real(dp), intent(out) :: eps_neu_total ! ergs/g/s neutrinos from weak reactions
73 : integer, intent(in) :: screening_mode
74 : integer, intent(out) :: ierr ! 0 means okay
75 : call net_get( &
76 : net_handle, just_dxdt, n, num_isos, num_reactions, &
77 : x, temp, log10temp, rho, log10rho, &
78 : abar, zbar, z2bar, ye, eta, d_eta_dlnT, d_eta_dlnRho, &
79 : rate_factors, weak_rate_factor, &
80 : reaction_Qs, reaction_neuQs, &
81 : eps_nuc, d_eps_nuc_dRho, d_eps_nuc_dT, d_eps_nuc_dx, &
82 : dxdt, d_dxdt_dRho, d_dxdt_dT, d_dxdt_dx, &
83 : screening_mode, &
84 : eps_nuc_categories, eps_neu_total, &
85 0 : ierr)
86 0 : end subroutine null_other_net_get
87 :
88 : end module other_net_get
89 :
|