How to use the pymatsolver.Solver function in pymatsolver

To help you get started, we’ve selected a few pymatsolver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github simpeg / simpeg / SimPEG / Simulation.py View on Github external
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']:
github simpeg / simpeg / SimPEG / simulation.py View on Github external
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

pymatsolver

pymatsolver: Matrix Solvers for Python

MIT
Latest version published 27 days ago

Package Health Score

69 / 100
Full package analysis