MODFLOW 6  version 6.8.0.dev0
USGS Modular Hydrologic Model
memorymanagermodule::mem_copyptr Interface Reference
Collaboration diagram for memorymanagermodule::mem_copyptr:
Collaboration graph

Private Member Functions

subroutine copyptr_logical1d (alog, name, mem_path, mem_path_copy)
 Make a copy of a 1-dimensional logical array. More...
 
subroutine copyptr_int1d (aint, name, mem_path, mem_path_copy)
 Make a copy of a 1-dimensional integer array. More...
 
subroutine copyptr_int2d (aint, name, mem_path, mem_path_copy)
 Make a copy of a 2-dimensional integer array. More...
 
subroutine copyptr_dbl1d (adbl, name, mem_path, mem_path_copy)
 Make a copy of a 1-dimensional real array. More...
 
subroutine copyptr_dbl2d (adbl, name, mem_path, mem_path_copy)
 Make a copy of a 2-dimensional real array. More...
 

Detailed Description

Definition at line 110 of file MemoryManager.f90.

Member Function/Subroutine Documentation

◆ copyptr_dbl1d()

subroutine memorymanagermodule::mem_copyptr::copyptr_dbl1d ( real(dp), dimension(:), intent(inout), pointer, contiguous  adbl,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in), optional  mem_path_copy 
)
private
Parameters
[in,out]adblreturned copy of 1d real array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]mem_path_copyoptional path where the copy will be stored, if passed then the copy is added to the memory manager

Definition at line 1869 of file MemoryManager.f90.

1870  real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl !< returned copy of 1d real array
1871  character(len=*), intent(in) :: name !< variable name
1872  character(len=*), intent(in) :: mem_path !< path where variable is stored
1873  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1874  !! if passed then the copy is added to the
1875  !! memory manager
1876  ! -- local
1877  type(MemoryType), pointer :: mt
1878  logical(LGP) :: found
1879  integer(I4B) :: n
1880  ! -- code
1881  call get_from_memorystore(name, mem_path, mt, found)
1882  adbl => null()
1883  ! -- check the copy into the memory manager
1884  if (present(mem_path_copy)) then
1885  call allocate_dbl1d(adbl, size(mt%adbl1d), mt%name, mem_path_copy)
1886  ! -- create a local copy
1887  else
1888  allocate (adbl(size(mt%adbl1d)))
1889  end if
1890  do n = 1, size(mt%adbl1d)
1891  adbl(n) = mt%adbl1d(n)
1892  end do
Here is the call graph for this function:

◆ copyptr_dbl2d()

subroutine memorymanagermodule::mem_copyptr::copyptr_dbl2d ( real(dp), dimension(:, :), intent(inout), pointer, contiguous  adbl,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in), optional  mem_path_copy 
)
private
Parameters
[in,out]adblreturned copy of 2d real array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]mem_path_copyoptional path where the copy will be stored, if passed then the copy is added to the memory manager

Definition at line 1897 of file MemoryManager.f90.

1898  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl !< returned copy of 2d real array
1899  character(len=*), intent(in) :: name !< variable name
1900  character(len=*), intent(in) :: mem_path !< path where variable is stored
1901  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1902  !! if passed then the copy is added to the
1903  !! memory manager
1904  ! -- local
1905  type(MemoryType), pointer :: mt
1906  logical(LGP) :: found
1907  integer(I4B) :: i
1908  integer(I4B) :: j
1909  integer(I4B) :: ncol
1910  integer(I4B) :: nrow
1911  ! -- code
1912  call get_from_memorystore(name, mem_path, mt, found)
1913  adbl => null()
1914  ncol = size(mt%adbl2d, dim=1)
1915  nrow = size(mt%adbl2d, dim=2)
1916  ! -- check the copy into the memory manager
1917  if (present(mem_path_copy)) then
1918  call allocate_dbl2d(adbl, ncol, nrow, mt%name, mem_path_copy)
1919  ! -- create a local copy
1920  else
1921  allocate (adbl(ncol, nrow))
1922  end if
1923  do i = 1, nrow
1924  do j = 1, ncol
1925  adbl(j, i) = mt%adbl2d(j, i)
1926  end do
1927  end do
Here is the call graph for this function:

◆ copyptr_int1d()

