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

Private Member Functions

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

1681  real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl !< returned copy of 1d real array
1682  character(len=*), intent(in) :: name !< variable name
1683  character(len=*), intent(in) :: mem_path !< path where variable is stored
1684  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1685  !! if passed then the copy is added to the
1686  !! memory manager
1687  ! -- local
1688  type(MemoryType), pointer :: mt
1689  logical(LGP) :: found
1690  integer(I4B) :: n
1691  ! -- code
1692  call get_from_memorystore(name, mem_path, mt, found)
1693  adbl => null()
1694  ! -- check the copy into the memory manager
1695  if (present(mem_path_copy)) then
1696  call allocate_dbl1d(adbl, size(mt%adbl1d), mt%name, mem_path_copy)
1697  ! -- create a local copy
1698  else
1699  allocate (adbl(size(mt%adbl1d)))
1700  end if
1701  do n = 1, size(mt%adbl1d)
1702  adbl(n) = mt%adbl1d(n)
1703  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 1708 of file MemoryManager.f90.

1709  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl !< returned copy of 2d real array
1710  character(len=*), intent(in) :: name !< variable name
1711  character(len=*), intent(in) :: mem_path !< path where variable is stored
1712  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1713  !! if passed then the copy is added to the
1714  !! memory manager
1715  ! -- local
1716  type(MemoryType), pointer :: mt
1717  logical(LGP) :: found
1718  integer(I4B) :: i
1719  integer(I4B) :: j
1720  integer(I4B) :: ncol
1721  integer(I4B) :: nrow
1722  ! -- code
1723  call get_from_memorystore(name, mem_path, mt, found)
1724  adbl => null()
1725  ncol = size(mt%adbl2d, dim=1)
1726  nrow = size(mt%adbl2d, dim=2)
1727  ! -- check the copy into the memory manager
1728  if (present(mem_path_copy)) then
1729  call allocate_dbl2d(adbl, ncol, nrow, mt%name, mem_path_copy)
1730  ! -- create a local copy
1731  else
1732  allocate (adbl(ncol, nrow))
1733  end if
1734  do i = 1, nrow
1735  do j = 1, ncol
1736  adbl(j, i) = mt%adbl2d(j, i)
1737  end do
1738  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 1617 of file MemoryManager.f90.

1618  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint !< returned copy of 1d integer array
1619  character(len=*), intent(in) :: name !< variable name
1620  character(len=*), intent(in) :: mem_path !< path where variable is stored
1621  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1622  !! if passed then the copy is added to the
1623  !! memory manager
1624  ! -- local
1625  type(MemoryType), pointer :: mt
1626  logical(LGP) :: found
1627  integer(I4B) :: n
1628  ! -- code
1629  call get_from_memorystore(name, mem_path, mt, found)
1630  aint => null()
1631  ! -- check the copy into the memory manager
1632  if (present(mem_path_copy)) then
1633  call allocate_int1d(aint, size(mt%aint1d), mt%name, mem_path_copy)
1634  ! -- create a local copy
1635  else
1636  allocate (aint(size(mt%aint1d)))
1637  end if
1638  do n = 1, size(mt%aint1d)
1639  aint(n) = mt%aint1d(n)
1640  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 1645 of file MemoryManager.f90.

1646  integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint !< returned copy of 2d integer array
1647  character(len=*), intent(in) :: name !< variable name
1648  character(len=*), intent(in) :: mem_path !< path where variable is stored
1649  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1650  !! if passed then the copy is added to the
1651  !! memory manager
1652  ! -- local
1653  type(MemoryType), pointer :: mt
1654  logical(LGP) :: found
1655  integer(I4B) :: i
1656  integer(I4B) :: j
1657  integer(I4B) :: ncol
1658  integer(I4B) :: nrow
1659  ! -- code
1660  call get_from_memorystore(name, mem_path, mt, found)
1661  aint => null()
1662  ncol = size(mt%aint2d, dim=1)
1663  nrow = size(mt%aint2d, dim=2)
1664  ! -- check the copy into the memory manager
1665  if (present(mem_path_copy)) then
1666  call allocate_int2d(aint, ncol, nrow, mt%name, mem_path_copy)
1667  ! -- create a local copy
1668  else
1669  allocate (aint(ncol, nrow))
1670  end if
1671  do i = 1, nrow
1672  do j = 1, ncol
1673  aint(j, i) = mt%aint2d(j, i)
1674  end do
1675  end do
Here is the call graph for this function:

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