[cig-commits] r6508 - short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d

willic3 at geodynamics.org willic3 at geodynamics.org
Wed Apr 4 13:28:40 PDT 2007


Author: willic3
Date: 2007-04-04 13:28:40 -0700 (Wed, 04 Apr 2007)
New Revision: 6508

Modified:
   short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/mat_5.f
Log:
Minor optimization.



Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/mat_5.f
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/mat_5.f	2007-04-04 08:04:29 UTC (rev 6507)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/mat_5.f	2007-04-04 20:28:40 UTC (rev 6508)
@@ -436,6 +436,7 @@
       double precision e,pr,rmu,bulkm,vis
       double precision etracetdt,emeantdt,smeantdt,sdevtdt,dq
       double precision edevtdt,edevt,emeant,deltae,rtime
+      double precision fac1,fac2
 c
 c...  included variable definitions
 c
@@ -472,12 +473,14 @@
 c
 c...  compute new stresses and store stress and strain values in dstate
 c
+      fac1=exp(-deltp/rtime)
+      fac2=two*rmu
       do i=1,nstr
         edevtdt=eng(i)*ee(i)-diag(i)*emeantdt
         edevt=eng(i)*state(i+6)-diag(i)*emeant
         deltae=edevtdt-edevt
-        dstate(i+12)=state(i+12)*exp(-deltp/rtime)+dq*deltae
-        sdevtdt=two*rmu*dstate(i+12)
+        dstate(i+12)=state(i+12)*fac1+dq*deltae
+        sdevtdt=fac2*dstate(i+12)
         dstate(i)=diag(i)*smeantdt+sdevtdt+state0(i)
         dstate(i+6)=ee(i)
         scur(i)=dstate(i)



More information about the cig-commits mailing list