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 1862 of file MemoryManager.f90.

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

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

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

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

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

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