@brief Fortran-90 routine for packing symmetric matrix to 1D array
@date 6 October 2021 - Initial release - @author Igor S. Gerasimov
@param[in] A - matrix for packing (N x N)
@param[out] AP - packed matrix ( N*(N+1)/2 )
@param[in,optional] UPLO - format of packed matrix, U
for upper and L
for lower
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
real(kind=dp), | intent(out) | :: | AP(:) | |||
character(len=1), | intent(in), | optional | :: | UPLO |
subroutine PACK_F90(A, AP, UPLO) real(dp), intent(IN) :: A(:, :) real(dp), intent(OUT) :: AP(:) character(len=1), intent(in), optional :: UPLO character(len=1) :: DUPLO if (.not. present(UPLO)) then DUPLO = 'U' else DUPLO = UPLO end if call PACK_F77(A, size(A, 1), AP, DUPLO) end subroutine PACK_F90