dense symmetric matrix a is set to the unit matrix with the same order.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
order of the matrix a. |
||
| real(kind=wp), | intent(out) | :: | a(*) |
|
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