With single: the columns of the single eclipse row (the union of the segment rows'),
and where each segment row's column is in them.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(eclipse_opt_data), | intent(inout) | :: | d |
subroutine union_columns(d) type(eclipse_opt_data),intent(inout) :: d integer :: k, j, o, i, nu if (allocated(d%ucol)) deallocate(d%ucol) if (allocated(d%upos)) deallocate(d%upos) allocate(d%ucol(sum(d%rows%ncol)), d%upos(sum(d%rows%ncol))) nu = 0 o = 0 do k = 1, size(d%rows) do j = 1, d%rows(k)%ncol i = findloc(d%ucol(1:nu), d%rows(k)%col(j), 1) if (i == 0) then nu = nu + 1 d%ucol(nu) = d%rows(k)%col(j) i = nu end if d%upos(o+j) = i end do o = o + d%rows(k)%ncol end do d%ucol = d%ucol(1:nu) end subroutine union_columns