Skip to main content

GetSym

This function makes the symmetric matrix by using lower or part of the matrix.

note

In terms of functionality GetSym is same as Sym. This subroutine does not allocate any additional memory, so it is efficient.

  • The following call will form symmetric matrix by using the upper triangle part of matrix B
Sym from Upper part
CALL GetSym(mat=B, from="U")
  • The following call will form symmetric matrix by using the lower triangle part of matrix B
Sym from Lower part
CAL GetSym(mat=B, from="L")

Interface

  MODULE PURE SUBROUTINE GetSym(mat, from)
INTEGER(Int8| Int16 | Int32 | Int64) | REAL(Real32| Real64), INTENT(INOUT) :: mat(:, :)
CHARACTER(1), INTENT(IN) :: from
!! from = "U", then upper triangular part must be provided
!! from = "L", then lower triangular part must be provided
END SUBROUTINE GetSym