mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-20 12:40:44 +08:00
Added check on modelPair in Problem.
This commit is contained in:
+3
-1
@@ -1,5 +1,5 @@
|
||||
import Utils, Data, numpy as np, scipy.sparse as sp
|
||||
|
||||
import Model
|
||||
|
||||
class BaseProblem(object):
|
||||
"""
|
||||
@@ -39,10 +39,12 @@ class BaseProblem(object):
|
||||
counter = None #: A SimPEG.Utils.Counter object
|
||||
|
||||
dataPair = Data.BaseData
|
||||
modelPair = Model.BaseModel
|
||||
|
||||
def __init__(self, mesh, model, *args, **kwargs):
|
||||
Utils.setKwargs(self, **kwargs)
|
||||
self.mesh = mesh
|
||||
assert isinstance(d, self.modelPair), "Model object must be an instance of a %s class."%(self.modelPair.__name__)
|
||||
self.model = model
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user