mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-27 19:48:52 +08:00
Use meshTensor to create the time mesh in a TD problem.
This commit is contained in:
+1
-13
@@ -437,19 +437,7 @@ class BaseTimeProblem(BaseProblem):
|
||||
del self.timeMesh
|
||||
return
|
||||
|
||||
if type(value) is not list:
|
||||
raise Exception('timeSteps must be a np.ndarray or a list of scalars and tuples.')
|
||||
|
||||
proposed = []
|
||||
for v in value:
|
||||
if Utils.isScalar(v):
|
||||
proposed += [float(v)]
|
||||
elif type(v) is tuple and len(v) == 2:
|
||||
proposed += [float(v[0])]*int(v[1])
|
||||
else:
|
||||
raise Exception('timeSteps list must contain only scalars and len(2) tuples.')
|
||||
|
||||
self._timeSteps = np.array(proposed)
|
||||
self._timeSteps = Utils.meshTensor(value)
|
||||
del self.timeMesh
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user