256 class(DisConnExchangeType) :: this
257 integer(I4B),
intent(in) :: iout
259 integer(I4B),
dimension(:, :),
contiguous,
pointer :: cellidm1
260 integer(I4B),
dimension(:, :),
contiguous,
pointer :: cellidm2
261 integer(I4B),
dimension(:),
contiguous,
pointer :: ihc
262 real(DP),
dimension(:),
contiguous,
pointer :: cl1
263 real(DP),
dimension(:),
contiguous,
pointer :: cl2
264 real(DP),
dimension(:),
contiguous,
pointer :: hwva
265 real(DP),
dimension(:, :),
contiguous,
pointer :: auxvar
266 type(CharacterStringType),
dimension(:),
contiguous,
pointer :: boundname
267 integer(I4B) :: ndim1, ndim2
268 character(len=20) :: cellstr1, cellstr2
269 character(len=2) :: cnfloat
270 integer(I4B) :: nerr, iaux
271 integer(I4B) :: iexg, nodem1, nodem2
273 character(len=*),
parameter :: fmtexglabel =
"(1x, 3a10, 50(a16))"
274 character(len=*),
parameter :: fmtexgdata = &
275 "(5x, a, 1x, a ,I10, 50(1pg16.6))"
276 character(len=40) :: fmtexgdata2
278 call mem_setptr(cellidm1,
'CELLIDM1', this%input_mempath)
279 call mem_setptr(cellidm2,
'CELLIDM2', this%input_mempath)
280 call mem_setptr(ihc,
'IHC', this%input_mempath)
281 call mem_setptr(cl1,
'CL1', this%input_mempath)
282 call mem_setptr(cl2,
'CL2', this%input_mempath)
283 call mem_setptr(hwva,
'HWVA', this%input_mempath)
284 call mem_setptr(auxvar,
'AUXVAR', this%input_mempath)
285 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
286 ndim1 =
size(cellidm1, dim=1)
287 ndim2 =
size(cellidm2, dim=1)
289 write (iout,
'(1x,a)')
'PROCESSING EXCHANGEDATA'
291 if (this%iprpak /= 0)
then
292 if (this%inamedbound == 0)
then
293 write (iout, fmtexglabel)
'NODEM1',
'NODEM2',
'IHC', &
294 'CL1',
'CL2',
'HWVA', (adjustr(this%auxname(iaux)), &
297 write (iout, fmtexglabel)
'NODEM1',
'NODEM2',
'IHC',
'CL1',
'CL2', &
298 'HWVA', (adjustr(this%auxname(iaux)), iaux=1, this%naux), &
302 write (cnfloat,
'(i0)') 3 + this%naux
303 fmtexgdata2 =
'(5x, a, 1x, a, i10, '//trim(cnfloat)// &
308 do iexg = 1, this%nexg
310 if (
associated(this%model1))
then
313 nodem1 = this%noder(this%model1, cellidm1(:, iexg), iout)
314 this%nodem1(iexg) = nodem1
317 this%nodem1(iexg) = -1
320 if (
associated(this%model2))
then
323 nodem2 = this%noder(this%model2, cellidm2(:, iexg), iout)
324 this%nodem2(iexg) = nodem2
327 this%nodem2(iexg) = -1
331 this%ihc(iexg) = ihc(iexg)
332 this%cl1(iexg) = cl1(iexg)
333 this%cl2(iexg) = cl2(iexg)
334 this%hwva(iexg) = hwva(iexg)
335 do iaux = 1, this%naux
336 this%auxvar(iaux, iexg) = auxvar(iaux, iexg)
338 if (this%inamedbound == 1)
then
339 this%boundname(iexg) = boundname(iexg)
343 if (this%iprpak /= 0)
then
344 cellstr1 = this%cellstr(ndim1, cellidm1(:, iexg), iout)
345 cellstr2 = this%cellstr(ndim2, cellidm2(:, iexg), iout)
346 if (this%inamedbound == 0)
then
347 write (iout, fmtexgdata) trim(cellstr1), trim(cellstr2), &
348 this%ihc(iexg), this%cl1(iexg), this%cl2(iexg), &
350 (this%auxvar(iaux, iexg), iaux=1, this%naux)
352 write (iout, fmtexgdata2) trim(cellstr1), trim(cellstr2), &
353 this%ihc(iexg), this%cl1(iexg), this%cl2(iexg), &
355 (this%auxvar(iaux, iexg), iaux=1, this%naux), &
356 trim(this%boundname(iexg))
361 if (
associated(this%model1))
then
362 if (nodem1 <= 0)
then
363 cellstr1 = this%cellstr(ndim1, cellidm1(:, iexg), iout)
365 trim(adjustl(this%model1%name))// &
366 ' Cell is outside active grid domain ('// &
367 trim(adjustl(cellstr1))//
').'
368 call store_error(errmsg)
373 if (
associated(this%model2))
then
374 if (nodem2 <= 0)
then
375 cellstr2 = this%cellstr(ndim2, cellidm2(:, iexg), iout)
377 trim(adjustl(this%model2%name))// &
378 ' Cell is outside active grid domain ('// &
379 trim(adjustl(cellstr2))//
').'
380 call store_error(errmsg)
385 write (iout,
'(1x,a)')
'END OF EXCHANGEDATA'
388 nerr = count_errors()
390 call store_error(
'Errors encountered in exchange input file.')
391 call store_error_filename(this%filename)
subroutine, public memorystore_release(varname, memory_path)
Release a single variable from the memory store.