Skip to content

Commit

Permalink
refactor(tsp): Elevate APT to generalized transport class
Browse files Browse the repository at this point in the history
  • Loading branch information
emorway-usgs committed Nov 6, 2023
1 parent e125e2f commit 58ba334
Show file tree
Hide file tree
Showing 8 changed files with 520 additions and 603 deletions.
4 changes: 2 additions & 2 deletions make/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ${SOURCEDIR28} \
${SOURCEDIR29} \
${SOURCEDIR30} \
${SOURCEDIR31} \
$(SOURCEDIR32)
${SOURCEDIR32}

.SUFFIXES: .f90 .F90 .o

Expand Down Expand Up @@ -236,7 +236,7 @@ $(OBJDIR)/gwf3disv8.o \
$(OBJDIR)/gwf3disu8.o \
$(OBJDIR)/gwf3dis8.o \
$(OBJDIR)/gwf3uzf8.o \
$(OBJDIR)/gwt1apt1.o \
$(OBJDIR)/tsp1apt1.o \
$(OBJDIR)/gwt1mst1.o \
$(OBJDIR)/GwtDspOptions.o \
$(OBJDIR)/gwf3npf8.o \
Expand Down
2 changes: 1 addition & 1 deletion msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3wel8idm.f90"/></Filter>
<Filter Name="GroundWaterTransport">
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1apt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1cnc1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1cnc1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1dis1idm.f90"/>
Expand Down Expand Up @@ -204,6 +203,7 @@
<Filter Name="TransportModel">
<File RelativePath="..\src\Model\TransportModel\tsp1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1adv1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1apt1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1fmi1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1ic1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1mvt1.f90"/>
Expand Down
18 changes: 9 additions & 9 deletions src/Model/GroundWaterTransport/gwt1lkt1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module GwtLktModule
use TspFmiModule, only: TspFmiType
use LakModule, only: LakType
use ObserveModule, only: ObserveType
use GwtAptModule, only: GwtAptType, apt_process_obsID, &
use TspAptModule, only: TspAptType, apt_process_obsID, &
apt_process_obsID12
use MatrixBaseModule

Expand All @@ -52,7 +52,7 @@ module GwtLktModule
character(len=*), parameter :: flowtype = 'LAK'
character(len=16) :: text = ' LKT'

type, extends(GwtAptType) :: GwtLktType
type, extends(TspAptType) :: GwtLktType

integer(I4B), pointer :: idxbudrain => null() ! index of rainfall terms in flowbudptr
integer(I4B), pointer :: idxbudevap => null() ! index of evaporation terms in flowbudptr
Expand Down Expand Up @@ -272,7 +272,7 @@ end subroutine find_lkt_package

subroutine lkt_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
! ******************************************************************************
! lkt_fc_expanded -- this will be called from GwtAptType%apt_fc_expanded()
! lkt_fc_expanded -- this will be called from TspAptType%apt_fc_expanded()
! in order to add matrix terms specifically for LKT
! ****************************************************************************
!
Expand Down Expand Up @@ -653,8 +653,8 @@ subroutine allocate_scalars(this)
! -- local
! ------------------------------------------------------------------------------
!
! -- allocate scalars in GwtAptType
call this%GwtAptType%allocate_scalars()
! -- allocate scalars in TspAptType
call this%TspAptType%allocate_scalars()
!
! -- Allocate
call mem_allocate(this%idxbudrain, 'IDXBUDRAIN', this%memoryPath)
Expand Down Expand Up @@ -697,8 +697,8 @@ subroutine lkt_allocate_arrays(this)
call mem_allocate(this%concroff, this%ncv, 'CONCROFF', this%memoryPath)
call mem_allocate(this%conciflw, this%ncv, 'CONCIFLW', this%memoryPath)
!
! -- call standard GwtApttype allocate arrays
call this%GwtAptType%apt_allocate_arrays()
! -- call standard TspAptType allocate arrays
call this%TspAptType%apt_allocate_arrays()
!
! -- Initialize
do n = 1, this%ncv
Expand Down Expand Up @@ -741,8 +741,8 @@ subroutine lkt_da(this)
call mem_deallocate(this%concroff)
call mem_deallocate(this%conciflw)
!
! -- deallocate scalars in GwtAptType
call this%GwtAptType%bnd_da()
! -- deallocate scalars in TspAptType
call this%TspAptType%bnd_da()
!
! -- Return
return
Expand Down
18 changes: 9 additions & 9 deletions src/Model/GroundWaterTransport/gwt1mwt1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module GwtMwtModule
use TspFmiModule, only: TspFmiType
use MawModule, only: MawType
use ObserveModule, only: ObserveType
use GwtAptModule, only: GwtAptType, apt_process_obsID, &
use TspAptModule, only: TspAptType, apt_process_obsID, &
apt_process_obsID12
use MatrixBaseModule

