433 class(StructArrayType) :: this
434 integer(I4B),
intent(in) :: icol
435 integer(I4B) :: i, j, isize
436 integer(I4B),
dimension(:),
pointer,
contiguous :: p_int1d
437 integer(I4B),
dimension(:, :),
pointer,
contiguous :: p_int2d
438 real(DP),
dimension(:),
pointer,
contiguous :: p_dbl1d
439 type(CharacterStringType),
dimension(:),
pointer,
contiguous :: p_charstr1d
440 character(len=LENVARNAME) :: varname
443 varname = this%struct_vectors(icol)%idt%mf6varname
446 call get_isize(varname, this%mempath, isize)
449 select case (this%struct_vectors(icol)%memtype)
455 call mem_setptr(p_int1d, varname, this%mempath)
459 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
485 call mem_setptr(p_dbl1d, varname, this%mempath)
490 p_dbl1d(isize + i) = this%struct_vectors(icol)%dbl1d(i)
493 call mem_allocate(p_dbl1d, this%nrow, varname, this%mempath)
496 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
500 deallocate (this%struct_vectors(icol)%dbl1d)
502 this%struct_vectors(icol)%dbl1d => p_dbl1d
503 this%struct_vectors(icol)%size = this%nrow
508 call mem_setptr(p_charstr1d, varname, this%mempath)
509 call mem_reallocate(p_charstr1d, linelength, this%nrow + isize, varname, &
513 p_charstr1d(isize + i) = this%struct_vectors(icol)%charstr1d(i)
517 call mem_allocate(p_charstr1d, linelength, this%nrow, varname, &
521 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
525 deallocate (this%struct_vectors(icol)%charstr1d)
527 this%struct_vectors(icol)%charstr1d => p_charstr1d
528 this%struct_vectors(icol)%size = this%nrow
534 call mem_setptr(p_int2d, varname, this%mempath)
535 call mem_reallocate(p_int2d, this%struct_vectors(icol)%intshape, &
536 this%nrow, varname, this%mempath)
539 do j = 1, this%struct_vectors(icol)%intshape
540 p_int2d(j, isize + i) = this%struct_vectors(icol)%int2d(j, i)
544 call mem_allocate(p_int2d, this%struct_vectors(icol)%intshape, &
545 this%nrow, varname, this%mempath)
548 do j = 1, this%struct_vectors(icol)%intshape
549 p_int2d(j, i) = this%struct_vectors(icol)%int2d(j, i)
554 deallocate (this%struct_vectors(icol)%int2d)
556 this%struct_vectors(icol)%int2d => p_int2d
557 this%struct_vectors(icol)%size = this%nrow
561 errmsg =
'IDM unimplemented. StructArray::load_deferred_vector &
562 &unsupported memtype.'
563 call store_error(errmsg, terminate=.true.)