dunpac Subroutine

public pure subroutine dunpac(n2, v1, v2, ifix)

Uses

  • proc~~dunpac~~UsesGraph proc~dunpac dunpac module~blas_interfaces blas_interfaces proc~dunpac->module~blas_interfaces module~odrpack_kinds odrpack_kinds module~blas_interfaces->module~odrpack_kinds iso_fortran_env iso_fortran_env module~odrpack_kinds->iso_fortran_env

Copy the elements of v1 into the locations of v2 which are unfixed.

Arguments

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

The number of items in v2.

real(kind=wp), intent(in) :: v1(n2)

The vector of the unfixed items.

real(kind=wp), intent(out) :: v2(n2)

The vector of the fixed and unfixed items into which the elements of v1 are to be inserted.

integer, intent(in) :: ifix(n2)

The values designating whether the elements of v2 are fixed at their input values or not.


Calls

proc~~dunpac~~CallsGraph proc~dunpac dunpac interface~dcopy dcopy proc~dunpac->interface~dcopy

Called by

proc~~dunpac~~CalledByGraph proc~dunpac dunpac proc~devjac devjac proc~devjac->proc~dunpac proc~doddrv doddrv proc~doddrv->proc~dunpac proc~dodmn dodmn proc~doddrv->proc~dodmn proc~dodmn->proc~dunpac proc~dodmn->proc~devjac proc~dodcnt dodcnt proc~dodcnt->proc~doddrv proc~odr odr proc~odr->proc~dodcnt 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 :: i
integer, public :: n1

Source Code

   pure subroutine dunpac(n2, v1, v2, ifix)
   !! Copy the elements of `v1` into the locations of `v2` which are unfixed.
      ! Routines Called  DCOPY
      ! Date Written   860529   (YYMMDD)
      ! Revision Date  920304   (YYMMDD)

      use blas_interfaces, only: dcopy

      integer, intent(in) :: n2
         !! The number of items in `v2`.
      real(wp), intent(in) :: v1(n2)
         !! The vector of the unfixed items.
      real(wp), intent(out) :: v2(n2)
         !! The vector of the fixed and unfixed items into which the elements of `v1` are to
         !! be inserted.
      integer, intent(in) :: ifix(n2)
         !! The values designating whether the elements of `v2` are fixed at their input values or not.

      ! Local scalars
      integer :: i, n1

      ! Variable Definitions (alphabetically)
      !  I:       An indexing variable.
      !  IFIX:    The values designating whether the elements of V2 are fixed at their input
      !           values or not.
      !  N1:      The number of items in V1.
      !  N2:      The number of items in V2.
      !  V1:      The vector of the unfixed items.
      !  V2:      The vector of the fixed and unfixed items into which the elements of V1 are
      !           to be inserted.

      n1 = 0
      if (ifix(1) >= 0) then
         do i = 1, n2
            if (ifix(i) /= 0) then
               n1 = n1 + 1
               v2(i) = v1(n1)
            end if
         end do
      else
         n1 = n2
         call dcopy(n2, v1, 1, v2, 1)
      end if

   end subroutine dunpac