Skip to content

Commit 7a73fe3

Browse files
committed
remove some more riemann pointers
1 parent 2c53a90 commit 7a73fe3

File tree

3 files changed

+12
-147
lines changed

3 files changed

+12
-147
lines changed

src/common/m_variables_conversion.fpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ module m_variables_conversion
2121
implicit none
2222

2323
private; public :: s_initialize_variables_conversion_module, &
24-
s_convert_to_mixture_variables, &
25-
s_convert_species_to_mixture_variables, &
26-
s_convert_species_to_mixture_variables_acc, &
27-
s_convert_conservative_to_primitive_variables, &
28-
s_convert_primitive_to_conservative_variables, &
29-
s_convert_primitive_to_flux_variables, &
30-
s_compute_pressure, &
31-
s_finalize_variables_conversion_module
24+
s_convert_to_mixture_variables, &
25+
s_convert_species_to_mixture_variables, &
26+
s_convert_species_to_mixture_variables_acc, &
27+
s_convert_conservative_to_primitive_variables, &
28+
s_convert_primitive_to_conservative_variables, &
29+
s_convert_primitive_to_flux_variables, &
30+
s_compute_pressure, &
31+
s_finalize_variables_conversion_module
3232

3333
!> Abstract interface to two subroutines designed for the transfer/conversion
3434
!! of the mixture/species variables to the mixture variables

src/simulation/m_rhs.fpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,9 @@ contains
452452
end if
453453

454454

455-
! Associating procedural pointer to the subroutine that will be
456-
! utilized to calculate the solution of a given Riemann problem
457-
s_riemann_solver => s_hllc_riemann_solver
458-
459455
! Associating the procedural pointer to the appropriate subroutine
460456
! that will be utilized in the conversion to the mixture variables
461-
s_convert_to_mixture_variables => &
462-
s_convert_species_to_mixture_variables
457+
s_convert_to_mixture_variables => s_convert_species_to_mixture_variables
463458

464459
end subroutine s_initialize_rhs_module ! -------------------------------
465460

@@ -609,7 +604,7 @@ contains
609604

610605
! Computing Riemann Solver Flux and Source Flux =================
611606

