Merge branch 'feat/GlobalProblem' of https://github.com/simpeg/simpeg into feat/GlobalProblem

This commit is contained in:
Rowan Cockett
2016-01-28 13:52:16 -08:00
10 changed files with 198 additions and 23 deletions
+9 -1
View File
@@ -166,6 +166,9 @@ class BaseProblem(object):
class BaseTimeProblem(BaseProblem):
"""Sets up that basic needs of a time domain problem."""
waveformType = "STEPOFF"
current = None
@property
def timeSteps(self):
@@ -192,6 +195,11 @@ class BaseTimeProblem(BaseProblem):
self._timeSteps = Utils.meshTensor(value)
del self.timeMesh
def currentwaveform(self, wave):
self._timeSteps = np.diff(wave[:,0])
self.current = wave[:,1]
self.waveformType = "GENERAL"
@property
def nT(self):
"Number of time steps."
@@ -306,7 +314,7 @@ class GlobalProblem(BaseProblem):
raise Exceptions.PairingException(reason='The meshes are not the the same length as the number of groups')
def getSubProblem(self, ind):
#This is a core place that we can proceed parallelization
assert self.ispaired, 'You must be paired to a survey'
assert type(ind) in [int,long] and ind >= 0 and ind < self.nGroups, 'ind must be an index into the group list'