405 class(StructArrayType) :: this
406 integer(I4B),
intent(in) :: icol
407 integer(I4B) :: i, j, isize
408 integer(I4B),
dimension(:),
pointer,
contiguous :: p_int1d
409 integer(I4B),
dimension(:, :),
pointer,
contiguous :: p_int2d
410 real(DP),
dimension(:),
pointer,
contiguous :: p_dbl1d
411 type(CharacterStringType),
dimension(:),
pointer,
contiguous :: p_charstr1d
412 character(len=LENVARNAME) :: varname
415 varname = this%struct_vectors(icol)%idt%mf6varname
417 call get_isize(varname, this%mempath, isize)
420 select case (this%struct_vectors(icol)%memtype)
424 call mem_setptr(p_int1d, varname, this%mempath)
428 call mem_reallocate(p_int1d, this%nrow + isize, varname, this%mempath)
431 p_int1d(isize + i) = this%struct_vectors(icol)%int1d(i)
435 call mem_allocate(p_int1d, this%nrow, varname, this%mempath)
439 p_int1d(i) = this%struct_vectors(icol)%int1d(i)
444 deallocate (this%struct_vectors(icol)%int1d)
447 this%struct_vectors(icol)%int1d => p_int1d
448 this%struct_vectors(icol)%size = this%nrow
451 call mem_setptr(p_dbl1d, varname, this%mempath)
455 p_dbl1d(isize + i) = this%struct_vectors(icol)%dbl1d(i)
458 call mem_allocate(p_dbl1d, this%nrow, varname, this%mempath)
461 p_dbl1d(i) = this%struct_vectors(icol)%dbl1d(i)
465 deallocate (this%struct_vectors(icol)%dbl1d)
467 this%struct_vectors(icol)%dbl1d => p_dbl1d
468 this%struct_vectors(icol)%size = this%nrow
472 call mem_setptr(p_charstr1d, varname, this%mempath)
473 call mem_reallocate(p_charstr1d, linelength, this%nrow + isize, varname, &
476 p_charstr1d(isize + i) = this%struct_vectors(icol)%charstr1d(i)
479 call mem_allocate(p_charstr1d, linelength, this%nrow, varname, &
482 p_charstr1d(i) = this%struct_vectors(icol)%charstr1d(i)
483 call this%struct_vectors(icol)%charstr1d(i)%destroy()
487 deallocate (this%struct_vectors(icol)%charstr1d)
489 this%struct_vectors(icol)%charstr1d => p_charstr1d
490 this%struct_vectors(icol)%size = this%nrow
495 call mem_setptr(p_int2d, varname, this%mempath)
496 call mem_reallocate(p_int2d, this%struct_vectors(icol)%intshape, &
497 this%nrow, varname, this%mempath)
500 do j = 1, this%struct_vectors(icol)%intshape
501 p_int2d(j, isize + i) = this%struct_vectors(icol)%int2d(j, i)
505 call mem_allocate(p_int2d, this%struct_vectors(icol)%intshape, &
506 this%nrow, varname, this%mempath)
508 do j = 1, this%struct_vectors(icol)%intshape
509 p_int2d(j, i) = this%struct_vectors(icol)%int2d(j, i)
514 deallocate (this%struct_vectors(icol)%int2d)
516 this%struct_vectors(icol)%int2d => p_int2d
517 this%struct_vectors(icol)%size = this%nrow
521 errmsg =
'IDM unimplemented. StructArray::load_deferred_vector &
522 &unsupported memtype.'
523 call store_error(errmsg, terminate=.true.)