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

Private Member Functions

subroutine reassignptr_int (sclr, name, mem_path, name_target, mem_path_target)
 Set the pointer for an integer scalar to. More...
 
subroutine reassignptr_int1d (aint, name, mem_path, name_target, mem_path_target)
 Set the pointer for a 1-dimensional integer array to. More...
 
subroutine reassignptr_int2d (aint, name, mem_path, name_target, mem_path_target)
 Set the pointer for a 2-dimensional integer array to. More...
 
subroutine reassignptr_dbl1d (adbl, name, mem_path, name_target, mem_path_target)
 Set the pointer for a 1-dimensional real array to. More...
 
subroutine reassignptr_dbl2d (adbl, name, mem_path, name_target, mem_path_target)
 Set the pointer for a 2-dimensional real array to. More...
 

Detailed Description

Definition at line 113 of file MemoryManager.f90.

Member Function/Subroutine Documentation

◆ reassignptr_dbl1d()

subroutine memorymanagermodule::mem_reassignptr::reassignptr_dbl1d ( real(dp), dimension(:), intent(inout), pointer, contiguous  adbl,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in)  name_target,
character(len=*), intent(in)  mem_path_target 
)
private
Parameters
[in,out]adblpointer to 1d real array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]name_targetname of target variable
[in]mem_path_targetpath where target variable is stored

Definition at line 1857 of file MemoryManager.f90.

1858  real(DP), dimension(:), pointer, contiguous, intent(inout) :: adbl !< pointer to 1d real array
1859  character(len=*), intent(in) :: name !< variable name
1860  character(len=*), intent(in) :: mem_path !< path where variable is stored
1861  character(len=*), intent(in) :: name_target !< name of target variable
1862  character(len=*), intent(in) :: mem_path_target !< path where target variable is stored
1863  ! -- local
1864  type(MemoryType), pointer :: mt
1865  type(MemoryType), pointer :: mt2
1866  logical(LGP) :: found
1867  ! -- code
1868  call get_from_memorystore(name, mem_path, mt, found)
1869  call get_from_memorystore(name_target, mem_path_target, mt2, found)
1870  if (size(adbl) > 0) then
1871  nvalues_adbl = nvalues_adbl - size(adbl)
1872  deallocate (adbl)
1873  end if
1874  adbl => mt2%adbl1d
1875  mt%adbl1d => adbl
1876  mt%element_size = dp
1877  mt%isize = size(adbl)
1878  write (mt%memtype, "(a,' (',i0,')')") 'DOUBLE', mt%isize
1879  !
1880  ! -- set master information
1881  mt%master = .false.
1882  mt%mastername = name_target
1883  mt%masterPath = mem_path_target
Here is the call graph for this function:

◆ reassignptr_dbl2d()

subroutine memorymanagermodule::mem_reassignptr::reassignptr_dbl2d ( real(dp), dimension(:, :), intent(inout), pointer, contiguous  adbl,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in)  name_target,
character(len=*), intent(in)  mem_path_target 
)
private
Parameters
[in,out]adblpointer to 2d real array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]name_targetname of target variable
[in]mem_path_targetpath where target variable is stored

Definition at line 1888 of file MemoryManager.f90.

1889  real(DP), dimension(:, :), pointer, contiguous, intent(inout) :: adbl !< pointer to 2d real array
1890  character(len=*), intent(in) :: name !< variable name
1891  character(len=*), intent(in) :: mem_path !< path where variable is stored
1892  character(len=*), intent(in) :: name_target !< name of target variable
1893  character(len=*), intent(in) :: mem_path_target !< path where target variable is stored
1894  ! -- local
1895  type(MemoryType), pointer :: mt
1896  type(MemoryType), pointer :: mt2
1897  logical(LGP) :: found
1898  integer(I4B) :: ncol
1899  integer(I4b) :: nrow
1900  ! -- code
1901  call get_from_memorystore(name, mem_path, mt, found)
1902  call get_from_memorystore(name_target, mem_path_target, mt2, found)
1903  if (size(adbl) > 0) then
1904  nvalues_adbl = nvalues_adbl - size(adbl)
1905  deallocate (adbl)
1906  end if
1907  adbl => mt2%adbl2d
1908  mt%adbl2d => adbl
1909  mt%element_size = dp
1910  mt%isize = size(adbl)
1911  ncol = size(adbl, dim=1)
1912  nrow = size(adbl, dim=2)
1913  write (mt%memtype, "(a,' (',i0,',',i0,')')") 'DOUBLE', ncol, nrow
1914  !
1915  ! -- set master information
1916  mt%master = .false.
1917  mt%mastername = name_target
1918  mt%masterPath = mem_path_target
Here is the call graph for this function:

◆ reassignptr_int()

subroutine memorymanagermodule::mem_reassignptr::reassignptr_int ( integer(i4b), intent(inout), pointer  sclr,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in)  name_target,
character(len=*), intent(in)  mem_path_target 
)
private
Parameters
[in,out]sclrpointer to integer scalar
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]name_targetname of target variable
[in]mem_path_targetpath where target variable is stored

Definition at line 1760 of file MemoryManager.f90.

