Skip to content

Commit

Permalink
#2382 merge remove-unused-function
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Oct 20, 2022
2 parents db1660a + e5e903f commit f4dd305
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Breaking change

- Removed `get_infinite_nested_dict` and `Discretisation.create_jacobian` methods, which were not used by any other functionality in the repository ([#2384](https://github.com/pybamm-team/PyBaMM/pull/2384))
- Removed `get_infinite_nested_dict`, `BaseModel.check_default_variables_dictionaries`, and `Discretisation.create_jacobian` methods, which were not used by any other functionality in the repository ([#2384](https://github.com/pybamm-team/PyBaMM/pull/2384))
- Removed parameter cli tools (add/edit/remove parameters). Parameter sets can now more easily be added via python scripts. ([#2342](https://github.com/pybamm-team/PyBaMM/pull/2342))
- Parameter sets should now be provided as single python files containing all parameters and functions. Parameters provided as "data" (e.g. OCP vs SOC) can still be csv files, but must be either in the same folder as the parameter file or in a subfolder called "data/". See for example [Ai2020](https://github.com/pybamm-team/PyBaMM/tree/develop/pybamm/input/parameters/lithium_ion/Ai2020.py) ([#2342](https://github.com/pybamm-team/PyBaMM/pull/2342))

Expand Down
19 changes: 0 additions & 19 deletions pybamm/models/base_equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def check_well_posedness(self, post_discretisation=False):
self.check_well_determined(post_discretisation)
self.check_algebraic_equations(post_discretisation)
self.check_ics_bcs()
self.check_default_variables_dictionaries()
self.check_no_repeated_keys()
# Can't check variables after discretising, since Variable objects get replaced
# by StateVector objects
Expand Down Expand Up @@ -285,24 +284,6 @@ def check_ics_bcs(self):
"""no initial condition given for variable '{}'""".format(var)
)

def check_default_variables_dictionaries(self):
"""Check that the right variables are provided."""
missing_vars = []
for output, expression in self.variables.items():
if expression is None:
missing_vars.append(output)
if len(missing_vars) > 0:
warnings.warn(
"the standard output variable(s) '{}' have not been supplied. "
"These may be required for testing or comparison with other "
"models.".format(missing_vars),
pybamm.ModelWarning,
stacklevel=2,
)
# Remove missing entries
for output in missing_vars:
del self._variables[output]

def check_variables(self):
# Create list of all Variable nodes that appear in the model's list of variables
unpacker = pybamm.SymbolUnpacker(pybamm.Variable)
Expand Down

0 comments on commit f4dd305

Please sign in to comment.