[cig-commits] r6765 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d
leif at geodynamics.org
leif at geodynamics.org
Thu May 3 13:13:13 PDT 2007
Author: leif
Date: 2007-05-03 13:13:13 -0700 (Thu, 03 May 2007)
New Revision: 6765
Modified:
short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/PyLithApp.py
Log:
ParMETIS partitioning is broken for traction BC; fail with an error
message when partitioner=parmetis and there is a .traction file.
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/PyLithApp.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/PyLithApp.py 2007-05-03 15:46:54 UTC (rev 6764)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/PyLithApp.py 2007-05-03 20:13:13 UTC (rev 6765)
@@ -363,6 +363,7 @@
#
inputFile = lambda item, category: self.inputFile(item, category, context)
+ inputFileStream = lambda item, category: self.inputFileStream(item, category, context)
outputFile = lambda item, category: self.outputFile(item, category, context)
macroString = self.macroString
@@ -387,7 +388,7 @@
self.materialHistoryInputFile = inputFile(Inventory.materialHistoryInputFile, unused)
self.connectivityInputFile = inputFile(Inventory.connectivityInputFile, required)
self.prestressInputFile = inputFile(Inventory.prestressInputFile, unused)
- self.tractionInputFile = inputFile(Inventory.tractionInputFile, optional)
+ self.tractionInputFile, traction = inputFileStream(Inventory.tractionInputFile, optional)
self.spfile = inputFile(Inventory.spfile, self.generateGreen and required or optional)
# Slippery nodes are not yet implemented in PyLith-0.8.
self.slfile = inputFile(Inventory.slfile, unused)
@@ -398,6 +399,13 @@
# if any files might be in the way.
self.ucdroot = macroString(Inventory.ucdroot)
+ if traction:
+ if self.partitioner == "parmetis":
+ context.error(ValueError("ParMETIS partitioning is broken for traction BC"),
+ items=[Inventory.tractionInputFile,
+ Inventory.partitioner])
+ traction.close()
+
if False: # broken
from glob import glob
ucdFiles = ([self.ucdroot + ".mesh.inp",
@@ -604,7 +612,7 @@
return value
def inputFileStream(self, item, category, context):
- return self.ioFileStream(item, os.O_RDONLY, "r", category, context)[1]
+ return self.ioFileStream(item, os.O_RDONLY, "r", category, context)
def outputFile(self, item, category, context):
if True:
More information about the cig-commits
mailing list