vec2mat_sym3x3 Subroutine

public pure subroutine vec2mat_sym3x3(vec, mat)

Uses

    • tensor
  • proc~~vec2mat_sym3x3~~UsesGraph proc~vec2mat_sym3x3 vec2mat_sym3x3 tensor tensor proc~vec2mat_sym3x3->tensor

Write the components of symmetric matrix given as a -vector, into a matrix

FT 25.04.2022


Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: vec(n_sym3x3)
double precision, intent(out) :: mat(3,3)

Called by

proc~~vec2mat_sym3x3~~CalledByGraph proc~vec2mat_sym3x3 vec2mat_sym3x3 proc~invert_sym3x3 invert_sym3x3 proc~invert_sym3x3->proc~vec2mat_sym3x3

Contents

Source Code


Source Code

  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