set_ifix Subroutine

public pure subroutine set_ifix(n, m, ifix, ldifix, t, ldt, tfix, ldtfix)

Uses

  • proc~~set_ifix~~UsesGraph proc~set_ifix set_ifix module~odrpack_kinds odrpack_kinds proc~set_ifix->module~odrpack_kinds iso_fortran_env iso_fortran_env module~odrpack_kinds->iso_fortran_env

Set elements of t to zero according to ifix.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

Number of rows of data in the array.

integer, intent(in) :: m

Number of columns of data in the array.

integer, intent(in) :: ifix(ldifix,m)

Array designating whether an element of t is to be set to zero.

integer, intent(in) :: ldifix

Leading dimension of array ifix.

real(kind=wp), intent(in) :: t(ldt,m)

Array being set to zero according to the elements of ifix.

integer, intent(in) :: ldt

Leading dimension of array t.

real(kind=wp), intent(out) :: tfix(ldtfix,m)

Resulting array.

integer, intent(in) :: ldtfix

Leading dimension of array tfix.


Called by

proc~~set_ifix~~CalledByGraph proc~set_ifix set_ifix proc~eval_jac eval_jac proc~eval_jac->proc~set_ifix proc~odr odr proc~odr->proc~eval_jac 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_ifix(n, m, ifix, ldifix, t, ldt, tfix, ldtfix)
   !! Set elements of `t` to zero according to `ifix`.

      use odrpack_kinds, only: zero

      integer, intent(in) :: n
         !! Number of rows of data in the array.
      integer, intent(in) :: m
         !! Number of columns of data in the array.
      integer, intent(in) :: ifix(ldifix, m)
         !! Array designating whether an element of `t` is to be set to zero.
      integer, intent(in) :: ldifix
         !! Leading dimension of array `ifix`.
      real(wp), intent(in) :: t(ldt, m)
         !! Array being set to zero according to the elements of `ifix`.
      integer, intent(in) :: ldt
         !! Leading dimension of array `t`.
      real(wp), intent(out) :: tfix(ldtfix, m)
         !! Resulting array.
      integer, intent(in) :: ldtfix
         !! Leading dimension of array `tfix`.

      ! Local scalars
      integer :: j

      ! Variable Definitions (alphabetically)
      !  J:       an indexing variable.

      if (n == 0 .or. m == 0) return

      if (ifix(1, 1) >= zero) then
         if (ldifix == n) then
            where (ifix(:, :) == 0)
               tfix(1:n, :) = zero
            else where
               tfix(1:n, :) = t(1:n, :)
            end where
         else
            do j = 1, m
               if (ifix(1, j) == 0) then
                  tfix(1:n, j) = zero
               else
                  tfix(1:n, j) = t(1:n, j)
               end if
            end do
         end if
      end if

   end subroutine set_ifix