balback Subroutine

public subroutine balback(n, low, high, scal, eivec)

Reverses the balancing of balance for the eigenvectors

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: n

Dimension of matrix

integer, intent(in) :: low

First nonzero row

integer, intent(in) :: high

Last nonzero row

real(kind=double), intent(in) :: scal(0:n-1)

Scaling data from balance

real(kind=double), intent(inout) :: eivec(0:n-1,0:n-1)

Called by

proc~~balback~~CalledByGraph proc~balback balback proc~eigen eigen proc~eigen->proc~balback proc~colrad colrad proc~colrad->proc~eigen proc~fida_weights_los fida_weights_los proc~fida_weights_los->proc~colrad proc~read_equilibrium read_equilibrium proc~read_equilibrium->proc~colrad proc~attenuate attenuate proc~attenuate->proc~colrad proc~pnpa_f pnpa_f proc~pnpa_f->proc~attenuate proc~pnpa_mc pnpa_mc proc~pnpa_mc->proc~attenuate proc~npa_f npa_f proc~npa_f->proc~attenuate program~fidasim fidasim program~fidasim->proc~fida_weights_los program~fidasim->proc~read_equilibrium program~fidasim->proc~pnpa_f program~fidasim->proc~pnpa_mc program~fidasim->proc~npa_f proc~npa_mc npa_mc program~fidasim->proc~npa_mc proc~npa_weights npa_weights program~fidasim->proc~npa_weights proc~npa_mc->proc~attenuate proc~npa_weights->proc~attenuate

Contents

Source Code


Source Code

  subroutine balback(n, low, high, scal, eivec )
    !+  Reverses the balancing of balance for the eigenvectors
    integer,intent(in)         :: n
      !+ Dimension of matrix
    integer,intent(in)         :: low
      !+ First nonzero row
    integer,intent(in)         :: high
      !+ Last nonzero row
    real(double), intent(in)   ::  scal(0:n-1)
      !+ Scaling data from balance
    real(double), intent(inout):: eivec(0:n-1,0:n-1)
      !+ Input: n x n matrix of eigenvectors, as computed in qr2
      !+ Output: Non-normalized eigenvectors of the original matrix

    real(double) :: s
    integer      :: i,j,k
    do i = low, high
       s = scal(i)
       do j = 0, n-1
      eivec(i,j) = eivec(i,j) * s
       enddo
    enddo
    do i = low-1, 0, -1
       k = Int(scal(i))
       if (k.ne.i) then
          do j = 0, n-1
             call RSWAP(eivec(i,j), eivec(k,j))
          enddo
       endif
    enddo
    do i = high + 1, n-1
       k = Int(scal(i))
       if (k.ne.i) then
          do j = 0, n-1
             call RSWAP(eivec(i,j), eivec(k,j))
          enddo
       endif
    enddo
    return
  end subroutine balback