Expand All @@ -53,7 +53,7 @@ module GwtMwtModule
character(len=*), parameter :: flowtype = 'MAW'
character(len=16) :: text = ' MWT'

type, extends(GwtAptType) :: GwtMwtType
type, extends(TspAptType) :: GwtMwtType

integer(I4B), pointer :: idxbudrate => null() ! index of well rate terms in flowbudptr
integer(I4B), pointer :: idxbudfwrt => null() ! index of flowing well rate terms in flowbudptr
Expand Down Expand Up @@ -259,7 +259,7 @@ end subroutine find_mwt_package

subroutine mwt_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
! ******************************************************************************
! mwt_fc_expanded -- this will be called from GwtAptType%apt_fc_expanded()
! mwt_fc_expanded -- this will be called from TspAptType%apt_fc_expanded()
! in order to add matrix terms specifically for this package
! ****************************************************************************
!
Expand Down Expand Up @@ -577,8 +577,8 @@ subroutine allocate_scalars(this)
! -- local
! ------------------------------------------------------------------------------
!
! -- allocate scalars in GwtAptType
call this%GwtAptType%allocate_scalars()
! -- allocate scalars in TspAptType
call this%TspAptType%allocate_scalars()
!
! -- Allocate
call mem_allocate(this%idxbudrate, 'IDXBUDRATE', this%memoryPath)
Expand Down Expand Up @@ -614,8 +614,8 @@ subroutine mwt_allocate_arrays(this)
! -- time series
call mem_allocate(this%concrate, this%ncv, 'CONCRATE', this%memoryPath)
!
! -- call standard GwtApttype allocate arrays
call this%GwtAptType%apt_allocate_arrays()
! -- call standard TspAptType allocate arrays
call this%TspAptType%apt_allocate_arrays()
!
! -- Initialize
do n = 1, this%ncv
Expand Down Expand Up @@ -650,8 +650,8 @@ subroutine mwt_da(this)
! -- deallocate time series
call mem_deallocate(this%concrate)
!
! -- deallocate scalars in GwtAptType
call this%GwtAptType%bnd_da()
! -- deallocate scalars in TspAptType
call this%TspAptType%bnd_da()
!
! -- Return
return
Expand Down
18 changes: 9 additions & 9 deletions src/Model/GroundWaterTransport/gwt1sft1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module GwtSftModule
use TspFmiModule, only: TspFmiType
use SfrModule, only: SfrType
use ObserveModule, only: ObserveType
use GwtAptModule, only: GwtAptType, apt_process_obsID, &
use TspAptModule, only: TspAptType, apt_process_obsID, &
apt_process_obsID12
use MatrixBaseModule

Expand All @@ -51,7 +51,7 @@ module GwtSftModule
character(len=*), parameter :: flowtype = 'SFR'
character(len=16) :: text = ' SFT'

type, extends(GwtAptType) :: GwtSftType
type, extends(TspAptType) :: GwtSftType

integer(I4B), pointer :: idxbudrain => null() ! index of rainfall terms in flowbudptr
integer(I4B), pointer :: idxbudevap => null() ! index of evaporation terms in flowbudptr
Expand Down Expand Up @@ -266,7 +266,7 @@ end subroutine find_sft_package

