Skip to content

Commit

Permalink
Squashed 'src/phast/PhreeqcRM/' changes from ad80557e..cdec3e04
Browse files Browse the repository at this point in the history
cdec3e04 Merge commit 'e6f26f763f2a9f972969ff59a8325e6474201d34'
e6f26f76 Squashed 'src/' changes from 5b3b2308..b738c1e5
b078faca Merge pull request #179 from dlparkhurst/module
aedff253 Merge branch 'master' into module
95f8d016 Fix for debug checking with multiple PhreeqcRM instances

git-subtree-dir: src/phast/PhreeqcRM
git-subtree-split: cdec3e041cb0c7fdf718d2f2f10ada454b20b381
  • Loading branch information
Darth Vader committed Nov 19, 2024
1 parent 5d08e4a commit 8a3173a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/RM_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ SUBROUTINE Chk_CreateMapping(id, grid2chem)
INTEGER, INTENT(in), DIMENSION(:) :: grid2chem
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Integer1D(id, grid2chem, rmf_nxyz, "Grid2chem mapping", "RM_Createmapping")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument(s) in RM_Createmapping")
Expand Down Expand Up @@ -1639,6 +1640,7 @@ SUBROUTINE Chk_GetGasCompMoles(id, gas_moles)
INTEGER :: errors, rmf_ngas_comps
errors = 0
rmf_ngas_comps = RM_GetGasComponentsCount(id)
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double2D(id, gas_moles, rmf_nxyz, rmf_ngas_comps, "gas_moles", "RM_GetGasCompMoles")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument(s) in RM_GetGasCompMoles")
Expand Down Expand Up @@ -4429,6 +4431,7 @@ SUBROUTINE Chk_InitialPhreeqc2Module(id, ic1, ic2, f1)
real(kind=8), INTENT(IN), DIMENSION(:,:) , OPTIONAL :: f1
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Integer2D(id, ic1, rmf_nxyz, 7, "ic1", "RM_InitialPhreeqc2Module")
if (present(ic2)) then
errors = errors + Chk_Integer2D(id, ic2, rmf_nxyz, 7, "ic2", "RM_InitialPhreeqc2Module")
Expand Down Expand Up @@ -5528,6 +5531,7 @@ END FUNCTION RMF_GetComponentCount
INTEGER :: errors
errors = 0
rmf_ncomps = RMF_GetComponentCount(id)
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double2D(id, c, rmf_nxyz, rmf_ncomps, "concentration", "RM_SetConcentrations")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetConcentrations")
Expand Down Expand Up @@ -5664,6 +5668,7 @@ SUBROUTINE Chk_SetDensityUser(id, density)
real(kind=8), INTENT(in), DIMENSION(:) :: density
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double1D(id, density, rmf_nxyz, "density", "RM_SetDensityUser")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetDensityUser")
Expand Down Expand Up @@ -5870,6 +5875,7 @@ SUBROUTINE Chk_SetGasCompMoles(id, gas_moles)
INTEGER :: errors, rmf_ngas_comps
errors = 0
rmf_ngas_comps = RM_GetGasComponentsCount(id)
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double2D(id, gas_moles, rmf_nxyz, rmf_ngas_comps, "gas moles", "RM_SetGasCompMoles")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetGasCompMoles")
Expand Down Expand Up @@ -5933,6 +5939,7 @@ SUBROUTINE Chk_SetGasPhaseVolume(id, gas_volume)
INTEGER :: errors, rmf_ngas_comps
errors = 0
rmf_ngas_comps = RM_GetGasComponentsCount(id)
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double1D(id, gas_volume, rmf_nxyz, "gas volume", "RM_SetGasPhaseVolume")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetGasPhaseVolume")
Expand Down Expand Up @@ -6303,6 +6310,7 @@ SUBROUTINE Chk_SetPorosity(id, por)
real(kind=8), INTENT(in), DIMENSION(:) :: por
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double1D(id, por, rmf_nxyz, "porosity", "RM_SetPorosity")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetPorosity")
Expand Down Expand Up @@ -6354,6 +6362,7 @@ SUBROUTINE Chk_SetPressure(id, p)
real(kind=8), INTENT(in), DIMENSION(:) :: p
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double1D(id, p, rmf_nxyz, "pressure", "RM_SetPressure")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetPressure")
Expand Down Expand Up @@ -6410,6 +6419,7 @@ SUBROUTINE Chk_SetPrintChemistryMask(id, cell_mask)
INTEGER, INTENT(in), DIMENSION(:) :: cell_mask
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Integer1D(id, cell_mask, rmf_nxyz, "cell_mask", "RM_SetPrintChemistryMask")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetPrintChemistryMask")
Expand Down Expand Up @@ -6665,6 +6675,7 @@ SUBROUTINE Chk_SetSaturationUser(id, sat)
real(kind=8), INTENT(in), DIMENSION(:) :: sat
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double1D(id, sat, rmf_nxyz, "sataturation", "RM_SetSaturationUser")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetSaturationUser")
Expand Down Expand Up @@ -6850,6 +6861,7 @@ SUBROUTINE Chk_SetTemperature(id, t)
real(kind=8), INTENT(in), DIMENSION(:) :: t
INTEGER :: errors
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double1D(id, t, rmf_nxyz, "temperature", "RM_SetTemperature")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SetTemperature")
Expand Down Expand Up @@ -7435,6 +7447,7 @@ SUBROUTINE Chk_SpeciesConcentrations2Module(id, species_conc)
INTEGER :: errors, nspecies
nspecies = RM_GetSpeciesCount(id)
errors = 0
rmf_nxyz = RM_GetGridCellCount(id)
errors = errors + Chk_Double2D(id, species_conc, rmf_nxyz, nspecies, "species_conc", "RM_SpeciesConcentrations2Module")
if (errors .gt. 0) then
errors = RM_Abort(id, -3, "Invalid argument in RM_SpeciesConcentrations2Module")
Expand Down

0 comments on commit 8a3173a

Please sign in to comment.