22 integer(I4B),
pointer :: nvert => null()
23 real(dp),
dimension(:),
pointer,
contiguous :: length => null()
24 real(dp),
dimension(:),
pointer,
contiguous :: width => null()
25 real(dp),
dimension(:),
pointer,
contiguous :: bottom => null()
26 integer(I4B),
dimension(:),
pointer,
contiguous :: idomain => null()
27 real(dp),
dimension(:, :),
pointer,
contiguous :: vertices => null()
28 real(dp),
dimension(:, :),
pointer,
contiguous :: cellxy => null()
29 real(dp),
dimension(:),
pointer,
contiguous :: fdc => null()
30 integer(I4B),
dimension(:),
pointer,
contiguous :: iavert => null()
31 integer(I4B),
dimension(:),
pointer,
contiguous :: javert => null()
67 logical :: length_units = .false.
68 logical :: nogrb = .false.
69 logical :: xorigin = .false.
70 logical :: yorigin = .false.
71 logical :: angrot = .false.
72 logical :: nodes = .false.
73 logical :: nvert = .false.
74 logical :: length = .false.
75 logical :: width = .false.
76 logical :: bottom = .false.
77 logical :: idomain = .false.
78 logical :: iv = .false.
79 logical :: xv = .false.
80 logical :: yv = .false.
81 logical :: icell2d = .false.
82 logical :: fdc = .false.
83 logical :: ncvert = .false.
84 logical :: icvert = .false.
89 subroutine disv1d_cr(dis, name_model, input_mempath, inunit, iout)
95 character(len=*),
intent(in) :: name_model
96 character(len=*),
intent(in) :: input_mempath
97 integer(I4B),
intent(in) :: inunit
98 integer(I4B),
intent(in) :: iout
101 logical(LGP) :: found_fname
102 character(len=*),
parameter :: fmtheader = &
103 "(1X, /1X, 'DISV1D -- DISCRETIZATION BY VERTICES IN 1D PACKAGE,', &
104 &' VERSION 1 : 4/2/2024 - INPUT READ FROM MEMPATH: ', A, /)"
107 call disnew%allocate_scalars(name_model, input_mempath)
108 dis%input_mempath = input_mempath
113 call mem_set_value(dis%input_fname,
'INPUT_FNAME', dis%input_mempath, &
121 write (iout, fmtheader) dis%input_mempath
137 if (this%inunit /= 0)
then
138 call this%disv1d_load()
142 call this%create_connections()
145 call this%grid_finalize()
157 integer(I4B),
intent(in) :: noden
158 integer(I4B),
intent(in) :: nodem
159 integer(I4B),
intent(in) :: ihc
160 real(DP),
intent(inout) :: xcomp
161 real(DP),
intent(inout) :: ycomp
162 real(DP),
intent(inout) :: zcomp
163 integer(I4B),
intent(in) :: ipos
165 real(DP) :: angle, dmult
169 angle = this%con%anglex(this%con%jas(ipos))
171 if (nodem < noden) dmult = -
done
172 xcomp = cos(angle) * dmult
173 ycomp = sin(angle) * dmult
184 xcomp, ycomp, zcomp, conlen)
187 integer(I4B),
intent(in) :: noden
188 integer(I4B),
intent(in) :: nodem
189 logical,
intent(in) :: nozee
190 real(DP),
intent(in) :: satn
191 real(DP),
intent(in) :: satm
192 integer(I4B),
intent(in) :: ihc
193 real(DP),
intent(inout) :: xcomp
194 real(DP),
intent(inout) :: ycomp
195 real(DP),
intent(inout) :: zcomp
196 real(DP),
intent(inout) :: conlen
198 integer(I4B) :: nodeun, nodeum
199 real(DP) :: xn, xm, yn, ym, zn, zm
210 nodeun = this%get_nodeuser(noden)
211 nodeum = this%get_nodeuser(nodem)
212 xn = this%cellxy(1, nodeun)
213 yn = this%cellxy(2, nodeun)
214 xm = this%cellxy(1, nodeum)
215 ym = this%cellxy(2, nodeum)
224 character(len=*),
intent(out) :: dis_type
232 integer(I4B) :: dis_enum
244 character(len=*),
intent(in) :: name_model
245 character(len=*),
intent(in) :: input_mempath
248 call this%DisBaseType%allocate_scalars(name_model, input_mempath)
267 call this%source_options()
268 call this%source_dimensions()
269 call this%source_griddata()
272 if (this%nvert > 0)
then
273 call this%source_vertices()
274 call this%source_cell2d()
289 character(len=LENVARNAME),
dimension(3) :: lenunits = &
290 &[character(len=LENVARNAME) ::
'FEET',
'METERS',
'CENTIMETERS']
299 idmmemorypath, lenunits, found%length_units)
301 idmmemorypath, found%nogrb)
303 idmmemorypath, found%xorigin)
305 idmmemorypath, found%yorigin)
307 idmmemorypath, found%angrot)
310 if (this%iout > 0)
then
311 call this%log_options(found)
324 write (this%iout,
'(1x,a)')
'Setting Discretization Options'
326 if (found%length_units)
then
327 write (this%iout,
'(4x,a,i0)')
'Model length unit [0=UND, 1=FEET, &
328 &2=METERS, 3=CENTIMETERS] set as ', this%lenuni
331 if (found%nogrb)
then
332 write (this%iout,
'(4x,a,i0)')
'Binary grid file [0=GRB, 1=NOGRB] &
333 &set as ', this%nogrb
336 if (found%xorigin)
then
337 write (this%iout,
'(4x,a,G0)')
'XORIGIN = ', this%xorigin
340 if (found%yorigin)
then
341 write (this%iout,
'(4x,a,G0)')
'YORIGIN = ', this%yorigin
344 if (found%angrot)
then
345 write (this%iout,
'(4x,a,G0)')
'ANGROT = ', this%angrot
348 write (this%iout,
'(1x,a,/)')
'End Setting Discretization Options'
361 character(len=LENMEMPATH) :: idmMemoryPath
369 call mem_set_value(this%nodes,
'NODES', idmmemorypath, found%nodes)
370 call mem_set_value(this%nvert,
'NVERT', idmmemorypath, found%nvert)
373 this%nodesuser = this%nodes
376 if (this%iout > 0)
then
377 call this%log_dimensions(found)
381 if (this%nodesuser < 1)
then
383 'NODES was not specified or was specified incorrectly.')
386 if (this%nvert < 1)
then
388 'NVERT was not specified or was specified as zero. The &
389 &VERTICES and CELL2D blocks will not be read for the DISV1D6 &
390 &Package in model '//trim(this%memoryPath)//
'.')
395 'LENGTH', this%memoryPath)
397 'WIDTH', this%memoryPath)
399 'BOTTOM', this%memoryPath)
401 'IDOMAIN', this%memoryPath)
404 if (this%nvert > 0)
then
406 'VERTICES', this%memoryPath)
408 'FDC', this%memoryPath)
410 'CELLXYZ', this%memoryPath)
414 do n = 1, this%nodesuser
415 this%length(n) =
dzero
416 this%width(n) =
dzero
417 this%bottom(n) =
dzero
431 write (this%iout,
'(1x,a)')
'Setting Discretization Dimensions'
433 if (found%nodes)
then
434 write (this%iout,
'(4x,a,i0)')
'NODES = ', this%nodesuser
437 if (found%nvert)
then
438 write (this%iout,
'(4x,a,i0)')
'NVERT = ', this%nvert
441 write (this%iout,
'(1x,a,/)')
'End Setting Discretization Dimensions'
452 character(len=LENMEMPATH) :: idmMemoryPath
466 call mem_set_value(this%idomain,
'IDOMAIN', idmmemorypath, found%idomain)
468 if (.not. found%length)
then
469 write (errmsg,
'(a)')
'Error in GRIDDATA block: LENGTH not found.'
473 if (.not. found%width)
then
474 write (errmsg,
'(a)')
'Error in GRIDDATA block: WIDTH not found.'
478 if (.not. found%bottom)
then
479 write (errmsg,
'(a)')
'Error in GRIDDATA block: BOTTOM not found.'
488 if (this%iout > 0)
then
489 call this%log_griddata(found)
502 write (this%iout,
'(1x,a)')
'Setting Discretization Griddata'
504 if (found%length)
then
505 write (this%iout,
'(4x,a)')
'LENGTH set from input file'
508 if (found%width)
then
509 write (this%iout,
'(4x,a)')
'WIDTH set from input file'
512 if (found%bottom)
then
513 write (this%iout,
'(4x,a)')
'BOTTOM set from input file'
516 if (found%idomain)
then
517 write (this%iout,
'(4x,a)')
'IDOMAIN set from input file'
520 write (this%iout,
'(1x,a,/)')
'End Setting Discretization Griddata'
536 character(len=LENMEMPATH) :: idmMemoryPath
537 real(DP),
dimension(:),
contiguous,
pointer :: vert_x => null()
538 real(DP),
dimension(:),
contiguous,
pointer :: vert_y => null()
549 if (
associated(vert_x) .and.
associated(vert_y))
then
551 this%vertices(1, i) = vert_x(i)
552 this%vertices(2, i) = vert_y(i)
555 call store_error(
'Required Vertex arrays not found.')
559 if (this%iout > 0)
then
560 write (this%iout,
'(1x,a)')
'Setting Discretization Vertices'
561 write (this%iout,
'(1x,a,/)')
'End setting discretization vertices'
580 character(len=LENMEMPATH) :: idmMemoryPath
581 integer(I4B),
dimension(:),
contiguous,
pointer :: icell2d => null()
582 integer(I4B),
dimension(:),
contiguous,
pointer :: ncvert => null()
583 integer(I4B),
dimension(:),
contiguous,
pointer :: icvert => null()
584 real(DP),
dimension(:),
contiguous,
pointer :: fdc => null()
592 call mem_setptr(icell2d,
'ICELL2D', idmmemorypath)
593 call mem_setptr(ncvert,
'NCVERT', idmmemorypath)
594 call mem_setptr(icvert,
'ICVERT', idmmemorypath)
597 if (
associated(icell2d) .and.
associated(ncvert) &
598 .and.
associated(icvert))
then
599 call this%define_cellverts(icell2d, ncvert, icvert)
601 call store_error(
'Required cell vertex arrays not found.')
608 if (
associated(fdc))
then
609 do i = 1, this%nodesuser
613 this%javert, this%cellxy)
619 if (this%iout > 0)
then
620 write (this%iout,
'(1x,a)')
'Setting Discretization CELL2D'
621 write (this%iout,
'(1x,a,/)')
'End Setting Discretization CELL2D'
637 integer(I4B),
dimension(:),
contiguous,
pointer,
intent(in) :: icell2d
638 integer(I4B),
dimension(:),
contiguous,
pointer,
intent(in) :: ncvert
639 integer(I4B),
dimension(:),
contiguous,
pointer,
intent(in) :: icvert
642 integer(I4B) :: i, j, ierr
643 integer(I4B) :: icv_idx, startvert, maxnnz = 2
646 call vert_spm%init(this%nodesuser, this%nvert, maxnnz)
650 do i = 1, this%nodesuser
651 if (icell2d(i) /= i)
call store_error(
'ICELL2D input sequence violation.')
653 call vert_spm%addconnection(i, icvert(icv_idx), 0)
655 startvert = icvert(icv_idx)
657 icv_idx = icv_idx + 1
662 call mem_allocate(this%iavert, this%nodesuser + 1,
'IAVERT', this%memoryPath)
663 call mem_allocate(this%javert, vert_spm%nnz,
'JAVERT', this%memoryPath)
664 call vert_spm%filliaja(this%iavert, this%javert, ierr)
665 call vert_spm%destroy()
675 real(DP),
dimension(:, :),
intent(in) :: vertices
676 real(DP),
dimension(:),
intent(in) :: fdc
677 integer(I4B),
dimension(:),
intent(in) :: iavert
678 integer(I4B),
dimension(:),
intent(in) :: javert
679 real(DP),
dimension(:, :),
intent(inout) :: cellxy
681 integer(I4B) :: nodes
693 nodes =
size(iavert) - 1
698 do j = iavert(n), iavert(n + 1) - 2
700 calcdist(vertices, javert(j), javert(j + 1))
707 do j = iavert(n), iavert(n + 1) - 2
708 d =
calcdist(vertices, javert(j), javert(j + 1))
709 fd1 = fd0 + d / length
713 if (fd1 >= fdc(n))
then
716 fd = (fdc(n) - fd0) / (fd1 - fd0)
724 cellxy(ixy, n) = (
done - fd) * vertices(ixy, iv0) + &
725 fd * vertices(ixy, iv1)
740 integer(I4B) :: node, noder, k
744 do k = 1, this%nodesuser
745 if (this%idomain(k) > 0) this%nodes = this%nodes + 1
749 if (this%nodes == 0)
then
750 call store_error(
'Model does not have any active nodes. Make sure &
751 &IDOMAIN has some values greater than zero.')
752 call this%parser%StoreErrorUnit()
757 call this%parser%StoreErrorUnit()
762 call this%allocate_arrays()
768 if (this%nodes < this%nodesuser)
then
771 do k = 1, this%nodesuser
772 if (this%idomain(k) > 0)
then
773 this%nodereduced(node) = noder
775 elseif (this%idomain(k) < 0)
then
776 this%nodereduced(node) = -1
778 this%nodereduced(node) = 0
785 if (this%nodes < this%nodesuser)
then
788 do k = 1, this%nodesuser
789 if (this%idomain(k) > 0)
then
790 this%nodeuser(noder) = node
798 do node = 1, this%nodesuser
799 this%bot(node) = this%bottom(node)
803 do node = 1, this%nodesuser
804 this%area(node) = this%length(node)
819 call this%DisBaseType%allocate_arrays()
822 if (this%nodes < this%nodesuser)
then
823 call mem_allocate(this%nodeuser, this%nodes,
'NODEUSER', this%memoryPath)
824 call mem_allocate(this%nodereduced, this%nodesuser,
'NODEREDUCED', &
827 call mem_allocate(this%nodeuser, 1,
'NODEUSER', this%memoryPath)
828 call mem_allocate(this%nodereduced, 1,
'NODEREDUCED', this%memoryPath)
832 this%mshape(1) = this%nodesuser
843 integer(I4B) :: nrsize
847 if (this%nodes < this%nodesuser) nrsize = this%nodes
853 call this%con%disv1dconnections_verts(this%name_model, this%nodes, &
854 this%nodesuser, nrsize, this%nvert, &
855 this%vertices, this%iavert, &
856 this%javert, this%cellxy, this%fdc, &
857 this%nodereduced, this%nodeuser, &
860 this%nja = this%con%nja
861 this%njas = this%con%njas
873 integer(I4B),
dimension(:),
intent(in) :: icelltype
875 integer(I4B) :: i, iunit, ntxt
876 integer(I4B),
parameter :: lentxt = 100
877 character(len=50) :: txthdr
878 character(len=lentxt) :: txt
879 character(len=LINELENGTH) :: fname
880 character(len=*),
parameter :: fmtgrdsave = &
881 "(4X,'BINARY GRID INFORMATION WILL BE WRITTEN TO:', &
882 &/,6X,'UNIT NUMBER: ', I0,/,6X, 'FILE NAME: ', A)"
886 if (this%nvert > 0) ntxt = ntxt + 5
889 fname = trim(this%input_fname)//
'.grb'
891 write (this%iout, fmtgrdsave) iunit, trim(adjustl(fname))
892 call openfile(iunit, this%iout, trim(adjustl(fname)),
'DATA(BINARY)', &
896 write (txthdr,
'(a)')
'GRID DISV1D'
897 txthdr(50:50) = new_line(
'a')
899 write (txthdr,
'(a)')
'VERSION 1'
900 txthdr(50:50) = new_line(
'a')
902 write (txthdr,
'(a, i0)')
'NTXT ', ntxt
903 txthdr(50:50) = new_line(
'a')
905 write (txthdr,
'(a, i0)')
'LENTXT ', lentxt
906 txthdr(50:50) = new_line(
'a')
910 write (txt,
'(3a, i0)')
'NCELLS ',
'INTEGER ',
'NDIM 0 # ', this%nodesuser
911 txt(lentxt:lentxt) = new_line(
'a')
913 write (txt,
'(3a, i0)')
'NJA ',
'INTEGER ',
'NDIM 0 # ', this%con%nja
914 txt(lentxt:lentxt) = new_line(
'a')
916 write (txt,
'(3a, 1pg24.15)')
'XORIGIN ',
'DOUBLE ',
'NDIM 0 # ', this%xorigin
917 txt(lentxt:lentxt) = new_line(
'a')
919 write (txt,
'(3a, 1pg24.15)')
'YORIGIN ',
'DOUBLE ',
'NDIM 0 # ', this%yorigin
920 txt(lentxt:lentxt) = new_line(
'a')
922 write (txt,
'(3a, 1pg24.15)')
'ANGROT ',
'DOUBLE ',
'NDIM 0 # ', this%angrot
923 txt(lentxt:lentxt) = new_line(
'a')
925 write (txt,
'(3a, i0)')
'BOTM ',
'DOUBLE ',
'NDIM 1 ', this%nodesuser
926 txt(lentxt:lentxt) = new_line(
'a')
928 write (txt,
'(3a, i0)')
'IA ',
'INTEGER ',
'NDIM 1 ', this%nodesuser + 1
929 txt(lentxt:lentxt) = new_line(
'a')
931 write (txt,
'(3a, i0)')
'JA ',
'INTEGER ',
'NDIM 1 ', this%con%nja
932 txt(lentxt:lentxt) = new_line(
'a')
934 write (txt,
'(3a, i0)')
'ICELLTYPE ',
'INTEGER ',
'NDIM 1 ', this%nodesuser
935 txt(lentxt:lentxt) = new_line(
'a')
937 write (txt,
'(3a, i0)')
'IDOMAIN ',
'INTEGER ',
'NDIM 1 ', this%nodesuser
938 txt(lentxt:lentxt) = new_line(
'a')
942 if (this%nvert > 0)
then
943 write (txt,
'(3a, i0)')
'VERTICES ',
'DOUBLE ',
'NDIM 2 2 ', this%nvert
944 txt(lentxt:lentxt) = new_line(
'a')
946 write (txt,
'(3a, i0)')
'CELLX ',
'DOUBLE ',
'NDIM 1 ', this%nodesuser
947 txt(lentxt:lentxt) = new_line(
'a')
949 write (txt,
'(3a, i0)')
'CELLY ',
'DOUBLE ',
'NDIM 1 ', this%nodesuser
950 txt(lentxt:lentxt) = new_line(
'a')
952 write (txt,
'(3a, i0)')
'IAVERT ',
'INTEGER ',
'NDIM 1 ', this%nodesuser + 1
953 txt(lentxt:lentxt) = new_line(
'a')
955 write (txt,
'(3a, i0)')
'JAVERT ',
'INTEGER ',
'NDIM 1 ',
size(this%javert)
956 txt(lentxt:lentxt) = new_line(
'a')
961 write (iunit) this%nodesuser
962 write (iunit) this%nja
963 write (iunit) this%xorigin
964 write (iunit) this%yorigin
965 write (iunit) this%angrot
966 write (iunit) this%bottom
967 write (iunit) this%con%iausr
968 write (iunit) this%con%jausr
969 write (iunit) icelltype
970 write (iunit) this%idomain
973 if (this%nvert > 0)
then
974 write (iunit) this%vertices
975 write (iunit) (this%cellxy(1, i), i=1, this%nodesuser)
976 write (iunit) (this%cellxy(2, i), i=1, this%nodesuser)
977 write (iunit) this%iavert
978 write (iunit) this%javert
995 integer(I4B),
intent(in) :: nodeu
996 integer(I4B),
intent(in) :: icheck
997 integer(I4B) :: nodenumber
999 if (icheck /= 0)
then
1000 if (nodeu < 1 .or. nodeu > this%nodes)
then
1001 write (
errmsg,
'(a,i10)') &
1002 'Nodenumber less than 1 or greater than nodes:', nodeu
1008 if (this%nodes == this%nodesuser)
then
1011 nodenumber = this%nodereduced(nodeu)
1021 integer(I4B),
intent(in) :: nodeu
1022 character(len=*),
intent(inout) :: str
1024 character(len=10) :: nstr
1026 write (nstr,
'(i0)') nodeu
1027 str =
'('//trim(adjustl(nstr))//
')'
1041 flag_string, allow_zero)
result(nodeu)
1044 integer(I4B),
intent(inout) :: lloc
1045 integer(I4B),
intent(inout) :: istart
1046 integer(I4B),
intent(inout) :: istop
1047 integer(I4B),
intent(in) :: in
1048 integer(I4B),
intent(in) :: iout
1049 character(len=*),
intent(inout) :: line
1050 logical,
optional,
intent(in) :: flag_string
1051 logical,
optional,
intent(in) :: allow_zero
1052 integer(I4B) :: nodeu
1054 integer(I4B) :: lloclocal, ndum, istat, n
1057 if (
present(flag_string))
then
1058 if (flag_string)
then
1061 call urword(line, lloclocal, istart, istop, 1, ndum, r, iout, in)
1062 read (line(istart:istop), *, iostat=istat) n
1063 if (istat /= 0)
then
1071 call urword(line, lloc, istart, istop, 2, nodeu, r, iout, in)
1073 if (nodeu == 0)
then
1074 if (
present(allow_zero))
then
1075 if (allow_zero)
then
1081 if (nodeu < 1 .or. nodeu > this%nodesuser)
then
1082 write (
errmsg,
'(a,i0,a)') &
1083 "Node number in list (", nodeu,
") is outside of the grid. "// &
1084 "Cell number cannot be determined in line '"// &
1085 trim(adjustl(line))//
"'."
1103 logical(LGP) :: deallocate_vertices
1109 deallocate_vertices = (this%nvert > 0)
1121 if (deallocate_vertices)
then
1130 call this%DisBaseType%dis_da()
1143 cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
1149 real(DP),
dimension(:),
pointer,
contiguous,
intent(inout) :: darray
1150 integer(I4B),
intent(in) :: iout
1151 integer(I4B),
intent(in) :: iprint
1152 integer(I4B),
intent(in) :: idataun
1153 character(len=*),
intent(in) :: aname
1154 character(len=*),
intent(in) :: cdatafmp
1155 integer(I4B),
intent(in) :: nvaluesp
1156 integer(I4B),
intent(in) :: nwidthp
1157 character(len=*),
intent(in) :: editdesc
1158 real(DP),
intent(in) :: dinact
1160 integer(I4B) :: k, ifirst
1161 integer(I4B) :: nlay
1162 integer(I4B) :: nrow
1163 integer(I4B) :: ncol
1164 integer(I4B) :: nval
1165 integer(I4B) :: nodeu, noder
1166 integer(I4B) :: istart, istop
1167 real(DP),
dimension(:),
pointer,
contiguous :: dtemp
1169 character(len=*),
parameter :: fmthsv = &
1170 "(1X,/1X,a,' WILL BE SAVED ON UNIT ',I4, &
1171 &' AT END OF TIME STEP',I5,', STRESS PERIOD ',I4)"
1176 ncol = this%mshape(1)
1180 if (this%nodes < this%nodesuser)
then
1183 do nodeu = 1, this%nodesuser
1184 noder = this%get_nodenumber(nodeu, 0)
1185 if (noder <= 0)
then
1186 dtemp(nodeu) = dinact
1189 dtemp(nodeu) = darray(noder)
1197 if (iprint /= 0)
then
1200 istop = istart + nrow * ncol - 1
1202 aname, cdatafmp, nvaluesp, nwidthp, editdesc)
1208 if (idataun > 0)
then
1213 istop = istart + nrow * ncol - 1
1214 if (ifirst == 1)
write (iout, fmthsv) &
1215 trim(adjustl(aname)), idataun, &
1222 elseif (idataun < 0)
then
1225 call ubdsv1(
kstp,
kper, aname, -idataun, dtemp, ncol, nrow, nlay, &
1236 dstmodel, dstpackage, naux, auxtxt, &
1237 ibdchn, nlist, iout)
1243 character(len=16),
intent(in) :: text
1244 character(len=16),
intent(in) :: textmodel
1245 character(len=16),
intent(in) :: textpackage
1246 character(len=16),
intent(in) :: dstmodel
1247 character(len=16),
intent(in) :: dstpackage
1248 integer(I4B),
intent(in) :: naux
1249 character(len=16),
dimension(:),
intent(in) :: auxtxt
1250 integer(I4B),
intent(in) :: ibdchn
1251 integer(I4B),
intent(in) :: nlist
1252 integer(I4B),
intent(in) :: iout
1254 integer(I4B) :: nlay, nrow, ncol
1258 ncol = this%mshape(1)
1261 call ubdsv06(
kstp,
kper, text, textmodel, textpackage, dstmodel, dstpackage, &
1262 ibdchn, naux, auxtxt, ncol, nrow, nlay, &
1278 integer(I4B),
intent(in) :: n
1279 integer(I4B),
intent(in) :: m
1280 integer(I4B),
intent(in) :: idx_conn
1281 real(DP),
intent(out) :: width_n
1282 real(DP),
intent(out) :: width_m
1285 width_n = this%width(n)
1286 width_m = this%width(m)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
@ disv1d
DISV1D6 discretization.
integer(i4b), parameter lenvarname
maximum length of a variable name
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter done
real constant 1
real(dp) function, public calcdist(vertices, ivert1, ivert2)
Calculate distance between two vertices.
subroutine, public disv1d_cr(dis, name_model, input_mempath, inunit, iout)
subroutine log_options(this, found)
Write user options to list file.
subroutine nodeu_to_string(this, nodeu, str)
subroutine connection_normal(this, noden, nodem, ihc, xcomp, ycomp, zcomp, ipos)
Get normal vector components between the cell and a given neighbor.
subroutine record_srcdst_list_header(this, text, textmodel, textpackage, dstmodel, dstpackage, naux, auxtxt, ibdchn, nlist, iout)
Record list header using ubdsv06.
subroutine source_cell2d(this)
Copy cell2d information from input data context to model context.
subroutine get_dis_type(this, dis_type)
Get the discretization type (DIS, DIS2D, DISV, DISV1D, DISU)
integer(i4b) function get_nodenumber_idx1(this, nodeu, icheck)
Return a nodenumber from the user specified node number with an option to perform a check....
subroutine grid_finalize(this)
Finalize grid construction.
subroutine get_flow_width(this, n, m, idx_conn, width_n, width_m)
@ brief Calculate the flow width between two cells
subroutine record_array(this, darray, iout, iprint, idataun, aname, cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
Record a double precision array.
subroutine calculate_cellxy(vertices, fdc, iavert, javert, cellxy)
Calculate x, y, coordinates of reach midpoint.
subroutine source_griddata(this)
subroutine allocate_scalars(this, name_model, input_mempath)
Allocate scalar variables.
subroutine disv1d_df(this)
Define the discretization.
subroutine define_cellverts(this, icell2d, ncvert, icvert)
Construct the iavert and javert integer vectors which are compressed sparse row index arrays that rel...
subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, xcomp, ycomp, zcomp, conlen)
Get unit vector components between the cell and a given neighbor.
subroutine source_vertices(this)
Copy vertex information from input data context to model context.
subroutine disv1d_da(this)
integer(i4b) function get_dis_enum(this)
Get the discretization type enumeration.
subroutine source_dimensions(this)
Copy dimensions from IDM into package.
subroutine create_connections(this)
subroutine allocate_arrays(this)
subroutine write_grb(this, icelltype)
Write binary grid file.
subroutine disv1d_load(this)
integer(i4b) function nodeu_from_string(this, lloc, istart, istop, in, iout, line, flag_string, allow_zero)
nodeu_from_string – Receive a string and convert the string to a user nodenumber. The model is unstru...
subroutine log_dimensions(this, found)
Write dimensions to list file.
subroutine source_options(this)
Copy options from IDM into package.
subroutine log_griddata(this, found)
Write griddata found to list file.
subroutine, public line_unit_vector(x0, y0, z0, x1, y1, z1, xcomp, ycomp, zcomp, vmag)
Calculate the vector components (xcomp, ycomp, and zcomp) for a line defined by two points,...
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public memorylist_remove(component, subcomponent, context)
This module contains simulation methods.
subroutine, public ustop(stopmess, ioutlocal)
Stop the simulation.
subroutine, public store_warning(msg, substring)
Store warning message.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
subroutine, public store_error_unit(iunit, terminate)
Store the file unit number.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
character(len=maxcharlen) warnmsg
warning message string
real(dp), pointer, public pertim
time relative to start of stress period
real(dp), pointer, public totim
time relative to start of simulation
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
real(dp), pointer, public delt
length of the current time step
Simplifies tracking parameters sourced from the input context.