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

willic3 at geodynamics.org willic3 at geodynamics.org
Thu Oct 26 10:39:50 PDT 2006


Author: willic3
Date: 2006-10-26 10:39:50 -0700 (Thu, 26 Oct 2006)
New Revision: 5095

Modified:
   short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_bc.f
   short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_bc.f
Log:
Altered BC routines so they will not return an error if there are no
BC defined for a process.



Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_bc.f
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_bc.f	2006-10-26 17:03:00 UTC (rev 5094)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/read_bc.f	2006-10-26 17:39:50 UTC (rev 5095)
@@ -84,6 +84,10 @@
 c
       ierr=izero
       nconcforce=izero
+c
+c...  return if no BC defined for this partition
+c
+      if(numbc.eq.0) return
       open(kr,file=bcfile,status="old",err=20)
       scale(1)=zero
       scale(2)=dscale

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_bc.f
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_bc.f	2006-10-26 17:03:00 UTC (rev 5094)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/scan_bc.f	2006-10-26 17:39:50 UTC (rev 5095)
@@ -69,7 +69,7 @@
       integer nget,j,n,i1,i2
       integer ibond(3)
       double precision bond(3)
-      character units(3)*80
+      character units(3)*80,dum*1
       logical units_defined(3)
 c
 c...  open input file
@@ -79,6 +79,11 @@
       nget=ithree
       open(kr,file=bcfile,status="old",err=20)
 c
+c...  return if file is empty
+c
+      read(kr,"(a1)",end=10) dum
+      backspace(kr)
+c
 c...  get units, returning error 2 if they aren't found.
 c
       call get_units(kr,nget,units_defined,units,def,ierr,errtmp)



More information about the cig-commits mailing list