MODFLOW 6  version 6.7.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 1859 of file MemoryManager.f90.

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

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

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

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

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

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