MODFLOW 6  version 6.7.0.dev1
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 1686 of file MemoryManager.f90.

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

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

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

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

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