254 class(DisConnExchangeType) :: this
255 integer(I4B),
intent(in) :: iout
257 integer(I4B),
dimension(:, :),
contiguous,
pointer :: cellidm1
258 integer(I4B),
dimension(:, :),
contiguous,
pointer :: cellidm2
259 integer(I4B),
dimension(:),
contiguous,
pointer :: ihc
260 real(DP),
dimension(:),
contiguous,
pointer :: cl1
261 real(DP),
dimension(:),
contiguous,
pointer :: cl2
262 real(DP),
dimension(:),
contiguous,
pointer :: hwva
263 real(DP),
dimension(:, :),
contiguous,
pointer :: auxvar
264 type(CharacterStringType),
dimension(:),
contiguous,
pointer :: boundname
265 integer(I4B) :: ndim1, ndim2
266 character(len=20) :: cellstr1, cellstr2
267 character(len=2) :: cnfloat
268 integer(I4B) :: nerr, iaux
269 integer(I4B) :: iexg, nodem1, nodem2
271 character(len=*),
parameter :: fmtexglabel =
"(1x, 3a10, 50(a16))"
272 character(len=*),
parameter :: fmtexgdata = &
273 "(5x, a, 1x, a ,I10, 50(1pg16.6))"
274 character(len=40) :: fmtexgdata2
276 call mem_setptr(cellidm1,
'CELLIDM1', this%input_mempath)
277 call mem_setptr(cellidm2,
'CELLIDM2', this%input_mempath)
278 call mem_setptr(ihc,
'IHC', this%input_mempath)
279 call mem_setptr(cl1,
'CL1', this%input_mempath)
280 call mem_setptr(cl2,
'CL2', this%input_mempath)
281 call mem_setptr(hwva,
'HWVA', this%input_mempath)
282 call mem_setptr(auxvar,
'AUXVAR', this%input_mempath)
283 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
284 ndim1 =
size(cellidm1, dim=1)
285 ndim2 =
size(cellidm2, dim=1)
287 write (iout,
'(1x,a)')
'PROCESSING EXCHANGEDATA'
289 if (this%iprpak /= 0)
then
290 if (this%inamedbound == 0)
then
291 write (iout, fmtexglabel)
'NODEM1',
'NODEM2',
'IHC', &
292 'CL1',
'CL2',
'HWVA', (adjustr(this%auxname(iaux)), &
295 write (iout, fmtexglabel)
'NODEM1',
'NODEM2',
'IHC',
'CL1',
'CL2', &
296 'HWVA', (adjustr(this%auxname(iaux)), iaux=1, this%naux), &
300 write (cnfloat,
'(i0)') 3 + this%naux
301 fmtexgdata2 =
'(5x, a, 1x, a, i10, '//trim(cnfloat)// &
306 do iexg = 1, this%nexg
308 if (
associated(this%model1))
then
311 nodem1 = this%noder(this%model1, cellidm1(:, iexg), iout)
312 this%nodem1(iexg) = nodem1
315 this%nodem1(iexg) = -1
318 if (
associated(this%model2))
then
321 nodem2 = this%noder(this%model2, cellidm2(:, iexg), iout)
322 this%nodem2(iexg) = nodem2
325 this%nodem2(iexg) = -1
329 this%ihc(iexg) = ihc(iexg)
330 this%cl1(iexg) = cl1(iexg)
331 this%cl2(iexg) = cl2(iexg)
332 this%hwva(iexg) = hwva(iexg)
333 do iaux = 1, this%naux
334 this%auxvar(iaux, iexg) = auxvar(iaux, iexg)
336 if (this%inamedbound == 1)
then
337 this%boundname(iexg) = boundname(iexg)
341 if (this%iprpak /= 0)
then
342 cellstr1 = this%cellstr(ndim1, cellidm1(:, iexg), iout)
343 cellstr2 = this%cellstr(ndim2, cellidm2(:, iexg), iout)
344 if (this%inamedbound == 0)
then
345 write (iout, fmtexgdata) trim(cellstr1), trim(cellstr2), &
346 this%ihc(iexg), this%cl1(iexg), this%cl2(iexg), &
348 (this%auxvar(iaux, iexg), iaux=1, this%naux)
350 write (iout, fmtexgdata2) trim(cellstr1), trim(cellstr2), &
351 this%ihc(iexg), this%cl1(iexg), this%cl2(iexg), &
353 (this%auxvar(iaux, iexg), iaux=1, this%naux), &
354 trim(this%boundname(iexg))
359 if (
associated(this%model1))
then
360 if (nodem1 <= 0)
then
361 cellstr1 = this%cellstr(ndim1, cellidm1(:, iexg), iout)
363 trim(adjustl(this%model1%name))// &
364 ' Cell is outside active grid domain ('// &
365 trim(adjustl(cellstr1))//
').'
366 call store_error(errmsg)
371 if (
associated(this%model2))
then
372 if (nodem2 <= 0)
then
373 cellstr2 = this%cellstr(ndim2, cellidm2(:, iexg), iout)
375 trim(adjustl(this%model2%name))// &
376 ' Cell is outside active grid domain ('// &
377 trim(adjustl(cellstr2))//
').'
378 call store_error(errmsg)
383 write (iout,
'(1x,a)')
'END OF EXCHANGEDATA'
386 nerr = count_errors()
388 call store_error(
'Errors encountered in exchange input file.')
389 call store_error_filename(this%filename)