412 class(StructArrayType) :: this
413 integer(I4B),
intent(in) :: icol
414 integer(I4B) :: i, j, isize
415 integer(I4B),
dimension(:),
pointer,
contiguous :: p_int1d
416 integer(I4B),
dimension(:, :),
pointer,
contiguous :: p_int2d
417 real(DP),
dimension(:),
pointer,
contiguous :: p_dbl1d
418 type(CharacterStringType),
dimension(:),
pointer,
contiguous :: p_charstr1d
419 character(len=LENVARNAME) :: varname
420 logical(LGP) :: overwrite
423 if (this%struct_vectors(icol)%idt%blockname ==
'SOLUTIONGROUP') &
427 varname = this%struct_vectors(icol)%idt%mf6varname
429 call get_isize(varname, this%mempath, isize)
432 select case (this%struct_vectors(icol)%memtype)
436 call mem_setptr(p_int1d, varname, this%mempath)
440 if (this%nrow > isize)
then
447 p_int1d(i) = this%struct_vectors(icol)%int1d(i)
450 if (isize > this%nrow)
then
452 do i = this%nrow + 1, isize
458 call mem_reallocate(p_int1d, this%nrow + isize, varname, this%mempath)
462 p_int1d(isize + i) = this%struct_vectors(icol)%int1d(i)
467 call mem_allocate(p_int1d, this%nrow, varname, this%mempath)
471 p_int1d(i) = this%struct_vectors(icol)%int1d(i)
476 deallocate (this%struct_vectors(icol)%int1d)
479 this%struct_vectors(icol)%int1d => p_int1d
480 this%struct_vectors(icol)%size = this%nrow
483 call mem_setptr(p_dbl1d, varname, this%mempath)
486 if (this%nrow > isize)
then
491 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
494 if (isize > this%nrow)
then
495 do i = this%nrow + 1, isize
503 p_dbl1d(isize + i) = this%struct_vectors(icol)%dbl1d(i)
507 call mem_allocate(p_dbl1d, this%nrow, varname, this%mempath)
510 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
514 deallocate (this%struct_vectors(icol)%dbl1d)
516 this%struct_vectors(icol)%dbl1d => p_dbl1d
517 this%struct_vectors(icol)%size = this%nrow
521 call mem_setptr(p_charstr1d, varname, this%mempath)
524 if (this%nrow > isize)
then
525 call mem_reallocate(p_charstr1d, linelength, this%nrow, varname, &
530 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
533 if (isize > this%nrow)
then
534 do i = this%nrow + 1, isize
540 varname, this%mempath)
542 p_charstr1d(isize + i) = this%struct_vectors(icol)%charstr1d(i)
546 call mem_allocate(p_charstr1d, linelength, this%nrow, varname, &
549 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
550 call this%struct_vectors(icol)%charstr1d(i)%destroy()
554 deallocate (this%struct_vectors(icol)%charstr1d)
556 this%struct_vectors(icol)%charstr1d => p_charstr1d
557 this%struct_vectors(icol)%size = this%nrow
559 errmsg =
'StructArray::load_deferred_vector &
560 &intvector reallocate unimplemented.'
561 call store_error(errmsg, terminate=.true.)
564 errmsg =
'StructArray::load_deferred_vector &
565 &int2d reallocate unimplemented.'
566 call store_error(errmsg, terminate=.true.)
568 call mem_allocate(p_int2d, this%struct_vectors(icol)%intshape, &
569 this%nrow, varname, this%mempath)
571 do j = 1, this%struct_vectors(icol)%intshape
572 p_int2d(j, i) = this%struct_vectors(icol)%int2d(j, i)
577 deallocate (this%struct_vectors(icol)%int2d)
579 this%struct_vectors(icol)%int2d => p_int2d
580 this%struct_vectors(icol)%size = this%nrow
582 errmsg =
'StructArray::load_deferred_vector &
583 &dbl2d reallocate unimplemented.'
584 call store_error(errmsg, terminate=.true.)