21 integer(I4B) :: nrofnbrs = 0
23 contiguous :: neighbors => null()
35 integer(I4B) :: nbrCnt, currentSize, i
39 if (.not.
associated(this%neighbors))
then
44 nbrcnt = this%nrOfNbrs
45 currentsize =
size(this%neighbors)
46 if (nbrcnt + 1 > currentsize)
then
49 oldneighbors => this%neighbors
52 newneighbors(i) = oldneighbors(i)
54 this%neighbors => newneighbors
57 deallocate (oldneighbors)
58 nullify (oldneighbors)
61 this%neighbors(nbrcnt + 1)%cell%index = index
62 this%neighbors(nbrcnt + 1)%cell%v_model => v_model
64 this%nrOfNbrs = nbrcnt + 1
subroutine addnbrcell(this, index, v_model)
integer(i4b), parameter defaultcapacity
index
This module defines variable data types.
Data structure to hold a global cell identifier, using a pointer to the model and its local cell.