Skip to content

Commit 2f8eef1

Browse files
Adding (some) pure functions and subroutines (#840)
Co-authored-by: Spencer Bryngelson <[email protected]>
1 parent 6aba752 commit 2f8eef1

Some content is hidden

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

62 files changed

+653
-641
lines changed

misc/m_silo_proxy.f90

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module m_silo_proxy
4444

4545
!> @brief Refer to page 28 of Silo's user guide (10/2007, v4.6) for
4646
!! information about this subroutine
47-
function DBCREATE(pathname, lpathname, mode, target, &
47+
impure function DBCREATE(pathname, lpathname, mode, target, &
4848
fileinfo, lfileinfo, filetype, status)
4949

5050
integer :: DBCREATE
@@ -66,7 +66,7 @@ end function DBCREATE
6666

6767
!> @brief Refer to page 235 of Silo's user guide (10/2007, v4.6)
6868
!! for information about this subroutine
69-
function DBGET2DSTRLEN()
69+
impure function DBGET2DSTRLEN()
7070

7171
integer :: DBGET2DSTRLEN
7272

@@ -79,7 +79,7 @@ end function DBGET2DSTRLEN
7979

8080
!> @brief Refer to page 234 of Silo's user guide (10/2007, v4.6)
8181
!! for information about this subroutine
82-
function DBSET2DSTRLEN(len)
82+
impure function DBSET2DSTRLEN(len)
8383

8484
integer :: DBSET2DSTRLEN
8585
integer, intent(IN) :: len
@@ -93,7 +93,7 @@ end function DBSET2DSTRLEN
9393

9494
!> @brief Refer to page 185 of Silo's user guide (10/2007, v4.6)
9595
!! for information about this subroutine
96-
function DBMKOPTLIST(maxopts, optlist_id)
96+
impure function DBMKOPTLIST(maxopts, optlist_id)
9797

9898
integer :: DBMKOPTLIST
9999
integer, intent(IN) :: maxopts
@@ -107,7 +107,7 @@ end function DBMKOPTLIST
107107

108108
!> @brief Refer to page 186 of Silo's user guide (10/2007, v4.6)
109109
!! for information about this subroutine
110-
function DBADDIOPT(optlist_id, option, ivalue)
110+
impure function DBADDIOPT(optlist_id, option, ivalue)
111111

112112
integer :: DBADDIOPT
113113
integer, intent(IN) :: optlist_id
@@ -123,7 +123,7 @@ end function DBADDIOPT
123123

124124
!> @brief Refer to page 186 of Silo's user guide (10/2007, v4.6)
125125
!! for information about this subroutine
126-
function DBADDDOPT(optlist_id, option, dvalue)
126+
impure function DBADDDOPT(optlist_id, option, dvalue)
127127

128128
integer :: DBADDDOPT
129129
integer, intent(IN) :: optlist_id
@@ -139,7 +139,7 @@ end function DBADDDOPT
139139

140140
!> @brief Refer to page 121 of Silo's user guide (10/2007, v4.6)
141141
!! for information about this subroutine
142-
function DBPUTMMESH(dbid, name, lname, nmesh, meshnames, &
142+
impure function DBPUTMMESH(dbid, name, lname, nmesh, meshnames, &
143143
lmeshnames, meshtypes, optlist_id, status)
144144

145145
integer :: DBPUTMMESH
@@ -162,7 +162,7 @@ end function DBPUTMMESH
162162

163163
!> @brief Refer to page 189 of Silo's user guide (10/2007, v4.6)
164164
!! for information about this subroutine
165-
function DBFREEOPTLIST(optlist_id)
165+
impure function DBFREEOPTLIST(optlist_id)
166166

167167
integer :: DBFREEOPTLIST
168168
integer, intent(IN) :: optlist_id
@@ -175,7 +175,7 @@ end function DBFREEOPTLIST
175175

176176
!> @brief Refer to page 57 of Silo's user guide (10/2007, v4.6) for
177177
!! information about this subroutine
178-
function DBPUTQM(dbid, name, lname, xname, lxname, yname, lyname, &
178+
impure function DBPUTQM(dbid, name, lname, xname, lxname, yname, lyname, &
179179
zname, lzname, x, y, z, dims, ndims, datatype, &
180180
coordtype, optlist_id, status)
181181

@@ -208,7 +208,7 @@ end function DBPUTQM
208208

209209
!> @brief Refer to page 46 of Silo's user guide (10/2007, v4.6) for
210210
!! information about this subroutine
211-
function DBPUTCURVE(dbid, curvename, lcurvename, xvals, yvals, &
211+
impure function DBPUTCURVE(dbid, curvename, lcurvename, xvals, yvals, &
212212
datatype, npoints, optlist_id, status)
213213

214214
integer :: DBPUTCURVE
@@ -231,7 +231,7 @@ end function DBPUTCURVE
231231

232232
!> @brief Refer to page 130 of Silo's user guide (10/2007, v4.6)
233233
!! for information about this subroutine
234-
function DBPUTMVAR(dbid, name, lname, nvar, varnames, lvarnames, &
234+
impure function DBPUTMVAR(dbid, name, lname, nvar, varnames, lvarnames, &
235235
vartypes, optlist_id, status)
236236

237237
integer :: DBPUTMVAR
@@ -254,7 +254,7 @@ end function DBPUTMVAR
254254

255255
!> @brief Refer to page 64 of Silo's user guide (10/2007, v4.6) for
256256
!! information about this subroutine
257-
function DBPUTQV1(dbid, name, lname, meshname, lmeshname, var, &
257+
impure function DBPUTQV1(dbid, name, lname, meshname, lmeshname, var, &
258258
dims, ndims, mixvar, mixlen, datatype, &
259259
centering, optlist_id, status)
260260

@@ -283,7 +283,7 @@ end function DBPUTQV1
283283

284284
!> @brief Refer to page 31 of Silo's user guide (10/2007, v4.6) for
285285
!! information about this subroutine
286-
function DBCLOSE(dbid)
286+
impure function DBCLOSE(dbid)
287287

288288
integer :: DBCLOSE
289289
integer, intent(IN) :: dbid

src/common/m_boundary_common.fpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module m_boundary_common
4242

4343
contains
4444

45-
subroutine s_initialize_boundary_common_module()
45+
impure subroutine s_initialize_boundary_common_module()
4646

4747
bcxb = bc_x%beg; bcxe = bc_x%end; bcyb = bc_y%beg; bcye = bc_y%end; bczb = bc_z%beg; bcze = bc_z%end
4848

@@ -71,7 +71,7 @@ contains
7171
!> The purpose of this procedure is to populate the buffers
7272
!! of the primitive variables, depending on the selected
7373
!! boundary conditions.
74-
subroutine s_populate_variables_buffers(q_prim_vf, pb, mv, bc_type)
74+
impure subroutine s_populate_variables_buffers(q_prim_vf, pb, mv, bc_type)
7575

7676
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
7777
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, mv
@@ -237,7 +237,7 @@ contains
237237

238238
end subroutine s_populate_variables_buffers
239239

240-
subroutine s_ghost_cell_extrapolation(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
240+
pure subroutine s_ghost_cell_extrapolation(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
241241
#ifdef _CRAYFTN
242242
!DIR$ INLINEALWAYS s_ghost_cell_extrapolation
243243
#else
@@ -306,7 +306,7 @@ contains
306306

307307
end subroutine s_ghost_cell_extrapolation
308308

309-
subroutine s_symmetry(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
309+
pure subroutine s_symmetry(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
310310
#ifdef _CRAYFTN
311311
!DIR$ INLINEALWAYS s_symmetry
312312
#else
@@ -570,7 +570,7 @@ contains
570570

571571
end subroutine s_symmetry
572572

573-
subroutine s_periodic(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
573+
pure subroutine s_periodic(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
574574
#ifdef _CRAYFTN
575575
!DIR$ INLINEALWAYS s_periodic
576576
#else
@@ -713,7 +713,7 @@ contains
713713

714714
end subroutine s_periodic
715715

716-
subroutine s_axis(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
716+
pure subroutine s_axis(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
717717
#ifdef _CRAYFTN
718718
!DIR$ INLINEALWAYS s_axis
719719
#else
@@ -777,7 +777,7 @@ contains
777777

778778
end subroutine s_axis
779779

780-
subroutine s_slip_wall(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
780+
pure subroutine s_slip_wall(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
781781
#ifdef _CRAYFTN
782782
!DIR$ INLINEALWAYS s_slip_wall
783783
#else
@@ -876,7 +876,7 @@ contains
876876

877877
end subroutine s_slip_wall
878878

879-
subroutine s_no_slip_wall(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
879+
pure subroutine s_no_slip_wall(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
880880
#ifdef _CRAYFTN
881881
!DIR$ INLINEALWAYS s_no_slip_wall
882882
#else
@@ -1011,7 +1011,7 @@ contains
10111011

10121012
end subroutine s_no_slip_wall
10131013

1014-
subroutine s_dirichlet(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
1014+
pure subroutine s_dirichlet(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
10151015
#ifdef _CRAYFTN
10161016
!DIR$ INLINEALWAYS s_dirichlet
10171017
#else
@@ -1080,7 +1080,7 @@ contains
10801080

10811081
end subroutine s_dirichlet
10821082

1083-
subroutine s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l)
1083+
pure subroutine s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l)
10841084
#ifdef _CRAYFTN
10851085
!DIR$ INLINEALWAYS s_qbmm_extrapolation
10861086
#else
@@ -1156,7 +1156,7 @@ contains
11561156

11571157
end subroutine s_qbmm_extrapolation
11581158

1159-
subroutine s_populate_capillary_buffers(c_divs, bc_type)
1159+
impure subroutine s_populate_capillary_buffers(c_divs, bc_type)
11601160

11611161
type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs
11621162
type(integer_field), dimension(1:num_dims, -1:1), intent(in) :: bc_type
@@ -1279,7 +1279,7 @@ contains
12791279
end if
12801280
end subroutine s_populate_capillary_buffers
12811281

1282-
subroutine s_color_function_periodic(c_divs, bc_dir, bc_loc, k, l)
1282+
pure subroutine s_color_function_periodic(c_divs, bc_dir, bc_loc, k, l)
12831283
#ifdef _CRAYFTN
12841284
!DIR$ INLINEALWAYS s_color_function_periodic
12851285
#else
@@ -1337,7 +1337,7 @@ contains
13371337

13381338
end subroutine s_color_function_periodic
13391339

1340-
subroutine s_color_function_reflective(c_divs, bc_dir, bc_loc, k, l)
1340+
pure subroutine s_color_function_reflective(c_divs, bc_dir, bc_loc, k, l)
13411341
#ifdef _CRAYFTN
13421342
!DIR$ INLINEALWAYS s_color_function_reflective
13431343
#else
@@ -1419,7 +1419,7 @@ contains
14191419

14201420
end subroutine s_color_function_reflective
14211421

1422-
subroutine s_color_function_ghost_cell_extrapolation(c_divs, bc_dir, bc_loc, k, l)
1422+
pure subroutine s_color_function_ghost_cell_extrapolation(c_divs, bc_dir, bc_loc, k, l)
14231423
#ifdef _CRAYFTN
14241424
!DIR$ INLINEALWAYS s_color_function_ghost_cell_extrapolation
14251425
#else
@@ -1477,7 +1477,7 @@ contains
14771477

14781478
end subroutine s_color_function_ghost_cell_extrapolation
14791479

1480-
subroutine s_create_mpi_types(bc_type)
1480+
impure subroutine s_create_mpi_types(bc_type)
14811481

14821482
type(integer_field), dimension(1:num_dims, -1:1) :: bc_type
14831483

@@ -1510,7 +1510,7 @@ contains
15101510
#endif
15111511
end subroutine s_create_mpi_types
15121512

1513-
subroutine s_finalize_boundary_common_module()
1513+
impure subroutine s_finalize_boundary_common_module()
15141514

15151515
#ifndef MFC_POST_PROCESS
15161516
if (bc_io) then

0 commit comments

Comments
 (0)