subroutine memorymanagermodule::mem_copyptr::copyptr_int1d ( integer(i4b), dimension(:), intent(inout), pointer, contiguous  aint,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in), optional  mem_path_copy 
)
private
Parameters
[in,out]aintreturned copy of 1d integer array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]mem_path_copyoptional path where the copy will be stored, if passed then the copy is added to the memory manager

Definition at line 1806 of file MemoryManager.f90.

1807  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint !< returned copy of 1d integer array
1808  character(len=*), intent(in) :: name !< variable name
1809  character(len=*), intent(in) :: mem_path !< path where variable is stored
1810  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1811  !! if passed then the copy is added to the
1812  !! memory manager
1813  ! -- local
1814  type(MemoryType), pointer :: mt
1815  logical(LGP) :: found
1816  integer(I4B) :: n
1817  ! -- code
1818  call get_from_memorystore(name, mem_path, mt, found)
1819  aint => null()
1820  ! -- check the copy into the memory manager
1821  if (present(mem_path_copy)) then
1822  call allocate_int1d(aint, size(mt%aint1d), mt%name, mem_path_copy)
1823  ! -- create a local copy
1824  else
1825  allocate (aint(size(mt%aint1d)))
1826  end if
1827  do n = 1, size(mt%aint1d)
1828  aint(n) = mt%aint1d(n)
1829  end do
Here is the call graph for this function:

◆ copyptr_int2d()

subroutine memorymanagermodule::mem_copyptr::copyptr_int2d ( integer(i4b), dimension(:, :), intent(inout), pointer, contiguous  aint,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in), optional  mem_path_copy 
)
private
Parameters
[in,out]aintreturned copy of 2d integer array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]mem_path_copyoptional path where the copy will be stored, if passed then the copy is added to the memory manager

Definition at line 1834 of file MemoryManager.f90.

1835  integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint !< returned copy of 2d integer array
1836  character(len=*), intent(in) :: name !< variable name
1837  character(len=*), intent(in) :: mem_path !< path where variable is stored
1838  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1839  !! if passed then the copy is added to the
1840  !! memory manager
1841  ! -- local
1842  type(MemoryType), pointer :: mt
1843  logical(LGP) :: found
1844  integer(I4B) :: i
1845  integer(I4B) :: j
1846  integer(I4B) :: ncol
1847  integer(I4B) :: nrow
1848  ! -- code
1849  call get_from_memorystore(name, mem_path, mt, found)
1850  aint => null()
1851  ncol = size(mt%aint2d, dim=1)
1852  nrow = size(mt%aint2d, dim=2)
1853  ! -- check the copy into the memory manager
1854  if (present(mem_path_copy)) then
1855  call allocate_int2d(aint, ncol, nrow, mt%name, mem_path_copy)
1856  ! -- create a local copy
1857  else
1858  allocate (aint(ncol, nrow))
1859  end if
1860  do i = 1, nrow
1861  do j = 1, ncol
1862  aint(j, i) = mt%aint2d(j, i)
1863  end do
1864  end do
Here is the call graph for this function:

◆ copyptr_logical1d()

subroutine memorymanagermodule::mem_copyptr::copyptr_logical1d ( logical(lgp), dimension(:), intent(inout), pointer, contiguous  alog,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in), optional  mem_path_copy 
)
private
Parameters
[in,out]alogreturned copy of 1d logical array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]mem_path_copyoptional path where the copy will be stored, if passed then the copy is added to the memory manager

Definition at line 1778 of file MemoryManager.f90.

1779  logical(LGP), dimension(:), pointer, contiguous, intent(inout) :: alog !< returned copy of 1d logical array
1780  character(len=*), intent(in) :: name !< variable name
1781  character(len=*), intent(in) :: mem_path !< path where variable is stored
1782  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1783  !! if passed then the copy is added to the
1784  !! memory manager
1785  ! -- local
1786  type(MemoryType), pointer :: mt
1787  logical(LGP) :: found
1788  integer(I4B) :: n
1789  ! -- code
1790  call get_from_memorystore(name, mem_path, mt, found)
1791  alog => null()
1792  ! -- check the copy into the memory manager
1793  if (present(mem_path_copy)) then
1794  call allocate_logical1d(alog, size(mt%alogical1d), mt%name, mem_path_copy)
1795  ! -- create a local copy
1796  else
1797  allocate (alog(size(mt%alogical1d)))
1798  end if
1799  do n = 1, size(mt%alogical1d)
1800  alog(n) = mt%alogical1d(n)
1801  end do
Here is the call graph for this function:

The documentation for this interface was generated from the following file: