MODFLOW 6  version 6.7.0.dev3
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 109 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 1861 of file MemoryManager.f90.

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

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

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

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

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

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