Skip to content

Simplify solver instantiation #3

@tlunet

Description

@tlunet

The NumericalSolver class is instantiated using all individual parameters required to create
a DaitcheParameters, which is not very practicle from a user perspective.
To avoid that, one could simply allow the NumericalSolver constructor to take a DaitcheParameters
as argument, for instance :

class NumericalSolver:

    def __init__(self, params, **otherParameters):
        assert isinstance(params, DaitcheParameters), "params must be a DaitcheParameters class"
        self.p = params

This would simplify passing other sets of parameters (in particular if more parameters are added).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions