Write the components of symmetric matrix given as a -vector, into a matrix
FT 25.04.2022
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | vec(n_sym3x3) | |||
double precision, | intent(out) | :: | mat(3,3) |
PURE SUBROUTINE vec2mat_sym3x3( vec, mat )
!********************************************
!
!# Write the components of symmetric \(3\times 3\)
! matrix given as a \(6\)-vector, into a
! \(3\times 3\) matrix
!
! FT 25.04.2022
!
!*********************************************
USE tensor, ONLY: jxx, jxy, jxz, jyy, jyz, jzz, jx, jy, jz, n_sym3x3
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: vec(n_sym3x3)
DOUBLE PRECISION, INTENT(OUT) :: mat(3,3)
mat(1,1)= vec(jxx)
mat(1,2)= vec(jxy)
mat(1,3)= vec(jxz)
mat(2,1)= mat(1,2)
mat(2,2)= vec(jyy)
mat(2,3)= vec(jyz)
mat(3,1)= mat(1,3)
mat(3,2)= mat(2,3)
mat(3,3)= vec(jzz)
END SUBROUTINE vec2mat_sym3x3