MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
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)
 Advance the model.
subroutine model_solve (this, isuppress_output)
 Solve the model.
subroutine model_cq (this, icnvg, isuppress_output)
 Calculate model flows.
subroutine model_bd (this, icnvg, isuppress_output)
 Calculate model budget.
subroutine model_da (this)
 Deallocate the model.
subroutine allocate_scalars (this, modelname)
 Allocate scalar variables.
subroutine allocate_arrays (this)
 Allocate array variables.
class(explicitmodeltype) function, pointer, public castasexplicitmodelclass (obj)
 Cast a generic object into an explicit model.
subroutine, public addexplicitmodeltolist (list, model)
 Add explicit model to a generic list.
class(explicitmodeltype) function, pointer, public getexplicitmodelfromlist (list, idx)
 Get generic object from list and return as explicit model.
subroutine set_idsoln (this, id)
 Set the solution ID.
logical function has_pending (this)
 Whether the model has any pending work.

Function/Subroutine Documentation

◆ addexplicitmodeltolist()

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

Definition at line 132 of file ExplicitModel.f90.

133 ! dummy
134 type(ListType), intent(inout) :: list
135 class(ExplicitModelType), pointer, intent(inout) :: model
136 ! local
137 class(*), pointer :: obj
138
139 obj => model
140 call list%Add(obj)
Here is the caller graph for this function:

◆ allocate_arrays()

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

Definition at line 99 of file ExplicitModel.f90.

100 class(ExplicitModelType) :: this
101 integer(I4B) :: i
102
103 call mem_allocate(this%nja, 'NJA', this%memoryPath)
104 this%nja = this%dis%nja
105
106 call mem_allocate(this%ibound, this%dis%nodes, 'IBOUND', this%memoryPath)
107 do i = 1, this%dis%nodes
108 this%ibound(i) = 1 ! active by default
109 end do
110
111 call mem_allocate(this%flowja, this%nja, 'FLOWJA', this%memoryPath)
112 do i = 1, this%nja
113 this%flowja(i) = dzero
114 end do

◆ allocate_scalars()

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

Definition at line 88 of file ExplicitModel.f90.

89 class(ExplicitModelType) :: this
90 character(len=*), intent(in) :: modelname
91
92 call this%BaseModelType%allocate_scalars(modelname)
93 allocate (this%bndlist)
94 allocate (this%filename)
95 this%filename = ''

◆ castasexplicitmodelclass()

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

Definition at line 118 of file ExplicitModel.f90.

119 class(*), pointer, intent(inout) :: obj
120 class(ExplicitModelType), pointer :: res
121
122 res => null()
123 if (.not. associated(obj)) return
124
125 select type (obj)
126 class is (explicitmodeltype)
127 res => obj
128 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 144 of file ExplicitModel.f90.

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

◆ has_pending()

logical function explicitmodelmodule::has_pending ( class(explicitmodeltype), intent(in) this)
private

Definition at line 164 of file ExplicitModel.f90.

165 class(ExplicitModelType), intent(in) :: this
166 has_pending = .false.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ model_ad()

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

Definition at line 39 of file ExplicitModel.f90.

40 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 57 of file ExplicitModel.f90.

58 class(ExplicitModelType) :: this
59 integer(I4B), intent(in) :: icnvg
60 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 50 of file ExplicitModel.f90.

51 class(ExplicitModelType) :: this
52 integer(I4B), intent(in) :: icnvg
53 integer(I4B), intent(in) :: isuppress_output

◆ model_da()

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

Definition at line 64 of file ExplicitModel.f90.

65 class(ExplicitModelType) :: this
66
67 ! deallocate scalars
68 deallocate (this%filename)
69 call mem_deallocate(this%nja)
70
71 ! deallocate arrays
72 call mem_deallocate(this%ibound)
73 call mem_deallocate(this%flowja, 'FLOWJA', this%memoryPath)
74
75 ! nullify pointers
76 if (associated(this%ibound)) &
77 call mem_deallocate(this%ibound, 'IBOUND', this%memoryPath)
78
79 ! deallocate derived types
80 call this%bndlist%Clear()
81 deallocate (this%bndlist)
82
83 ! deallocate base type
84 call this%BaseModelType%model_da()

◆ model_solve()

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

Definition at line 44 of file ExplicitModel.f90.

45 class(ExplicitModelType) :: this
46 integer(I4B), intent(in) :: isuppress_output

◆ set_idsoln()

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

Definition at line 157 of file ExplicitModel.f90.

158 class(ExplicitModelType) :: this
159 integer(I4B), intent(in) :: id
160 this%idsoln = id