Set flags indicating conditions specified by job
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | job |
Variable controlling problem initialization and computational method. |
||
logical, | intent(out) | :: | restart |
Variable designating whether the call is a restart ( |
||
logical, | intent(out) | :: | initd |
Variable designating whether |
||
logical, | intent(out) | :: | dovcv |
Variable designating whether the covariance matrix is to be computed ( |
||
logical, | intent(out) | :: | redoj |
Variable designating whether the Jacobian matrix is to be recomputed for the
computation of the covariance matrix ( |
||
logical, | intent(out) | :: | anajac |
Variable designating whether the Jacobians are computed by finite differences
( |
||
logical, | intent(out) | :: | cdjac |
Variable designating whether the Jacobians are computed by central differences
( |
||
logical, | intent(out) | :: | chkjac |
Variable designating whether the user-supplied Jacobians are to be checked
( |
||
logical, | intent(out) | :: | isodr |
Variable designating whether the solution is by ODR ( |
||
logical, | intent(out) | :: | implicit |
Variable designating whether the solution is by implicit ODR ( |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | j |
pure subroutine set_flags( & job, restart, initd, dovcv, redoj, anajac, cdjac, chkjac, isodr, implicit) !! Set flags indicating conditions specified by `job`. integer, intent(in) :: job !! Variable controlling problem initialization and computational method. logical, intent(out) :: restart !! Variable designating whether the call is a restart (`.true.`) or not (`.false.`). logical, intent(out) :: initd !! Variable designating whether `delta` is to be initialized to zero (`.true.`) !! or to the first `n` by `m` elements of array `rwork` (`.false.`). logical, intent(out) :: dovcv !! Variable designating whether the covariance matrix is to be computed (`.true.`) !! or not (`.false.`). logical, intent(out) :: redoj !! Variable designating whether the Jacobian matrix is to be recomputed for the !! computation of the covariance matrix (`.true.`) or not (`.false.`). logical, intent(out) :: anajac !! Variable designating whether the Jacobians are computed by finite differences !! (`.false.`) or not (`.true.`). logical, intent(out) :: cdjac !! Variable designating whether the Jacobians are computed by central differences !! (`.true.`) or by forward differences (`.false.`). logical, intent(out) :: chkjac !! Variable designating whether the user-supplied Jacobians are to be checked !! (`.true.`) or not (`.false.`). logical, intent(out) :: isodr !! Variable designating whether the solution is by ODR (`.true.`) or by OLS (`.false.`). logical, intent(out) :: implicit !! Variable designating whether the solution is by implicit ODR (`.true.`) !! or explicit ODR (`.false.`). ! Local scalars integer :: j ! Variable Definitions (alphabetically) ! J: The value of a specific digit of JOB. if (job >= 0) then restart = job >= 10000 initd = mod(job, 10000)/1000 == 0 j = mod(job, 1000)/100 if (j == 0) then dovcv = .true. redoj = .true. elseif (j == 1) then dovcv = .true. redoj = .false. else dovcv = .false. redoj = .false. end if j = mod(job, 100)/10 if (j == 0) then anajac = .false. cdjac = .false. chkjac = .false. elseif (j == 1) then anajac = .false. cdjac = .true. chkjac = .false. elseif (j == 2) then anajac = .true. cdjac = .false. chkjac = .true. else anajac = .true. cdjac = .false. chkjac = .false. end if j = mod(job, 10) if (j == 0) then isodr = .true. implicit = .false. elseif (j == 1) then isodr = .true. implicit = .true. else isodr = .false. implicit = .false. end if else restart = .false. initd = .true. dovcv = .true. redoj = .true. anajac = .false. cdjac = .false. chkjac = .false. isodr = .true. implicit = .false. end if end subroutine set_flags