MODFLOW 6  version 6.9.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 1870 of file MemoryManager.f90.

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

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

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

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

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

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