added math_spectralDecompositionSym3x3 used by shear band model

This commit is contained in:
Franz Roters 2011-09-14 13:26:00 +00:00
parent 483b483816
commit ee83904548
1 changed files with 21 additions and 0 deletions

View File

@ -2034,7 +2034,28 @@ enddo
math_sampleGaussVar = scatter * stddev
endfunction math_sampleGaussVar
!****************************************************************
subroutine math_spectralDecompositionSym3x3(M,values,vectors,error)
!****************************************************************
use prec, only: pReal, pInt
implicit none
real(pReal), dimension(3,3), intent(in) :: M
real(pReal), dimension(3), intent(out) :: values
real(pReal), dimension(3,3), intent(out) :: vectors
logical, intent(out) :: error
integer(pInt) info
real(pReal), dimension((64+2)*3) :: work ! block size of 64 taken from http://www.netlib.org/lapack/double/dsyev.f
vectors = M ! copy matrix to input (doubles as output) array
call DSYEV('V','U',3,vectors,3,values,work,(64+2)*3,info)
error = (info == 0_pInt)
return
end subroutine
!****************************************************************