Skip to content

Commit b4edbd4

Browse files
committed
adding onlys to use const_def
1 parent 0028828 commit b4edbd4

File tree

295 files changed

+1192
-2093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+1192
-2093
lines changed

astero/private/adipls_support.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323

2424
module adipls_support
2525

26+
use const_def, only: dp, pi, four_thirds_pi, pi4
2627
use astero_def
2728
use star_lib
2829
use star_def
29-
use const_def
3030
use utils_lib
3131

3232

astero/private/adipls_support_stub.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module adipls_support
2626
use astero_def
2727
use star_lib
2828
use star_def
29-
use const_def
29+
use const_def, only: dp
3030
use utils_lib
3131

3232
implicit none

astero/private/astero_run_support.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module astero_run_support
2424

2525
use star_lib
2626
use star_def
27-
use const_def
27+
use const_def, only: dp
2828
use astero_support
2929

3030
implicit none
@@ -770,7 +770,7 @@ real(dp) function simplex_f( &
770770
write(*,*) 'chi2 < simplex_chi2_tol; stopping further iteration'
771771
ierr = -1
772772
return
773-
endif
773+
end if
774774

775775
end function simplex_f
776776

astero/private/astero_support.f90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ module astero_support
2626
use astero_def
2727
use star_lib
2828
use star_def
29-
use const_def
29+
use const_def, only: dp, Rsun, standard_cgrav
3030
use math_lib
3131
use utils_lib
3232
use auto_diff
3333

3434
implicit none
3535

36-
37-
3836
contains
3937

4038
subroutine check_search_controls(ierr)
@@ -111,7 +109,7 @@ subroutine get_one_el_info( &
111109
return
112110
end if
113111

114-
R = Rsun*s% photosphere_r
112+
R = Rsun * s% photosphere_r
115113
G = standard_cgrav
116114
M = s% m_grav(1)
117115
sig_fac = (2*pi)*(2*pi)*R*R*R/(G*M)

astero/private/extras_support.f90

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ module extras_support
2424

2525
use star_lib
2626
use star_def
27-
use const_def
27+
use const_def, only: dp, secyer
2828
use utils_lib
2929
use astero_support
3030
use astero_def
3131
use astero_def
3232

3333
implicit none
3434

35-
3635
contains
3736

3837

@@ -1238,6 +1237,4 @@ end subroutine move_flg
12381237

12391238
end subroutine move_extra_info
12401239

1241-
1242-
12431240
end module extras_support

astero/private/gyre_support.f90

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,18 @@
2222

2323
module gyre_support
2424

25-
! Uses
26-
2725
use astero_def
2826
use star_lib
2927
use star_def
30-
use const_def
28+
use const_def, only: dp, clight, crad, standard_cgrav, msun, rsun, lsun, mesa_dir
3129
use utils_lib
3230

3331
use gyre_mesa_m
3432

35-
! No implicit typing
36-
3733
implicit none
3834

39-
! Module variables
40-
4135
logical, parameter :: GYRE_IS_ENABLED = .true.
4236

43-
! Access specifiers
44-
4537
private
4638

4739
public :: GYRE_IS_ENABLED
@@ -52,14 +44,10 @@ module gyre_support
5244
public :: gyre_call_back
5345
public :: save_gyre_mode_info
5446

55-
! Procedures
56-
5747
contains
5848

5949
subroutine init_gyre (gyre_file, ierr)
6050

61-
use const_def
62-
6351
character(*), intent(in) :: gyre_file
6452
integer, intent(out) :: ierr
6553

@@ -83,13 +71,10 @@ subroutine init_gyre (gyre_file, ierr)
8371

8472
write(*,*) 'done init_gyre'
8573

86-
! Finish
87-
8874
return
8975

9076
end subroutine init_gyre
9177

92-
!****
9378

9479
subroutine do_gyre_get_modes (s, el, store_model, ierr)
9580

@@ -133,13 +118,10 @@ subroutine do_gyre_get_modes (s, el, store_model, ierr)
133118
write(*,1) 'time_in_oscillation_code and total', time, total_time_in_oscillation_code
134119
end if
135120

136-
! Finish
137-
138121
return
139122

140123
end subroutine do_gyre_get_modes
141124

142-
!****
143125

144126
subroutine null_gyre_call_back (md, ipar, rpar, ierr)
145127
type(mode_t), intent(in) :: md
@@ -149,7 +131,6 @@ subroutine null_gyre_call_back (md, ipar, rpar, ierr)
149131
ierr = 0
150132
end subroutine null_gyre_call_back
151133

152-
!****
153134

154135
subroutine store_model_for_gyre (s, add_center_point, keep_surface_point, add_atmosphere, ierr)
155136

@@ -226,7 +207,6 @@ subroutine store_model_for_gyre (s, add_center_point, keep_surface_point, add_at
226207

227208
end if
228209

229-
! Finish
230210

231211
return
232212

@@ -246,16 +226,12 @@ function num_string (n)
246226

247227
write(num_string, format_string) s%model_number
248228

249-
! Finish
250-
251229
return
252230

253231
end function num_string
254232

255233
end subroutine store_model_for_gyre
256234

257-
!****
258-
259235
subroutine gyre_call_back(md, ipar, rpar, ierr)
260236

261237
use astero_def, only: store_new_oscillation_results
@@ -286,13 +262,10 @@ subroutine gyre_call_back(md, ipar, rpar, ierr)
286262
new_el, new_order, new_em, new_inertia, new_cyclic_freq, new_growth_rate, &
287263
md, ipar, rpar, ierr)
288264

289-
! Finish
290-
291265
return
292266

293267
end subroutine gyre_call_back
294268

295-
!****
296269

297270
subroutine save_gyre_mode_info( &
298271
new_el, new_order, new_em, new_inertia, new_cyclic_freq, new_growth_rate, &

astero/private/pgstar_astero_plots.f90

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ subroutine do_echelle_plot( &
128128
id, device_id, xleft, xright, ybot, ytop, subplot, title, txt_scale, ierr)
129129

130130
use utils_lib
131-
use const_def
131+
use const_def, only: dp
132132

133133
integer, intent(in) :: id, device_id
134134
real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
@@ -400,7 +400,7 @@ subroutine do_ratios_plot( &
400400
id, device_id, xleft, xright, ybot, ytop, subplot, title, txt_scale, ierr)
401401

402402
use utils_lib
403-
use const_def
403+
use const_def, only: dp
404404

405405
integer, intent(in) :: id, device_id
406406
real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
@@ -650,6 +650,3 @@ end subroutine write_plot_to_file
650650

651651
end module pgstar_astero_plots
652652

653-
654-
655-

astero/public/astero_def.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
module astero_def
2727
use star_lib
2828
use star_def
29-
use const_def
29+
use const_def, only: dp, strlen
3030
use math_lib
3131
use utils_lib
3232
use star_pgstar

atm/private/atm_irradiated.f90

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,15 @@
2626

2727
module atm_irradiated
2828

29-
! Uses
30-
31-
use const_def
29+
use const_def, only: dp
3230
use math_lib
3331

34-
! No implicit typing
35-
3632
implicit none
3733

38-
! Access specifiers
39-
4034
private
4135

4236
public :: eval_irradiated
4337

44-
! Procedures
45-
4638
contains
4739

4840
! Evaluate irradiated atmosphere data with fixed, uniform opacity
@@ -107,7 +99,7 @@ subroutine eval_irradiated( &
10799
if (L <= 0._dp .OR. R <= 0._dp .OR. M <= 0._dp) then
108100
ierr = -1
109101
return
110-
endif
102+
end if
111103

112104
! Evaluate the 'interior' temperature & gravity
113105

@@ -191,21 +183,18 @@ subroutine eval_irradiated( &
191183

192184
dlnT_dlnkap = 0._dp
193185

194-
endif
186+
end if
195187

196188
! Set the effective temperature. This is equal to T_int, because
197189
! irradiation has no effect on the *net* flux emerging from the
198190
! atmosphere
199191

200192
! Teff = T_int
201193

202-
! Finish
203-
204194
return
205195

206196
end subroutine eval_irradiated
207197

208-
!****
209198

210199
! Evaluate atmosphere data
211200

@@ -273,7 +262,7 @@ subroutine eval_data( &
273262
gamma_eff = gamma
274263
else
275264
gamma_eff = kap_v/kap
276-
endif
265+
end if
277266

278267
x = gamma_eff*tau
279268

@@ -323,7 +312,7 @@ subroutine eval_data( &
323312
dlnx_dlnkap = 1._dp
324313
else
325314
dlnx_dlnkap = 0._dp
326-
endif
315+
end if
327316

328317
dlnT_dL = (dlnT_dlnT_int*dlnT_int_dlnL + &
329318
dlnT_dlntau*dlntau_dlnL + &
@@ -345,9 +334,7 @@ subroutine eval_data( &
345334
dlnT_dlnM = 0._dp
346335
dlnT_dlnkap = 0._dp
347336

348-
endif
349-
350-
! Finish
337+
end if
351338

352339
return
353340

0 commit comments

Comments
 (0)