450 class(StructArrayType) :: this
451 integer(I4B),
intent(in) :: icol
452 integer(I4B) :: i, j, isize
453 integer(I4B),
dimension(:),
pointer,
contiguous :: p_int1d
454 integer(I4B),
dimension(:, :),
pointer,
contiguous :: p_int2d
455 real(DP),
dimension(:),
pointer,
contiguous :: p_dbl1d
456 type(CharacterStringType),
dimension(:),
pointer,
contiguous :: p_charstr1d
457 character(len=LENVARNAME) :: varname
460 varname = this%struct_vectors(icol)%idt%mf6varname
463 call get_isize(varname, this%mempath, isize)
466 select case (this%struct_vectors(icol)%memtype)
472 call mem_setptr(p_int1d, varname, this%mempath)
476 call mem_reallocate(p_int1d, this%nrow + isize, varname, this%mempath)
479 p_int1d(isize + i) = this%struct_vectors(icol)%int1d(i)
484 call mem_allocate(p_int1d, this%nrow, varname, this%mempath)
488 p_int1d(i) = this%struct_vectors(icol)%int1d(i)
493 deallocate (this%struct_vectors(icol)%int1d)
496 this%struct_vectors(icol)%int1d => p_int1d
497 this%struct_vectors(icol)%size = this%nrow
502 call mem_setptr(p_dbl1d, varname, this%mempath)
507 p_dbl1d(isize + i) = this%struct_vectors(icol)%dbl1d(i)
510 call mem_allocate(p_dbl1d, this%nrow, varname, this%mempath)
513 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
517 deallocate (this%struct_vectors(icol)%dbl1d)
519 this%struct_vectors(icol)%dbl1d => p_dbl1d
520 this%struct_vectors(icol)%size = this%nrow
525 call mem_setptr(p_charstr1d, varname, this%mempath)
526 call mem_reallocate(p_charstr1d, linelength, this%nrow + isize, varname, &
530 p_charstr1d(isize + i) = this%struct_vectors(icol)%charstr1d(i)
534 call mem_allocate(p_charstr1d, linelength, this%nrow, varname, &
538 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
542 deallocate (this%struct_vectors(icol)%charstr1d)
544 this%struct_vectors(icol)%charstr1d => p_charstr1d
545 this%struct_vectors(icol)%size = this%nrow
551 call mem_setptr(p_int2d, varname, this%mempath)
552 call mem_reallocate(p_int2d, this%struct_vectors(icol)%intshape, &
553 this%nrow, varname, this%mempath)
556 do j = 1, this%struct_vectors(icol)%intshape
557 p_int2d(j, isize + i) = this%struct_vectors(icol)%int2d(j, i)
561 call mem_allocate(p_int2d, this%struct_vectors(icol)%intshape, &
562 this%nrow, varname, this%mempath)
565 do j = 1, this%struct_vectors(icol)%intshape
566 p_int2d(j, i) = this%struct_vectors(icol)%int2d(j, i)
571 deallocate (this%struct_vectors(icol)%int2d)
573 this%struct_vectors(icol)%int2d => p_int2d
574 this%struct_vectors(icol)%size = this%nrow
578 errmsg =
'IDM unimplemented. StructArray::load_deferred_vector &
579 &unsupported memtype.'
580 call store_error(errmsg, terminate=.true.)