Skip to content
Snippets Groups Projects
Commit 0ebf39ee authored by Dave Whipp's avatar Dave Whipp
Browse files

Tweaked trace function to not use or pass the off-diagonal terms

parent 4da64452
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,16 @@ contains
!this function computes the trace of a tensor
!Tr[\sigma]=\sum_{i} \sigma_{ii}
function trace (exx,eyy,ezz,exy,eyz,ezx)
! Original version pre 05/11
!function trace (exx,eyy,ezz,exy,eyz,ezx)
!double precision trace
!double precision exx,eyy,ezz,exy,eyz,ezx
!trace=exx+eyy+ezz
!end function trace
function trace (exx,eyy,ezz)
double precision trace
double precision exx,eyy,ezz,exy,eyz,ezx
double precision exx,eyy,ezz
trace=exx+eyy+ezz
end function trace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment