Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(MemoryManager): add reassign_ptr function and clean up #92

Merged
merged 24 commits into from
Feb 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
aca7d35
refactor(pre-commit.py): use OrderdedDict to load and write code.json
langevin-usgs Oct 14, 2018
a665ae5
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Oct 14, 2018
5b03530
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Oct 15, 2018
773e098
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Oct 16, 2018
cffd502
fix(GwfGwfExchangeModule): specific discharge not updated correctly f…
langevin-usgs Oct 30, 2018
b16dd88
fix(GwfGwfExchangeModule): specific discharge not updated correctly f…
langevin-usgs Oct 30, 2018
75325a4
Merge commit 'cfe6e02f35876961c68a88e00f07565002be2317' into develop
langevin-usgs Oct 31, 2018
b9c58f3
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Nov 9, 2018
e320602
docs(mf6ivar): readme.md needed a description of the valid keyword
langevin-usgs Nov 10, 2018
5699dd2
Corrected misspelling of execution in the release notes.
langevin-usgs Dec 10, 2018
ad3de27
Merge remote-tracking branch 'upstream/develop' into develop
langevin-usgs Dec 23, 2018
9000d56
Merge remote-tracking branch 'upstream/develop' into develop
langevin-usgs Dec 28, 2018
573396b
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Jan 7, 2019
798acae
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Jan 8, 2019
3326270
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Jan 31, 2019
e73d1a1
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Feb 7, 2019
bc0cce4
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Feb 11, 2019
2fb504c
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Feb 11, 2019
a011cc4
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Feb 13, 2019
a6fa57e
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Feb 13, 2019
e05169a
Merge branch 'develop' of https://github.com/MODFLOW-USGS/modflow6 in…
langevin-usgs Feb 14, 2019
adfed70
refactor(MemoryManager): add reassign_ptr function and clean up memor…
langevin-usgs Feb 15, 2019
5e0a825
Completed the mem_reassignptr routines so there are versions for int1…
langevin-usgs Feb 15, 2019
c0ef6c4
Adding optional name and origin arguments to the other array dealloca…
langevin-usgs Feb 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Automated Testing Status on Travis-CI

