Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
default=BaseSurvey()
)
counter = properties.Instance(
"A SimPEG.Utils.Counter object",
Counter
)
# TODO: Solver code needs to be cleaned up so this is either a pymatsolver
# solver or a SimPEG solver (or similar)
# solver = properties.Instance(
# "a pymatsolver class",
# pymatsolver,
# default=pymatsolver.Solver
# )
solver = pymatsolver.Solver
solver_opts = properties.Dictionary(
"solver options as a kwarg dict",
default={}
)
@properties.observer('mesh')
def _update_registry(self, change):
self._REGISTRY.update(change['value']._REGISTRY)
#: List of strings, e.g. ['_MeSigma', '_MeSigmaI']
deleteTheseOnModelUpdate = []
@properties.observer('model')
def _on_model_update(self, change):
if change['previous'] is change['value']:
def __init__(self, mesh=None, **kwargs):
# raise exception if user tries to set "mapping"
if 'mapping' in kwargs.keys():
raise Exception(
'Depreciated (in 0.4.0): use one of {}'.format(
[p for p in self._props.keys() if 'Map' in p]
)
)
if mesh is not None:
kwargs['mesh'] = mesh
super(BaseSimulation, self).__init__(**kwargs)
if 'solver' not in kwargs.keys() and 'Solver' not in kwargs.keys():
self.solver = pymatsolver.Solver