161 class(PrtFmiType) :: this
163 integer(I4B) :: j, i, ip, ib
164 integer(I4B) :: ioffset, iflowface, iauxiflowface
166 character(len=LENAUXNAME) :: auxname
169 this%StorageFlows = dzero
170 if (this%igwfstrgss /= 0) &
171 this%StorageFlows = this%StorageFlows + &
173 if (this%igwfstrgsy /= 0) &
174 this%StorageFlows = this%StorageFlows + &
177 this%SourceFlows = dzero
178 this%SinkFlows = dzero
179 this%BoundaryFlows = dzero
180 do ip = 1, this%nflowpack
182 naux = this%gwfpackages(ip)%naux
185 auxname = this%gwfpackages(ip)%auxname(j)
186 if (trim(adjustl(auxname)) ==
"IFLOWFACE")
then
192 do ib = 1, this%gwfpackages(ip)%nbound
193 i = this%gwfpackages(ip)%nodelist(ib)
195 if (this%ibound(i) <= 0) cycle
196 qbnd = this%gwfpackages(ip)%get_flow(ib)
199 if (iauxiflowface > 0)
then
200 iflowface = nint(this%gwfpackages(ip)%auxvar(iauxiflowface, ib))
202 if (iflowface < 0) iflowface = iflowface + max_poly_cells + 1
204 if (iflowface .gt. 0)
then
205 ioffset = (i - 1) * max_poly_cells
206 this%BoundaryFlows(ioffset + iflowface) = &
207 this%BoundaryFlows(ioffset + iflowface) + qbnd
208 else if (qbnd .gt. dzero)
then
209 this%SourceFlows(i) = this%SourceFlows(i) + qbnd
210 else if (qbnd .lt. dzero)
then
211 this%SinkFlows(i) = this%SinkFlows(i) + qbnd