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

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

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

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

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

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