612-
call s_riemann_solver(qR_rsx_vf, qR_rsy_vf, &
607+
call s_hllc_riemann_solver(qR_rsx_vf, qR_rsy_vf, &
613608
dqR_prim_dx_n(id)%vf, &
614609
dqR_prim_dy_n(id)%vf, &
615610
qR_prim(id)%vf, &
@@ -1140,7 +1135,6 @@ contains
11401135

11411136
@:DEALLOCATE(flux_n, flux_src_n)
11421137

1143-
s_riemann_solver => null()
11441138
s_convert_to_mixture_variables => null()
11451139

11461140
end subroutine s_finalize_rhs_module ! ---------------------------------

src/simulation/m_riemann_solvers.fpp

Lines changed: 2 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -18,107 +18,9 @@ module m_riemann_solvers
1818
implicit none
1919

2020
private; public :: s_initialize_riemann_solvers_module, &
21-
s_riemann_solver, &
2221
s_hllc_riemann_solver, &
2322
s_finalize_riemann_solvers_module
2423

25-
abstract interface ! =======================================================
26-
27-
!> Abstract interface to the subroutines that are utilized to compute the
28-
!! Riemann problem solution. For additional information please reference:
29-
!! 1) s_hll_riemann_solver
30-
!! 2) s_hllc_riemann_solver
31-
!! 3) s_exact_riemann_solver
32-
!! @param qL_prim_vf The left WENO-reconstructed cell-boundary values of the
33-
!! cell-average primitive variables
34-
!! @param qR_prim_vf The right WENO-reconstructed cell-boundary values of the
35-
!! cell-average primitive variables
36-
!! @param dqL_prim_dx_vf The left WENO-reconstructed cell-boundary values of the
37-
!! first-order x-dir spatial derivatives
38-
!! @param dqL_prim_dy_vf The left WENO-reconstructed cell-boundary values of the
39-
!! first-order y-dir spatial derivatives
40-
!! @param dqR_prim_dx_vf The right WENO-reconstructed cell-boundary values of the
41-
!! first-order x-dir spatial derivatives
42-
!! @param dqR_prim_dy_vf The right WENO-reconstructed cell-boundary values of the
43-
!! first-order y-dir spatial derivatives
44-
!! @param gm_alphaL_vf Left averaged gradient magnitude
45-
!! @param gm_alphaR_vf Right averaged gradient magnitude
46-
!! @param flux_vf Intra-cell fluxes
47-
!! @param flux_src_vf Intra-cell fluxes sources
48-
!! @param norm_dir Dir. splitting direction
49-
!! @param ix Index bounds in the x-dir
50-
!! @param iy Index bounds in the y-dir
51-
!! @param q_prim_vf Cell-averaged primitive variables
52-
subroutine s_abstract_riemann_solver(qL_prim_rsx_vf, qL_prim_rsy_vf, dqL_prim_dx_vf, &
53-
dqL_prim_dy_vf, &
54-
qL_prim_vf, &
55-
qR_prim_rsx_vf, qR_prim_rsy_vf, dqR_prim_dx_vf, &
56-
dqR_prim_dy_vf, &
57-
qR_prim_vf, &
58-
q_prim_vf, &
59-
flux_vf, flux_src_vf, &
60-
norm_dir, ix, iy)
61-
62-
import :: scalar_field, int_bounds_info, sys_size, startx, starty
63-
64-
real(kind(0d0)), dimension(startx:, starty:, 1:), intent(INOUT) :: qL_prim_rsx_vf, qL_prim_rsy_vf, qR_prim_rsx_vf, qR_prim_rsy_vf
65-
type(scalar_field), dimension(sys_size), intent(IN) :: q_prim_vf
66-
67-
type(scalar_field), allocatable, dimension(:), intent(INOUT) :: qL_prim_vf, qR_prim_vf
68-
69-
type(scalar_field), &
70-
allocatable, dimension(:), &
71-
intent(INOUT) :: dqL_prim_dx_vf, dqR_prim_dx_vf, &
72-
dqL_prim_dy_vf, dqR_prim_dy_vf
73-
74-
type(scalar_field), &
75-
dimension(sys_size), &
76-
intent(INOUT) :: flux_vf, flux_src_vf
77-
78-
integer, intent(IN) :: norm_dir
79-
80-
type(int_bounds_info), intent(IN) :: ix, iy
81-
82-
end subroutine s_abstract_riemann_solver
83-
84-
85-
!> The abstract interface to the subroutines that are utilized to compute
86-
!! the viscous source fluxes for either Cartesian or cylindrical geometries.
87-
!! For more information please refer to:
88-
!! 1) s_compute_cartesian_viscous_source_flux
89-
!! 2) s_compute_cylindrical_viscous_source_flux
90-
subroutine s_compute_abstract_viscous_source_flux(velL_vf, & ! -------------
91-
dvelL_dx_vf, &
92-
dvelL_dy_vf, &
93-
velR_vf, &
94-
dvelR_dx_vf, &
95-
dvelR_dy_vf, &
96-
flux_src_vf, &
97-
norm_dir, &
98-
ix, iy)
99-
100-
import :: scalar_field, int_bounds_info, num_dims, sys_size
101-
102-
type(scalar_field), &
103-
dimension(num_dims), &
104-
intent(IN) :: velL_vf, velR_vf, &
105-
dvelL_dx_vf, dvelR_dx_vf, &
106-
dvelL_dy_vf, dvelR_dy_vf
107-
108-
type(scalar_field), &
109-
dimension(sys_size), &
110-
intent(INOUT) :: flux_src_vf
111-
112-
integer, intent(IN) :: norm_dir
113-
114-
type(int_bounds_info), intent(IN) :: ix, iy
115-
116-
end subroutine s_compute_abstract_viscous_source_flux
117-
118-
end interface ! ============================================================
119-
120-
121-
12224
!> The cell-boundary values of the fluxes (src - source) that are computed
12325
!! through the chosen Riemann problem solver, and the direct evaluation of
12426
!! source terms, by using the left and right states given in qK_prim_rs_vf,
@@ -202,17 +104,6 @@ module m_riemann_solvers
202104

