@@ -55,12 +55,12 @@ module GwfDisuModule
55
55
procedure :: connection_normal
56
56
procedure :: connection_vector
57
57
procedure :: supports_layers
58
- procedure :: get_ncpl
58
+ procedure :: get_ncpl = > get_ncpl
59
59
procedure , public :: record_array
60
60
procedure , public :: record_srcdst_list_header
61
61
! -- private
62
- procedure :: allocate_scalars
63
- procedure :: allocate_arrays
62
+ procedure :: allocate_scalars = > allocate_scalars_disu
63
+ procedure :: allocate_arrays = > allocate_arrays_disu
64
64
procedure :: allocate_arrays_mem
65
65
procedure :: source_options
66
66
procedure :: source_dimensions
@@ -78,6 +78,9 @@ module GwfDisuModule
78
78
! -- Read a node-sized model array (reduced or not)
79
79
procedure :: read_int_array
80
80
procedure :: read_dbl_array
81
+ !
82
+ procedure :: nlarray_to_nodelist
83
+ procedure :: read_layer_array
81
84
end type GwfDisuType
82
85
83
86
contains
@@ -482,7 +485,7 @@ subroutine disu_da(this)
482
485
call mem_deallocate(this% nodereduced)
483
486
!
484
487
! -- DisBaseType deallocate
485
- call this% DisBaseType % dis_da ()
488
+ call this% dis_da_default ()
486
489
!
487
490
! -- Return
488
491
return
@@ -1305,7 +1308,7 @@ subroutine get_dis_type(this, dis_type)
1305
1308
1306
1309
end subroutine get_dis_type
1307
1310
1308
- subroutine allocate_scalars (this , name_model , input_mempath )
1311
+ subroutine allocate_scalars_disu (this , name_model , input_mempath )
1309
1312
! ******************************************************************************
1310
1313
! allocate_scalars -- Allocate and initialize scalar variables in this class
1311
1314
! ******************************************************************************
@@ -1322,7 +1325,7 @@ subroutine allocate_scalars(this, name_model, input_mempath)
1322
1325
! ------------------------------------------------------------------------------
1323
1326
!
1324
1327
! -- Allocate parent scalars
1325
- call this% DisBaseType % allocate_scalars (name_model, input_mempath)
1328
+ call this% allocate_scalars_default (name_model, input_mempath)
1326
1329
!
1327
1330
! -- Allocate variables for DISU
1328
1331
call mem_allocate(this% njausr, ' NJAUSR' , this% memoryPath)
@@ -1340,9 +1343,9 @@ subroutine allocate_scalars(this, name_model, input_mempath)
1340
1343
!
1341
1344
! -- Return
1342
1345
return
1343
- end subroutine allocate_scalars
1346
+ end subroutine allocate_scalars_disu
1344
1347
1345
- subroutine allocate_arrays (this )
1348
+ subroutine allocate_arrays_disu (this )
1346
1349
! ******************************************************************************
1347
1350
! allocate_arrays -- Read discretization information from file
1348
1351
! ******************************************************************************
@@ -1357,7 +1360,7 @@ subroutine allocate_arrays(this)
1357
1360
! ------------------------------------------------------------------------------
1358
1361
!
1359
1362
! -- Allocate arrays in DisBaseType (mshape, top, bot, area)
1360
- call this% DisBaseType % allocate_arrays ()
1363
+ call this% allocate_arrays_default ()
1361
1364
!
1362
1365
! -- Allocate arrays in DISU
1363
1366
if (this% nodes < this% nodesuser) then
@@ -1374,7 +1377,7 @@ subroutine allocate_arrays(this)
1374
1377
!
1375
1378
! -- Return
1376
1379
return
1377
- end subroutine allocate_arrays
1380
+ end subroutine allocate_arrays_disu
1378
1381
1379
1382
subroutine allocate_arrays_mem (this )
1380
1383
use MemoryManagerModule, only: mem_allocate
@@ -1809,4 +1812,52 @@ function CastAsDisuType(dis) result(disu)
1809
1812
1810
1813
end function CastAsDisuType
1811
1814
1815
+ ! todo: are the below needed??? can they be removed fromm DiscretizationBase?
1816
+
1817
+ subroutine nlarray_to_nodelist (this , darray , nodelist , maxbnd , nbound , aname )
1818
+ ! -- modules
1819
+ use SimModule, only: store_error
1820
+ use ConstantsModule, only: LINELENGTH
1821
+ ! -- dummy
1822
+ class(GwfDisuType) :: this
1823
+ integer (I4B), intent (in ) :: maxbnd
1824
+ integer (I4B), dimension (:), pointer , contiguous :: darray
1825
+ integer (I4B), dimension (maxbnd), intent (inout ) :: nodelist
1826
+ integer (I4B), intent (inout ) :: nbound
1827
+ character (len=* ), intent (in ) :: aname
1828
+ !
1829
+ errmsg = ' Programmer error: nlarray_to_nodelist called for DISU grid.'
1830
+ call store_error(errmsg, terminate= .TRUE. )
1831
+
1832
+ end subroutine nlarray_to_nodelist
1833
+
1834
+ subroutine read_layer_array (this , nodelist , darray , ncolbnd , maxbnd , &
1835
+ icolbnd , aname , inunit , iout )
1836
+ ! ******************************************************************************
1837
+ ! read_layer_array -- Read a 2d double array into col icolbnd of darray.
1838
+ ! For cells that are outside of the active domain,
1839
+ ! do not copy the array value into darray.
1840
+ ! ******************************************************************************
1841
+ !
1842
+ ! SPECIFICATIONS:
1843
+ ! ------------------------------------------------------------------------------
1844
+ ! -- modules
1845
+ ! -- dummy
1846
+ class(GwfDisuType) :: this
1847
+ integer (I4B), intent (in ) :: ncolbnd
1848
+ integer (I4B), intent (in ) :: maxbnd
1849
+ integer (I4B), dimension (maxbnd) :: nodelist
1850
+ real (DP), dimension (ncolbnd, maxbnd), intent (inout ) :: darray
1851
+ integer (I4B), intent (in ) :: icolbnd
1852
+ character (len=* ), intent (in ) :: aname
1853
+ integer (I4B), intent (in ) :: inunit
1854
+ integer (I4B), intent (in ) :: iout
1855
+ !
1856
+ !
1857
+ errmsg = ' Programmer error: read_layer_array called for DISU grid.'
1858
+ call store_error(errmsg, terminate= .TRUE. )
1859
+ !
1860
+ ! -- return
1861
+ end subroutine read_layer_array
1862
+
1812
1863
end module GwfDisuModule
0 commit comments