mxdsmi Subroutine

public pure subroutine mxdsmi(n, a)

dense symmetric matrix a is set to the unit matrix with the same order.

Arguments

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

order of the matrix a.

real(kind=wp), intent(out) :: a(*)

a(n*(n+1)/2) dense symmetric matrix stored in the packed form which is set to the unit matrix (i.e. a:=i).


Called by

proc~~mxdsmi~~CalledByGraph proc~mxdsmi mxdsmi proc~psqp psqp_class%psqp proc~psqp->proc~mxdsmi proc~psqpn psqp_class%psqpn proc~psqpn->proc~psqp

Source Code

      pure subroutine mxdsmi(n,a)

      integer,intent(in) :: n  !! order of the matrix a.
      real(wp),intent(out) :: a(*)  !! `a(n*(n+1)/2)`  dense symmetric matrix
                                    !! stored in the packed form which is set
                                    !! to the unit matrix (i.e. `a:=i`).

      integer :: i , m

      m = n*(n+1)/2
      do i = 1 , m
         a(i) = 0.0_wp
      end do
      m = 0
      do i = 1 , n
         m = m + i
         a(m) = 1.0_wp
      end do

      end subroutine mxdsmi