Skip to content

Commit 07fd919

Browse files
authored
Fix #628: Fetch Pyro from upstream (#633)
1 parent 41357f9 commit 07fd919

File tree

5 files changed

+36
-23
lines changed

5 files changed

+36
-23
lines changed

src/common/m_thermochem.fpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
module m_thermochem
44

55
#:if chemistry
6-
use m_pyrometheus
7-
#:else
6+
use m_pyrometheus, only: &
7+
num_species, species_names, gas_constant, mol_weights, &
8+
get_temperature, get_net_production_rates, get_pressure, &
9+
get_mixture_molecular_weight, get_mixture_energy_mass, &
10+
get_temperature
11+
#:endif
12+
13+
implicit none
14+
15+
#:if not chemistry
816
integer, parameter :: num_species = 0
917
character(len=:), allocatable, dimension(:) :: species_names
1018
#:endif

src/post_process/m_global_parameters.fpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ module m_global_parameters
126126
integer :: pi_inf_idx !< Index of liquid stiffness func. eqn.
127127
type(int_bounds_info) :: stress_idx !< Indices of elastic stresses
128128
integer :: c_idx !< Index of color function
129-
type(int_bounds_info) :: chemistry_idx !< Indexes of first & last concentration eqns.
129+
type(int_bounds_info) :: species_idx !< Indexes of first & last concentration eqns.
130130
type(int_bounds_info) :: temperature_idx !< Indexes of first & last temperature eqns.
131131
!> @}
132132

@@ -611,13 +611,18 @@ contains
611611
end if
612612

613613
if (chemistry) then
614-
chemistry_idx%beg = sys_size + 1
615-
chemistry_idx%end = sys_size + num_species
616-
sys_size = chemistry_idx%end
614+
species_idx%beg = sys_size + 1
615+
species_idx%end = sys_size + num_species
616+
sys_size = species_idx%end
617617

618618
temperature_idx%beg = sys_size + 1
619619
temperature_idx%end = sys_size + 1
620620
sys_size = temperature_idx%end
621+
else
622+
species_idx%beg = 1
623+
species_idx%end = 1
624+
temperature_idx%beg = 1
625+
temperature_idx%end = 1
621626
end if
622627

623628
momxb = mom_idx%beg
@@ -632,8 +637,8 @@ contains
632637
strxe = stress_idx%end
633638
intxb = internalEnergies_idx%beg
634639
intxe = internalEnergies_idx%end
635-
chemxb = chemistry_idx%beg
636-
chemxe = chemistry_idx%end
640+
chemxb = species_idx%beg
641+
chemxe = species_idx%end
637642
tempxb = temperature_idx%beg
638643
tempxe = temperature_idx%end
639644

src/pre_process/m_global_parameters.fpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ module m_global_parameters
105105
integer :: pi_inf_idx !< Index of liquid stiffness func. eqn.
106106
type(int_bounds_info) :: stress_idx !< Indexes of elastic shear stress eqns.
107107
integer :: c_idx !< Index of the color function
108-
type(int_bounds_info) :: chemistry_idx !< Indexes of first & last concentration eqns.
108+
type(int_bounds_info) :: species_idx !< Indexes of first & last concentration eqns.
109109
type(int_bounds_info) :: temperature_idx !< Indexes of first & last temperature eqns.
110110

111111
type(int_bounds_info) :: bc_x, bc_y, bc_z !<
@@ -696,9 +696,9 @@ contains
696696
end if
697697

698698
if (chemistry) then
699-
chemistry_idx%beg = sys_size + 1
700-
chemistry_idx%end = sys_size + num_species
701-
sys_size = chemistry_idx%end
699+
species_idx%beg = sys_size + 1
700+
species_idx%end = sys_size + num_species
701+
sys_size = species_idx%end
702702

703703
temperature_idx%beg = sys_size + 1
704704
temperature_idx%end = sys_size + 1
@@ -717,8 +717,8 @@ contains
717717
strxe = stress_idx%end
718718
intxb = internalEnergies_idx%beg
719719
intxe = internalEnergies_idx%end
720-
chemxb = chemistry_idx%beg
721-
chemxe = chemistry_idx%end
720+
chemxb = species_idx%beg
721+
chemxe = species_idx%end
722722
tempxb = temperature_idx%beg
723723
tempxe = temperature_idx%end
724724

src/simulation/m_global_parameters.fpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ module m_global_parameters
232232
integer :: pi_inf_idx !< Index of liquid stiffness func. eqn.
233233
type(int_bounds_info) :: stress_idx !< Indexes of first and last shear stress eqns.
234234
integer :: c_idx ! Index of the color function
235-
type(int_bounds_info) :: chemistry_idx !< Indexes of first & last concentration eqns.
235+
type(int_bounds_info) :: species_idx !< Indexes of first & last concentration eqns.
236236
type(int_bounds_info) :: temperature_idx !< Indexes of first & last temperature eqns.
237237
!> @}
238238

@@ -286,7 +286,7 @@ module m_global_parameters
286286

287287
integer :: startx, starty, startz
288288

289-
!$acc declare create(sys_size, buff_size, startx, starty, startz, E_idx, gamma_idx, pi_inf_idx, alf_idx, n_idx, stress_idx, chemistry_idx)
289+
!$acc declare create(sys_size, buff_size, startx, starty, startz, E_idx, gamma_idx, pi_inf_idx, alf_idx, n_idx, stress_idx, species_idx)
290290

291291
! END: Simulation Algorithm Parameters =====================================
292292

@@ -1068,9 +1068,9 @@ contains
10681068
end if
10691069

10701070
if (chemistry) then
1071-
chemistry_idx%beg = sys_size + 1
1072-
chemistry_idx%end = sys_size + num_species
1073-
sys_size = chemistry_idx%end
1071+
species_idx%beg = sys_size + 1
1072+
species_idx%end = sys_size + num_species
1073+
sys_size = species_idx%end
10741074

10751075
temperature_idx%beg = sys_size + 1
10761076
temperature_idx%end = sys_size + 1
@@ -1089,13 +1089,13 @@ contains
10891089
strxe = stress_idx%end
10901090
intxb = internalEnergies_idx%beg
10911091
intxe = internalEnergies_idx%end
1092-
chemxb = chemistry_idx%beg
1093-
chemxe = chemistry_idx%end
1092+
chemxb = species_idx%beg
1093+
chemxe = species_idx%end
10941094
tempxb = temperature_idx%beg
10951095
tempxe = temperature_idx%end
10961096

10971097
!$acc update device(momxb, momxe, advxb, advxe, contxb, contxe, bubxb, bubxe, intxb, intxe, sys_size, buff_size, E_idx, alf_idx, n_idx, adv_n, adap_dt, pi_fac, strxb, strxe, chemxb, chemxe, tempxb, tempxe)
1098-
!$acc update device(chemistry_idx)
1098+
!$acc update device(species_idx)
10991099
!$acc update device(cfl_target, m, n, p)
11001100

11011101
!$acc update device(alt_soundspeed, acoustic_source, num_source)

toolchain/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ pandas
2525

2626
# Chemistry
2727
cantera
28-
pyrometheus @ git+https://github.com/henryleberre/pyrometheus.git@multi-lang-part-2
28+
pyrometheus @ git+https://github.com/pyrometheus/pyrometheus.git@mfc

0 commit comments

Comments
 (0)