203105
!$acc declare create(s_L, s_R, s_S, s_M, s_P, xi_M, xi_P, xi_L, xi_R)
204106

205-
procedure(s_abstract_riemann_solver), &
206-
pointer :: s_riemann_solver => null() !<
207-
!! Pointer to the procedure that is utilized to calculate either the HLL,
208-
!! HLLC or exact intercell fluxes, based on the choice of Riemann solver
209-
210-
211-
procedure(s_compute_abstract_viscous_source_flux), &
212-
pointer :: s_compute_viscous_source_flux => null() !<
213-
!! Pointer to the subroutine that is utilized to compute the viscous source
214-
!! flux for either Cartesian or cylindrical geometries.
215-
216107
!> @name Indical bounds in the s1-, s2- and s3-directions
217108
!> @{
218109
type(int_bounds_info) :: is1, is2
@@ -563,17 +454,6 @@ contains
563454
!$acc update device(Res, Re_idx, Re_size)
564455
end if
565456

566-
! Associating procedural pointer to the subroutine that will be
567-
! utilized to calculate the solution of a given Riemann problem
568-
s_riemann_solver => s_hllc_riemann_solver
569-
570-
! Associating the procedural pointers to the procedures that will be
571-
! utilized to compute the average state and estimate the wave speeds
572-
573-
! Associating procedural pointer to the subroutine that will be
574-
! utilized to compute the viscous source flux
575-
s_compute_viscous_source_flux => s_compute_cartesian_viscous_source_flux
576-
577457
! Associating the procedural pointer to the appropriate subroutine
578458
! that will be utilized in the conversion to the mixture variables
579459
s_convert_to_mixture_variables => s_convert_species_to_mixture_variables
@@ -901,7 +781,7 @@ contains
901781
!! @param norm_dir Dimensional splitting coordinate direction
902782
!! @param ix Index bounds in first coordinate direction
903783
!! @param iy Index bounds in second coordinate direction
904-
subroutine s_compute_cartesian_viscous_source_flux(velL_vf, & ! -------------
784+
subroutine s_compute_viscous_source_flux(velL_vf, & ! -------------
905785
dvelL_dx_vf, &
906786
dvelL_dy_vf, &
907787
velR_vf, &
@@ -1126,7 +1006,7 @@ contains
11261006
end if
11271007
end if
11281008

1129-
end subroutine s_compute_cartesian_viscous_source_flux ! -------------------------
1009+
end subroutine s_compute_viscous_source_flux ! -------------------------
11301010

11311011
!> Deallocation and/or disassociation procedures that are
11321012
!! needed to finalize the selected Riemann problem solver
@@ -1202,15 +1082,6 @@ contains
12021082

12031083
integer :: i
12041084

1205-
1206-
! Disassociating procedural pointer to the subroutine which was
1207-
! utilized to calculate the solution of a given Riemann problem
1208-
s_riemann_solver => null()
1209-
1210-
! Disassociating procedural pointer to the subroutine which was
1211-
! utilized to calculate the viscous source flux
1212-
s_compute_viscous_source_flux => null()
1213-
12141085
! Disassociating the pointer to the procedure that was utilized to
12151086
! to convert mixture or species variables to the mixture variables
12161087
s_convert_to_mixture_variables => null()

0 commit comments

Comments
 (0)