Skip to content

Commit

Permalink
Revert "Ignore max_allowed_nz if ≤ 0 (#642)" (#643)
Browse files Browse the repository at this point in the history
This reverts commit f6b400f.
  • Loading branch information
mjoyceGR committed Apr 18, 2024
1 parent f6b400f commit d259949
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Backwards-incompatible changes
New Features
------------

``max_allowed_nz`` is now ignored if the value is less than or equal to zero.


.. _Bug Fixes main:

Expand Down
1 change: 0 additions & 1 deletion star/defaults/controls.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5597,7 +5597,6 @@
! ~~~~~~~~~~~~~~

! Maximum number of grid points allowed.
! Array allowed to grow arbitrarily large if max_allowed_nz <= 0

! ::

Expand Down
4 changes: 2 additions & 2 deletions star/private/mesh_plan.f90
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ subroutine split1(k, ierr)
if (ierr /= 0) return
end if
nz_new = nz_new + 1
if (max_allowed_nz > 0 .and. nz_new > max_allowed_nz) then
if (nz_new > max_allowed_nz) then
write(*,*) 'tried to increase number of mesh points beyond max allowed nz', max_allowed_nz
ierr = -1
return
Expand Down Expand Up @@ -868,7 +868,7 @@ subroutine pick_new_points(s, ierr)
dq_sum = sum(dq_new(1:k_new))

k_new = k_new + 1
if (max_allowed_nz > 0 .and. k_new > max_allowed_nz) then
if (k_new > max_allowed_nz) then
write(*,*) 'tried to increase number of mesh points beyond max allowed nz', max_allowed_nz
ierr = -1
return
Expand Down

0 comments on commit d259949

Please sign in to comment.