subroutine sft_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
! ******************************************************************************
! sft_fc_expanded -- this will be called from GwtAptType%apt_fc_expanded()
! sft_fc_expanded -- this will be called from TspAptType%apt_fc_expanded()
! in order to add matrix terms specifically for SFT
! ****************************************************************************
!
Expand Down Expand Up @@ -605,8 +605,8 @@ subroutine allocate_scalars(this)
! -- local
! ------------------------------------------------------------------------------
!
! -- allocate scalars in GwtAptType
call this%GwtAptType%allocate_scalars()
! -- allocate scalars in TspAptType
call this%TspAptType%allocate_scalars()
!
! -- Allocate
call mem_allocate(this%idxbudrain, 'IDXBUDRAIN', this%memoryPath)
Expand Down Expand Up @@ -647,8 +647,8 @@ subroutine sft_allocate_arrays(this)
call mem_allocate(this%concroff, this%ncv, 'CONCROFF', this%memoryPath)
call mem_allocate(this%conciflw, this%ncv, 'CONCIFLW', this%memoryPath)
!
! -- call standard GwtApttype allocate arrays
call this%GwtAptType%apt_allocate_arrays()
! -- call standard TspAptType allocate arrays
call this%TspAptType%apt_allocate_arrays()
!
! -- Initialize
do n = 1, this%ncv
Expand Down Expand Up @@ -690,8 +690,8 @@ subroutine sft_da(this)
call mem_deallocate(this%concroff)
call mem_deallocate(this%conciflw)
!
! -- deallocate scalars in GwtAptType
call this%GwtAptType%bnd_da()
! -- deallocate scalars in TspAptType
call this%TspAptType%bnd_da()
!
! -- Return
return
Expand Down
18 changes: 9 additions & 9 deletions src/Model/GroundWaterTransport/gwt1uzt1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module GwtUztModule
use TspFmiModule, only: TspFmiType
use UzfModule, only: UzfType
use ObserveModule, only: ObserveType
use GwtAptModule, only: GwtAptType, apt_process_obsID, &
use TspAptModule, only: TspAptType, apt_process_obsID, &
apt_process_obsID12
use MatrixBaseModule
implicit none
Expand All @@ -44,7 +44,7 @@ module GwtUztModule
character(len=*), parameter :: flowtype = 'UZF'
character(len=16) :: text = ' UZT'

type, extends(GwtAptType) :: GwtUztType
type, extends(TspAptType) :: GwtUztType

integer(I4B), pointer :: idxbudinfl => null() ! index of uzf infiltration terms in flowbudptr
integer(I4B), pointer :: idxbudrinf => null() ! index of rejected infiltration terms in flowbudptr
Expand Down Expand Up @@ -251,7 +251,7 @@ end subroutine find_uzt_package

subroutine uzt_fc_expanded(this, rhs, ia, idxglo, matrix_sln)
! ******************************************************************************
! uzt_fc_expanded -- this will be called from GwtAptType%apt_fc_expanded()
! uzt_fc_expanded -- this will be called from TspAptType%apt_fc_expanded()
! in order to add matrix terms specifically for this package
! ****************************************************************************
!
Expand Down Expand Up @@ -570,8 +570,8 @@ subroutine allocate_scalars(this)
! -- local
! ------------------------------------------------------------------------------
!
! -- allocate scalars in GwtAptType
call this%GwtAptType%allocate_scalars()
! -- allocate scalars in TspAptType
call this%TspAptType%allocate_scalars()
!
! -- Allocate
call mem_allocate(this%idxbudinfl, 'IDXBUDINFL', this%memoryPath)
Expand Down Expand Up @@ -608,8 +608,8 @@ subroutine uzt_allocate_arrays(this)
call mem_allocate(this%concinfl, this%ncv, 'CONCINFL', this%memoryPath)
call mem_allocate(this%concuzet, this%ncv, 'CONCUZET', this%memoryPath)
!
! -- call standard GwtApttype allocate arrays
call this%GwtAptType%apt_allocate_arrays()
! -- call standard TspAptType allocate arrays
call this%TspAptType%apt_allocate_arrays()
!
! -- Initialize
do n = 1, this%ncv
Expand Down Expand Up @@ -646,8 +646,8 @@ subroutine uzt_da(this)
call mem_deallocate(this%concinfl)
call mem_deallocate(this%concuzet)
!
! -- deallocate scalars in GwtAptType
call this%GwtAptType%bnd_da()
! -- deallocate scalars in TspAptType
call this%TspAptType%bnd_da()
!
! -- Return
return
Expand Down
Loading

0 comments on commit 58ba334

Please sign in to comment.