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

willic3 at geodynamics.org willic3 at geodynamics.org
Wed Oct 4 11:35:00 PDT 2006


Author: willic3
Date: 2006-10-04 11:35:00 -0700 (Wed, 04 Oct 2006)
New Revision: 4696

Modified:
   short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_tractions.f
   short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_tractions.f
Log:
Fixed incorrect error return for scan_tractions (tractions are optional).
Fixed read_tractions to return with no error when there are no
tractions.



Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_tractions.f
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_tractions.f	2006-10-04 18:34:45 UTC (rev 4695)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_tractions.f	2006-10-04 18:35:00 UTC (rev 4696)
@@ -73,6 +73,7 @@
 c     is pretty sloppy, assuming that they were already specified during
 c     the scan phase.
 c
+      if(numtractions.eq.0) return
       ierr=izero
       open(kr,file=tfile,status="old",err=20)
       call pskip(kr)

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_tractions.f
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_tractions.f	2006-10-04 18:34:45 UTC (rev 4695)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_tractions.f	2006-10-04 18:35:00 UTC (rev 4696)
@@ -36,7 +36,8 @@
 c
 c     Error codes:
 c         0:  No error
-c         1:  Error opening input file
+c         1:  Error opening input file (no exception should be raised
+c             in this case since a traction BC file is optional)
 c         3:  Read error
 c       106:  Illegal element type
 c
@@ -74,7 +75,7 @@
       numtractions=izero
       numverts=izero
       nget=ione
-      open(kr,file=tfile,status="old",err=20)
+      open(kr,file=tfile,status="old",err=10)
 c
 c...  get traction units, returning error 5 if they aren't found
 c
@@ -121,14 +122,6 @@
         close(kr)
         return
 c
-c...  error opening file
-c
- 20   continue
-        close(kr)
-	ierr=1
-        errstrng="scan_tractions"
-        return
-c
 c...  read error
 c
  30   continue



More information about the cig-commits mailing list