Line data Source code
1 : ! ***********************************************************************
2 : !
3 : ! Copyright (C) 2010 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 pgstar_trho
21 :
22 : use star_private_def
23 : use const_def, only: dp
24 : use pgstar_support
25 : use star_pgstar
26 :
27 : implicit none
28 :
29 :
30 : contains
31 :
32 :
33 0 : subroutine TRho_Plot(id, device_id, ierr)
34 : integer, intent(in) :: id, device_id
35 : integer, intent(out) :: ierr
36 : type (star_info), pointer :: s
37 :
38 : ierr = 0
39 0 : call get_star_ptr(id, s, ierr)
40 0 : if (ierr /= 0) return
41 :
42 0 : call pgslct(device_id)
43 0 : call pgbbuf()
44 0 : call pgeras()
45 :
46 : call do_TRho_Plot(s, id, device_id, &
47 : s% pg% TRho_xleft, s% pg% TRho_xright, &
48 : s% pg% TRho_ybot, s% pg% TRho_ytop, .false., &
49 0 : s% pg% TRho_title, s% pg% TRho_txt_scale, ierr)
50 0 : if (ierr /= 0) return
51 :
52 0 : call pgebuf()
53 :
54 : end subroutine TRho_Plot
55 :
56 :
57 0 : subroutine do_TRho_Plot(s, id, device_id, &
58 : xleft, xright, ybot, ytop, subplot, title, txt_scale, ierr)
59 : use pgstar_hist_track, only: null_decorate, do_Hist_Track
60 : type (star_info), pointer :: s
61 : integer, intent(in) :: id, device_id
62 : real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
63 : logical, intent(in) :: subplot
64 : character (len=*), intent(in) :: title
65 : integer, intent(out) :: ierr
66 : logical, parameter :: &
67 : reverse_xaxis = .false., reverse_yaxis = .false.
68 : ierr = 0
69 : call do_Hist_Track(s, id, device_id, &
70 : xleft, xright, ybot, ytop, subplot, title, txt_scale, &
71 : 'log_center_Rho', 'log_center_T', &
72 : 'log Rho\dc\u (g cm\u-3\d)', 'log T\dc\u (K)', &
73 : s% pg% TRho_logRho_min, s% pg% TRho_logRho_max, &
74 : s% pg% TRho_logRho_margin, s% pg% TRho_logRho_dlogRho_min, &
75 : s% pg% TRho_logT_min, s% pg% TRho_logT_max, &
76 : s% pg% TRho_logT_margin, s% pg% TRho_logT_dlogT_min, &
77 : s% pg% TRho_step_min, s% pg% TRho_step_max, &
78 : reverse_xaxis, reverse_yaxis, .false., .false., &
79 : .false., 0, 0.0, 0.0, 0.0, 0.0, &
80 : s% pg% show_TRho_annotation1, &
81 : s% pg% show_TRho_annotation2, &
82 : s% pg% show_TRho_annotation3, &
83 : s% pg% TRho_fname, &
84 : s% pg% TRho_use_decorator, &
85 : s% pg% TRho_pgstar_decorator, &
86 0 : do_degeneracy_line, ierr)
87 0 : end subroutine do_TRho_Plot
88 :
89 :
90 0 : subroutine do_degeneracy_line(id, ierr)
91 0 : use pgstar_colors
92 : integer, intent(in) :: id
93 : integer, intent(out) :: ierr
94 : type (star_info), pointer :: s
95 : ierr = 0
96 0 : call get_star_ptr(id, s, ierr)
97 0 : if (ierr /= 0) return
98 0 : if (.not. s% pg% show_TRho_degeneracy_line) return
99 0 : call pgsave
100 0 : call pgsci(clr_Gray)
101 0 : call pgsls(Line_Type_Dash)
102 0 : call pgline(size(psi4_logT), psi4_logRho, psi4_logT)
103 0 : call pgsls(Line_Type_Solid)
104 0 : call pgunsa
105 : end subroutine do_degeneracy_line
106 :
107 :
108 : end module pgstar_trho
109 :
|