1761  integer(I4B), pointer, intent(inout) :: sclr !< pointer to integer scalar
1762  character(len=*), intent(in) :: name !< variable name
1763  character(len=*), intent(in) :: mem_path !< path where variable is stored
1764  character(len=*), intent(in) :: name_target !< name of target variable
1765  character(len=*), intent(in) :: mem_path_target !< path where target variable is stored
1766  ! -- local
1767  type(MemoryType), pointer :: mt
1768  type(MemoryType), pointer :: mt2
1769  logical(LGP) :: found
1770  ! -- code
1771  call get_from_memorystore(name, mem_path, mt, found)
1772  call get_from_memorystore(name_target, mem_path_target, mt2, found)
1773  if (associated(sclr)) then
1774  nvalues_aint = nvalues_aint - 1
1775  deallocate (sclr)
1776  end if
1777  sclr => mt2%intsclr
1778  mt%intsclr => sclr
1779  mt%element_size = i4b
1780  mt%isize = 1
1781  write (mt%memtype, "(a,' (',i0,')')") 'INTEGER', mt%isize
1782  !
1783  ! -- set master information
1784  mt%master = .false.
1785  mt%mastername = name_target
1786  mt%masterPath = mem_path_target
Here is the call graph for this function:

◆ reassignptr_int1d()

subroutine memorymanagermodule::mem_reassignptr::reassignptr_int1d ( integer(i4b), dimension(:), intent(inout), pointer, contiguous  aint,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in)  name_target,
character(len=*), intent(in)  mem_path_target 
)
private
Parameters
[in,out]aintpointer to 1d integer array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]name_targetname of target variable
[in]mem_path_targetpath where target variable is stored

Definition at line 1791 of file MemoryManager.f90.

1792  integer(I4B), dimension(:), pointer, contiguous, intent(inout) :: aint !< pointer to 1d integer array
1793  character(len=*), intent(in) :: name !< variable name
1794  character(len=*), intent(in) :: mem_path !< path where variable is stored
1795  character(len=*), intent(in) :: name_target !< name of target variable
1796  character(len=*), intent(in) :: mem_path_target !< path where target variable is stored
1797  ! -- local
1798  type(MemoryType), pointer :: mt
1799  type(MemoryType), pointer :: mt2
1800  logical(LGP) :: found
1801  ! -- code
1802  call get_from_memorystore(name, mem_path, mt, found)
1803  call get_from_memorystore(name_target, mem_path_target, mt2, found)
1804  if (size(aint) > 0) then
1805  nvalues_aint = nvalues_aint - size(aint)
1806  deallocate (aint)
1807  end if
1808  aint => mt2%aint1d
1809  mt%aint1d => aint
1810  mt%element_size = i4b
1811  mt%isize = size(aint)
1812  write (mt%memtype, "(a,' (',i0,')')") 'INTEGER', mt%isize
1813  !
1814  ! -- set master information
1815  mt%master = .false.
1816  mt%mastername = name_target
1817  mt%masterPath = mem_path_target
Here is the call graph for this function:

◆ reassignptr_int2d()

subroutine memorymanagermodule::mem_reassignptr::reassignptr_int2d ( integer(i4b), dimension(:, :), intent(inout), pointer, contiguous  aint,
character(len=*), intent(in)  name,
character(len=*), intent(in)  mem_path,
character(len=*), intent(in)  name_target,
character(len=*), intent(in)  mem_path_target 
)
private
Parameters
[in,out]aintpointer to 2d integer array
[in]namevariable name
[in]mem_pathpath where variable is stored
[in]name_targetname of target variable
[in]mem_path_targetpath where target variable is stored

Definition at line 1822 of file MemoryManager.f90.

1823  integer(I4B), dimension(:, :), pointer, contiguous, intent(inout) :: aint !< pointer to 2d integer array
1824  character(len=*), intent(in) :: name !< variable name
1825  character(len=*), intent(in) :: mem_path !< path where variable is stored
1826  character(len=*), intent(in) :: name_target !< name of target variable
1827  character(len=*), intent(in) :: mem_path_target !< path where target variable is stored
1828  ! -- local
1829  type(MemoryType), pointer :: mt
1830  type(MemoryType), pointer :: mt2
1831  logical(LGP) :: found
1832  integer(I4B) :: ncol
1833  integer(I4B) :: nrow
1834  ! -- code
1835  call get_from_memorystore(name, mem_path, mt, found)
1836  call get_from_memorystore(name_target, mem_path_target, mt2, found)
1837  if (size(aint) > 0) then
1838  nvalues_aint = nvalues_aint - size(aint)
1839  deallocate (aint)
1840  end if
1841  aint => mt2%aint2d
1842  mt%aint2d => aint
1843  mt%element_size = i4b
1844  mt%isize = size(aint)
1845  ncol = size(aint, dim=1)
1846  nrow = size(aint, dim=2)
1847  write (mt%memtype, "(a,' (',i0,',',i0,')')") 'INTEGER', ncol, nrow
1848  !
1849  ! -- set master information
1850  mt%master = .false.
1851  mt%mastername = name_target
1852  mt%masterPath = mem_path_target
Here is the call graph for this function:

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