MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
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 104 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 1818 of file MemoryManager.f90.

1819  real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl !< returned copy of 1d real array
1820  character(len=*), intent(in) :: name !< variable name
1821  character(len=*), intent(in) :: mem_path !< path where variable is stored
1822  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1823  !! if passed then the copy is added to the
1824  !! memory manager
1825  ! -- local
1826  type(MemoryType), pointer :: mt
1827  logical(LGP) :: found
1828  integer(I4B) :: n
1829  ! -- code
1830  call get_from_memorylist(name, mem_path, mt, found)
1831  adbl => null()
1832  ! -- check the copy into the memory manager
1833  if (present(mem_path_copy)) then
1834  call allocate_dbl1d(adbl, size(mt%adbl1d), mt%name, mem_path_copy)
1835  ! -- create a local copy
1836  else
1837  allocate (adbl(size(mt%adbl1d)))
1838  end if
1839  do n = 1, size(mt%adbl1d)
1840  adbl(n) = mt%adbl1d(n)
1841  end do
1842  !
1843  ! -- return
1844  return
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 1849 of file MemoryManager.f90.

1850  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl !< returned copy of 2d real array
1851  character(len=*), intent(in) :: name !< variable name
1852  character(len=*), intent(in) :: mem_path !< path where variable is stored
1853  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1854  !! if passed then the copy is added to the
1855  !! memory manager
1856  ! -- local
1857  type(MemoryType), pointer :: mt
1858  logical(LGP) :: found
1859  integer(I4B) :: i
1860  integer(I4B) :: j
1861  integer(I4B) :: ncol
1862  integer(I4B) :: nrow
1863  ! -- code
1864  call get_from_memorylist(name, mem_path, mt, found)
1865  adbl => null()
1866  ncol = size(mt%adbl2d, dim=1)
1867  nrow = size(mt%adbl2d, dim=2)
1868  ! -- check the copy into the memory manager
1869  if (present(mem_path_copy)) then
1870  call allocate_dbl2d(adbl, ncol, nrow, mt%name, mem_path_copy)
1871  ! -- create a local copy
1872  else
1873  allocate (adbl(ncol, nrow))
1874  end if
1875  do i = 1, nrow
1876  do j = 1, ncol
1877  adbl(j, i) = mt%adbl2d(j, i)
1878  end do
1879  end do
1880  !
1881  ! -- return
1882  return
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 1749 of file MemoryManager.f90.

1750  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint !< returned copy of 1d integer array
1751  character(len=*), intent(in) :: name !< variable name
1752  character(len=*), intent(in) :: mem_path !< path where variable is stored
1753  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1754  !! if passed then the copy is added to the
1755  !! memory manager
1756  ! -- local
1757  type(MemoryType), pointer :: mt
1758  logical(LGP) :: found
1759  integer(I4B) :: n
1760  ! -- code
1761  call get_from_memorylist(name, mem_path, mt, found)
1762  aint => null()
1763  ! -- check the copy into the memory manager
1764  if (present(mem_path_copy)) then
1765  call allocate_int1d(aint, size(mt%aint1d), mt%name, mem_path_copy)
1766  ! -- create a local copy
1767  else
1768  allocate (aint(size(mt%aint1d)))
1769  end if
1770  do n = 1, size(mt%aint1d)
1771  aint(n) = mt%aint1d(n)
1772  end do
1773  !
1774  ! -- return
1775  return
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 1780 of file MemoryManager.f90.

1781  integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint !< returned copy of 2d integer array
1782  character(len=*), intent(in) :: name !< variable name
1783  character(len=*), intent(in) :: mem_path !< path where variable is stored
1784  character(len=*), intent(in), optional :: mem_path_copy !< optional path where the copy will be stored,
1785  !! if passed then the copy is added to the
1786  !! memory manager
1787  ! -- local
1788  type(MemoryType), pointer :: mt
1789  logical(LGP) :: found
1790  integer(I4B) :: i
1791  integer(I4B) :: j
1792  integer(I4B) :: ncol
1793  integer(I4B) :: nrow
1794  ! -- code
1795  call get_from_memorylist(name, mem_path, mt, found)
1796  aint => null()
1797  ncol = size(mt%aint2d, dim=1)
1798  nrow = size(mt%aint2d, dim=2)
1799  ! -- check the copy into the memory manager
1800  if (present(mem_path_copy)) then
1801  call allocate_int2d(aint, ncol, nrow, mt%name, mem_path_copy)
1802  ! -- create a local copy
1803  else
1804  allocate (aint(ncol, nrow))
1805  end if
1806  do i = 1, nrow
1807  do j = 1, ncol
1808  aint(j, i) = mt%aint2d(j, i)
1809  end do
1810  end do
1811  !
1812  ! -- return
1813  return
Here is the call graph for this function:

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