Skip to content

Commit

Permalink
update default value for lunrpt and lunerr
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Aug 3, 2024
1 parent 734c320 commit 3471b1e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
20 changes: 16 additions & 4 deletions c/odrpack_capi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,15 @@ subroutine odr_medium_c( &
integer(c_int), intent(in), optional :: iprint
!! Print control variable.
integer(c_int), intent(in), optional :: lunerr
!! Logical unit number for error messages.
!! Logical unit number for error messages. Available options are:
!! 0 => no output.
!! 6 => output to standard error.
!! other => output to logical unit number `lunerr`.
integer(c_int), intent(in), optional :: lunrpt
!! Logical unit number for computation reports.
!! Logical unit number for computation reports. Available options are:
!! 0 => no output.
!! 6 => output to standard error.
!! other => output to logical unit number `lunrpt`.
integer(c_int), intent(out), optional :: info
!! Logical unit number for computation reports.

Expand Down Expand Up @@ -348,9 +354,15 @@ subroutine odr_long_c( &
integer(c_int), intent(in), optional :: iprint
!! Print control variable.
integer(c_int), intent(in), optional :: lunerr
!! Logical unit number for error messages.
!! Logical unit number for error messages. Available options are:
!! 0 => no output.
!! 6 => output to standard error.
!! other => output to logical unit number `lunerr`.
integer(c_int), intent(in), optional :: lunrpt
!! Logical unit number for computation reports.
!! Logical unit number for computation reports. Available options are:
!! 0 => no output.
!! 6 => output to standard error.
!! other => output to logical unit number `lunrpt`.
integer(c_int), intent(out), optional :: info
!! Variable designating why the computations were stopped.

Expand Down
Binary file modified original/Doc/guide.pdf
Binary file not shown.
18 changes: 12 additions & 6 deletions src/odrpack.f90
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,15 @@ impure subroutine odr &
integer, intent(in), optional :: iprint
!! Print control variable.
integer, intent(in), optional :: lunerr
!! Logical unit number for error messages.
!! Logical unit number for error messages. Available options are:
!! 0 => no output.
!! 6 => output to standard error.
!! other => output to logical unit number `lunerr`.
integer, intent(in), optional :: lunrpt
!! Logical unit number for computation reports.
!! Logical unit number for computation reports. Available options are:
!! 0 => no output.
!! 6 => output to standard error.
!! other => output to logical unit number `lunrpt`.
real(wp), intent(in), optional :: stpb(:)
!! Relative step for computing finite difference derivatives with respect to `beta`.
!! `Shape: (np)`.
Expand Down Expand Up @@ -176,8 +182,8 @@ impure subroutine odr &
ldscld = 1
ldstpd = 1
iprint_ = -1
lunerr_ = 0
lunrpt_ = 0
lunerr_ = 6
lunrpt_ = 6
maxit_ = -1
ndigit_ = -1
partol_ = negone
Expand All @@ -194,14 +200,14 @@ impure subroutine odr &
if (present(lunrpt)) then
lunrpt_ = lunrpt
end if
if (lunrpt_ == 0) then
if (lunrpt_ == 6) then
lunrpt_ = output_unit
end if

if (present(lunerr)) then
lunerr_ = lunerr
end if
if (lunerr_ == 0) then
if (lunerr_ == 6) then
lunerr_ = error_unit
end if

Expand Down

0 comments on commit 3471b1e

Please sign in to comment.