[cig-commits] commit: fix several problems with times series of surface tractions: problem with static tractions with 0 period; problem with truncation error of event time.
Mercurial
hg at geodynamics.org
Fri May 25 01:26:03 PDT 2012
changeset: 118:379f021d6d78
tag: tip
user: Sylvain Barbot <sbarbot at caltech.edu>
date: Fri May 25 01:25:24 2012 -0700
files: src/elastic3d.f90 src/input.f90 src/relax.f90
description:
fix several problems with times series of surface tractions: problem with static tractions with 0 period; problem with truncation error of event time.
diff -r 08cf4ddbf9f7 -r 379f021d6d78 src/elastic3d.f90
--- a/src/elastic3d.f90 Mon May 21 19:50:49 2012 -0700
+++ b/src/elastic3d.f90 Fri May 25 01:25:24 2012 -0700
@@ -2096,11 +2096,13 @@ CONTAINS
mu*e%l(i)%slip
IF (israte) THEN
- ! surface tractions rate
- period=e%l(i)%period
- phi=e%l(i)%phase
+ IF (0 .NE. period) THEN
+ ! surface tractions rate
+ period=e%l(i)%period
+ phi=e%l(i)%phase
- t3(i1,i2)=REAL(t3(i1,i2)-amp*(sin(2*pi*(t+Dt)/period+phi)-sin(2*pi*t/period+phi)))
+ t3(i1,i2)=REAL(t3(i1,i2)-amp*(sin(2*pi*(t+Dt)/period+phi)-sin(2*pi*t/period+phi)))
+ END IF
ELSE
IF (e%l(i)%period .LE. 0) THEN
! surface tractions
diff -r 08cf4ddbf9f7 -r 379f021d6d78 src/input.f90
--- a/src/input.f90 Mon May 21 19:50:49 2012 -0700
+++ b/src/input.f90 Fri May 25 01:25:24 2012 -0700
@@ -969,13 +969,13 @@ CONTAINS
DO e=1,in%ne
IF (1 .NE. e) THEN
- PRINT '("time of next coseismic event")'
+ PRINT '("time of next event")'
CALL getdata(iunit,dataline)
READ (dataline,*) in%events(e)%time
IF (0 .EQ. in%skip) THEN
! change event time to multiples of output time step
- in%events(e)%time=int(in%events(e)%time/in%odt)*in%odt
+ in%events(e)%time=nint(in%events(e)%time/in%odt)*in%odt
END IF
PRINT '(ES9.2E1," (multiple of ",ES9.2E1,")")', &
diff -r 08cf4ddbf9f7 -r 379f021d6d78 src/relax.f90
--- a/src/relax.f90 Mon May 21 19:50:49 2012 -0700
+++ b/src/relax.f90 Fri May 25 01:25:24 2012 -0700
@@ -695,7 +695,7 @@ PROGRAM relax
! time increment
t=t+Dt
-
+
! next event
IF (e .LT. in%ne) THEN
IF (abs(t-in%events(e+1)%time) .LT. 1e-6) THEN
More information about the CIG-COMMITS
mailing list