MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
explicitmodelmodule Module Reference

Models that solve themselves.

Data Types

type  explicitmodeltype
 Base type for models that solve themselves. More...
 

Functions/Subroutines

subroutine model_ad (this)
 @ brief Advance the model More...
 
subroutine model_solve (this)
 @ brief Solve the model More...
 
subroutine model_cq (this, icnvg, isuppress_output)
 @ brief Calculate model flows More...
 
subroutine model_bd (this, icnvg, isuppress_output)
 @ brief Calculate model budget More...
 
subroutine model_da (this)
 @ brief Deallocate the model More...
 
subroutine allocate_scalars (this, modelname)
 @ brief Allocate scalar variables More...
 
subroutine allocate_arrays (this)
 Allocate array variables. More...
 
class(explicitmodeltype) function, pointer, public castasexplicitmodelclass (obj)
 @ brief Cast a generic object into an explicit model More...
 
subroutine, public addexplicitmodeltolist (list, model)
 @ brief Add explicit model to a generic list More...
 
class(explicitmodeltype) function, pointer, public getexplicitmodelfromlist (list, idx)
 @ brief Get generic object from list and return as explicit model More...
 
subroutine set_idsoln (this, id)
 Set the solution ID. More...
 

Function/Subroutine Documentation

◆ addexplicitmodeltolist()

subroutine, public explicitmodelmodule::addexplicitmodeltolist ( type(listtype), intent(inout)  list,
class(explicitmodeltype), intent(inout), pointer  model 
)

Definition at line 135 of file ExplicitModel.f90.

136  ! -- dummy
137  type(ListType), intent(inout) :: list
138  class(ExplicitModelType), pointer, intent(inout) :: model
139  ! -- local
140  class(*), pointer :: obj
141 
142  obj => model
143  call list%Add(obj)

◆ allocate_arrays()

subroutine explicitmodelmodule::allocate_arrays ( class(explicitmodeltype this)
private

Definition at line 108 of file ExplicitModel.f90.

109  class(ExplicitModelType) :: this
110  integer(I4B) :: i
111 
112  call mem_allocate(this%ibound, this%dis%nodes, 'IBOUND', this%memoryPath)
113  do i = 1, this%dis%nodes
114  this%ibound(i) = 1 ! active by default
115  end do

◆ allocate_scalars()

subroutine explicitmodelmodule::allocate_scalars ( class(explicitmodeltype this,
character(len=*), intent(in)  modelname 
)
private

Definition at line 96 of file ExplicitModel.f90.

97  class(ExplicitModelType) :: this
98  character(len=*), intent(in) :: modelname
99 
100  call this%BaseModelType%allocate_scalars(modelname)
101  allocate (this%bndlist)
102  allocate (this%filename)
103  this%filename = ''

◆ castasexplicitmodelclass()

class(explicitmodeltype) function, pointer, public explicitmodelmodule::castasexplicitmodelclass ( class(*), intent(inout), pointer  obj)

Definition at line 120 of file ExplicitModel.f90.

121  class(*), pointer, intent(inout) :: obj
122  class(ExplicitModelType), pointer :: res
123 
124  res => null()
125  if (.not. associated(obj)) return
126 
127  select type (obj)
128  class is (explicitmodeltype)
129  res => obj
130  end select
Here is the caller graph for this function:

◆ getexplicitmodelfromlist()

class(explicitmodeltype) function, pointer, public explicitmodelmodule::getexplicitmodelfromlist ( type(listtype), intent(inout)  list,
integer(i4b), intent(in)  idx 
)

Definition at line 148 of file ExplicitModel.f90.

149  ! -- dummy
150  type(ListType), intent(inout) :: list
151  integer(I4B), intent(in) :: idx
152  class(ExplicitModelType), pointer :: res
153  ! -- local
154  class(*), pointer :: obj
155 
156  obj => list%GetItem(idx)
157  res => castasexplicitmodelclass(obj)
Here is the call graph for this function:

◆ model_ad()

subroutine explicitmodelmodule::model_ad ( class(explicitmodeltype this)
private

Definition at line 45 of file ExplicitModel.f90.

46  class(ExplicitModelType) :: this

◆ model_bd()

subroutine explicitmodelmodule::model_bd ( class(explicitmodeltype this,
integer(i4b), intent(in)  icnvg,
integer(i4b), intent(in)  isuppress_output 
)
private

Definition at line 65 of file ExplicitModel.f90.

66  class(ExplicitModelType) :: this
67  integer(I4B), intent(in) :: icnvg
68  integer(I4B), intent(in) :: isuppress_output

◆ model_cq()

subroutine explicitmodelmodule::model_cq ( class(explicitmodeltype this,
integer(i4b), intent(in)  icnvg,
integer(i4b), intent(in)  isuppress_output 
)
private

Definition at line 57 of file ExplicitModel.f90.

58  class(ExplicitModelType) :: this
59  integer(I4B), intent(in) :: icnvg
60  integer(I4B), intent(in) :: isuppress_output

◆ model_da()

subroutine explicitmodelmodule::model_da ( class(explicitmodeltype this)
private

Definition at line 73 of file ExplicitModel.f90.

74  class(ExplicitModelType) :: this
75 
76  ! -- deallocate scalars
77  deallocate (this%filename)
78 
79  ! -- deallocate arrays
80  call mem_deallocate(this%ibound)
81 
82  ! -- nullify pointers
83  if (associated(this%ibound)) &
84  call mem_deallocate(this%ibound, 'IBOUND', this%memoryPath)
85 
86  ! -- member derived types
87  call this%bndlist%Clear()
88  deallocate (this%bndlist)
89 
90  ! -- deallocate base type
91  call this%BaseModelType%model_da()

◆ model_solve()

subroutine explicitmodelmodule::model_solve ( class(explicitmodeltype this)
private

Definition at line 51 of file ExplicitModel.f90.

52  class(ExplicitModelType) :: this

◆ set_idsoln()

subroutine explicitmodelmodule::set_idsoln ( class(explicitmodeltype this,
integer(i4b), intent(in)  id 
)
private

Definition at line 162 of file ExplicitModel.f90.

163  class(ExplicitModelType) :: this
164  integer(I4B), intent(in) :: id
165  this%idsoln = id