set_flags Subroutine

public pure subroutine set_flags(job, restart, initd, dovcv, redoj, anajac, cdjac, chkjac, isodr, implicit)

Set flags indicating conditions specified by job.

Arguments

Type IntentOptional 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 (.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.).


Called by

proc~~set_flags~~CalledByGraph proc~set_flags set_flags proc~init_work init_work proc~init_work->proc~set_flags proc~odr odr proc~odr->proc~set_flags proc~odr->proc~init_work proc~print_reports print_reports proc~odr->proc~print_reports proc~print_reports->proc~set_flags proc~odr_long_c odr_long_c proc~odr_long_c->proc~odr proc~odr_medium_c odr_medium_c proc~odr_medium_c->proc~odr proc~odr_short_c odr_short_c proc~odr_short_c->proc~odr program~example1 example1 program~example1->proc~odr program~example2 example2 program~example2->proc~odr program~example3 example3 program~example3->proc~odr program~example4 example4 program~example4->proc~odr program~example5 example5 program~example5->proc~odr

Variables

Type Visibility Attributes Name Initial
integer, public :: j

Source Code

   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