mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-29 19:17:23 +08:00
Merge branch 'feat/GlobalProblem' of https://github.com/simpeg/simpeg into feat/GlobalProblem
This commit is contained in:
+9
-1
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user