From 0ebf39eed157e64c40ea7a249729858b20da3197 Mon Sep 17 00:00:00 2001 From: Dave Whipp <dwhipp@dal.ca> Date: Wed, 25 May 2011 16:40:40 +0000 Subject: [PATCH] Tweaked trace function to not use or pass the off-diagonal terms --- src/module_invariants.f90 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/module_invariants.f90 b/src/module_invariants.f90 index fb35e6f8..0878a919 100644 --- a/src/module_invariants.f90 +++ b/src/module_invariants.f90 @@ -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 -- GitLab