updates to the time fields side of things as well

This commit is contained in:
Rowan Cockett
2015-06-01 16:27:31 -07:00
parent 4df383ccec
commit 5caf237121
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -235,11 +235,8 @@ class TimeFields(Fields):
pointerFields = pointerFields.reshape(pointerShape, order='F')
timeII = np.arange(self.survey.prob.nT + 1)[timeInd]
srcII = np.array(self.survey.srcList)[srcInd]
if isinstance(srcII, np.ndarray):
srcII = srcII.tolist()
if len(srcII) == 1:
srcII = srcII[0]
srcII = np.array(self.survey.srcList)[srcInd]
srcII = srcII.tolist()
if timeII.size == 1:
pointerShapeDeflated = self._correctShape(alias, ind, deflate=True)
+1 -1
View File
@@ -343,7 +343,7 @@ class FieldsTest_Time_Aliased(unittest.TestCase):
count = [0]
def alias(e, srcInd, timeInd):
count[0] += 1
self.assertTrue(srcInd is self.Src0)
self.assertTrue(srcInd[0] is self.Src0)
return self.F.mesh.edgeCurl * e
F = Problem.TimeFields(self.F.mesh, self.F.survey, knownFields={'e':'E'}, aliasFields={'b':['e','F',alias]})
e = np.random.rand(F.mesh.nE,1,nT)