### Version 6.0.3 develop — build 65
### Version 6.0.3 develop — build 70
[![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6)

## Introduction
Expand All @@ -31,7 +31,7 @@ MODFLOW 6 is the latest core version of MODFLOW. It synthesizes many of the capa

#### ***Software/Code citation for MODFLOW 6:***

[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2019, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 13 February 2019, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV)
[Langevin, C.D., Hughes, J.D., Banta, E.R., Provost, A.M., Niswonger, R.G., and Panday, Sorab, 2019, MODFLOW 6 Modular Hydrologic Model version 6.0.3 — develop: U.S. Geological Survey Software Release, 15 February 2019, https://doi.org/10.5066/F76Q1VQV](https://doi.org/10.5066/F76Q1VQV)

## Instructions for building definition files for new packages

Expand Down
4 changes: 2 additions & 2 deletions code.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"email": "langevin@usgs.gov"
},
"laborHours": -1,
"version": "6.0.3.65",
"version": "6.0.3.70",
"date": {
"metadataLastUpdated": "2019-02-13"
"metadataLastUpdated": "2019-02-15"
},
"organization": "U.S. Geological Survey",
"permissions": {
Expand Down
4 changes: 2 additions & 2 deletions doc/version.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\newcommand{\modflowversion}{mf6.0.3.65}
\newcommand{\modflowdate}{February 13, 2019}
\newcommand{\modflowversion}{mf6.0.3.70}
\newcommand{\modflowdate}{February 15, 2019}
\newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate}
11 changes: 7 additions & 4 deletions src/Model/GroundWaterFlow/gwf3npf8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ subroutine npf_fn(this, kiter, nodes, nja, njasln, amat, idxglo, rhs, hnew)
integer(I4B) :: isymcon, idiagm
integer(I4B) :: iups
integer(I4B) :: idn
real(DP) :: athk
real(DP) :: cond
real(DP) :: consterm
real(DP) :: filledterm
Expand Down Expand Up @@ -938,8 +937,8 @@ subroutine npf_da(this)
! -- Deallocate arrays
call mem_deallocate(this%icelltype)
call mem_deallocate(this%k11)
call mem_deallocate(this%k22)
call mem_deallocate(this%k33)
call mem_deallocate(this%k22, 'K22', this%origin)
call mem_deallocate(this%k33, 'K33', this%origin)
call mem_deallocate(this%sat)
call mem_deallocate(this%condsat)
call mem_deallocate(this%wetdry)
Expand Down Expand Up @@ -1461,7 +1460,7 @@ subroutine read_data(this)
! ------------------------------------------------------------------------------
! -- modules
use ConstantsModule, only: LINELENGTH, DONE, DPIO180
use MemoryManagerModule, only: mem_reallocate
use MemoryManagerModule, only: mem_reallocate, mem_reassignptr
use SimModule, only: ustop, store_error, count_errors
! -- dummy
class(GwfNpftype) :: this
Expand Down Expand Up @@ -1604,6 +1603,8 @@ subroutine read_data(this)
! -- Check for K33
if(.not. lname(3)) then
write(this%iout, '(1x, a)') 'K33 not provided. Assuming K33 = K.'
call mem_reassignptr(this%k33, 'K33', trim(this%origin), &
'K11', trim(this%origin))
else
nerr = 0
do n = 1, size(this%k33)
Expand All @@ -1626,6 +1627,8 @@ subroutine read_data(this)
! -- Check for K22
if(.not. lname(4)) then
write(this%iout, '(1x, a)') 'K22 not provided. Assuming K22 = K.'
call mem_reassignptr(this%k22, 'K22', trim(this%origin), &
'K11', trim(this%origin))
else
! -- Check to make sure that angles are available
if(this%dis%con%ianglex == 0) then
Expand Down
10 changes: 5 additions & 5 deletions src/Model/ModelUtilities/BoundaryPackage.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,11 @@ subroutine allocate_arrays(this, nodelist, auxvar)
end do

do i = 1, this%maxbound
this%hcof(i) = DZERO
this%rhs(i) = DZERO
if(this%inamedbound==1) then
this%boundname(i) = ''
end if
this%hcof(i) = DZERO
this%rhs(i) = DZERO
if(this%inamedbound==1) then
this%boundname(i) = ''
end if
end do
if(this%inamedbound /= 1) this%boundname(1) = ''
!
Expand Down
1 change: 1 addition & 0 deletions src/Solution/SparseMatrixSolver/ims8linear.f90
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ subroutine IMSLINEAR_DA(this)
call mem_deallocate(this%niapc)
call mem_deallocate(this%njapc)
call mem_deallocate(this%hclose)
call mem_deallocate(this%rclose)
call mem_deallocate(this%relax)
call mem_deallocate(this%epfact)
call mem_deallocate(this%l2norm0)
Expand Down
13 changes: 9 additions & 4 deletions src/Utilities/Memory/Memory.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ module MemoryTypeModule
character(len=50) :: memtype !type (INTEGER or DOUBLE)
integer(I4B) :: id !id, not used
integer(I4B) :: nrealloc = 0 !number of times reallocated
integer(I4B) :: isize !size of the array
integer(I4B) :: isize !size of the array
logical :: master = .true. !master copy, others point to this one
logical, pointer :: logicalsclr => null() !pointer to the logical
integer(I4B), pointer :: intsclr => null() !pointer to the integer
real(DP), pointer :: dblsclr => null() !pointer to the double
Expand All @@ -37,14 +38,18 @@ module MemoryTypeModule
subroutine table_entry(this, msg)
class(MemoryType) :: this
character(len=*), intent(inout) :: msg
character(len=*), parameter :: fmt = "(1x, a40, a20, a20, i10, i10, a2)"
character(len=*), parameter :: &
fmt = "(1x, a40, a20, a20, i10, i10, a10, a2)"
character(len=1) :: cptr
character(len=1) :: dastr
!
! -- Create the msg table entry
! -- Create the msg table entry
cptr = ''
if (.not. this%master) cptr = 'T'
dastr = ''
if (this%mt_associated() .and. this%isize > 0) dastr='*'
write(msg, fmt) this%origin, this%name, this%memtype, this%isize, &
this%nrealloc, dastr
this%nrealloc, cptr, dastr
end subroutine table_entry

function mt_associated(this) result(al)
Expand Down
Loading