mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-30 05:41:42 +08:00
make modelPair be OK in problem if first ComboModel is the right one.
This commit is contained in:
+3
-1
@@ -44,7 +44,9 @@ class BaseProblem(object):
|
||||
def __init__(self, mesh, model, **kwargs):
|
||||
Utils.setKwargs(self, **kwargs)
|
||||
self.mesh = mesh
|
||||
assert isinstance(model, self.modelPair), "Model object must be an instance of a %s class."%(self.modelPair.__name__)
|
||||
assert (isinstance(model, self.modelPair) or
|
||||
isinstance(model, Model.ComboModel) and isinstance(model.models[0], 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