diff --git a/pybamm/discretisations/discretisation.py b/pybamm/discretisations/discretisation.py
index 60b5a7a99..0b4902ccf 100644
--- a/pybamm/discretisations/discretisation.py
+++ b/pybamm/discretisations/discretisation.py
@@ -37,8 +37,6 @@ class Discretisation(object):
         self._bcs = {}
         self._y_slices = {}
 
-        mesh.add_ghost_meshes()
-
     @property
     def mesh(self):
         return self._mesh
@@ -305,10 +303,6 @@ class Discretisation(object):
         elif isinstance(symbol, pybamm.Concatenation):
             new_children = [self.process_symbol(child) for child in symbol.children]
             new_symbol = pybamm.DomainConcatenation(new_children, self.mesh)
-
-            if new_symbol.is_constant():
-                value = new_symbol.evaluate()
-                return pybamm.Vector(value)
             return new_symbol
 
         else:
diff --git a/pybamm/expression_tree/broadcasts.py b/pybamm/expression_tree/broadcasts.py
index 5397f6df1..9c1771e27 100644
--- a/pybamm/expression_tree/broadcasts.py
+++ b/pybamm/expression_tree/broadcasts.py
@@ -86,6 +86,13 @@ class NumpyBroadcast(Broadcast):
         # domain)
         self.broadcasting_vector = np.ones(self.broadcasting_vector_size)
 
+        # store mesh
+        self._mesh = mesh
+
+    @property
+    def mesh(self):
+        return self._mesh
+
     def evaluate(self, t=None, y=None):
         """ See :meth:`pybamm.Symbol.evaluate()`. """
         child = self.children[0]
diff --git a/pybamm/expression_tree/concatenations.py b/pybamm/expression_tree/concatenations.py
index a6dcf5ab0..068973c6b 100644
--- a/pybamm/expression_tree/concatenations.py
+++ b/pybamm/expression_tree/concatenations.py
@@ -111,6 +111,9 @@ class DomainConcatenation(Concatenation):
         # Allow the base class to sort the domains into the correct order
         super().__init__(*children, name="domain concatenation")
 
+        # store mesh
+        self._mesh = mesh
+
         # Check that there is a domain, otherwise the functionality won't work and we
         # should raise a DomainError
         if self.domain == []:
@@ -122,7 +125,7 @@ class DomainConcatenation(Concatenation):
             )
 
         # create dict of domain => slice of final vector
-        self._slices = self.create_slices(self, mesh)
+        self._slices = self.create_slices(self)
 
         # store size of final vector
         self._size = self._slices[self.domain[-1]].stop
@@ -130,15 +133,27 @@ class DomainConcatenation(Concatenation):
         # create disc of domain => slice for each child
         self._children_slices = []
         for child in self.children:
-            self._children_slices.append(self.create_slices(child, mesh))
+            self._children_slices.append(self.create_slices(child))
+
+    @property
+    def mesh(self):
+        return self._mesh
+
+    @property
+    def size(self):
+        return self._size
+
+    @property
+    def shape(self):
+        return (self.size,)
 
-    def create_slices(self, node, mesh):
+    def create_slices(self, node):
         slices = {}
         start = 0
         end = 0
         for dom in node.domain:
-            prim_pts = mesh[dom][0].npts
-            second_pts = len(mesh[dom])
+            prim_pts = self.mesh[dom][0].npts
+            second_pts = len(self.mesh[dom])
             end += prim_pts * second_pts
             slices[dom] = slice(start, end)
             start = end
diff --git a/pybamm/expression_tree/scalar.py b/pybamm/expression_tree/scalar.py
index c03ea53fc..1a3cbc70a 100644
--- a/pybamm/expression_tree/scalar.py
+++ b/pybamm/expression_tree/scalar.py
@@ -29,11 +29,11 @@ class Scalar(pybamm.Symbol):
 
         """
         # set default name if not provided
+        self.value = value
         if name is None:
-            name = str(value)
+            name = str(self.value)
 
         super().__init__(name, domain=domain)
-        self.value = value
 
     @property
     def id(self):
diff --git a/pybamm/expression_tree/symbol.py b/pybamm/expression_tree/symbol.py
index 7b22fafd2..24c586278 100644
--- a/pybamm/expression_tree/symbol.py
+++ b/pybamm/expression_tree/symbol.py
@@ -354,13 +354,12 @@ class Symbol(anytree.NodeMixin):
         evaluate : evaluate the expression
 
         """
-
         # if any of the nodes are instances of any of these types, then the whole
         # expression depends on either t or y
         search_types = (pybamm.Variable, pybamm.StateVector, pybamm.IndependentVariable)
 
         # do the search, return true if no relevent nodes are found
-        return all([not isinstance(n, search_types) for n in self.pre_order()])
+        return all([not (isinstance(n, search_types)) for n in self.pre_order()])
 
     def evaluates_to_value(self, value):
         """
@@ -379,7 +378,11 @@ class Symbol(anytree.NodeMixin):
         evaluate : evaluate the expression
 
         """
-        return self.evaluates_to_number() and self.evaluate() == value
+        return (
+            self.is_constant()
+            and self.evaluates_to_number()
+            and self.evaluate() == value
+        )
 
     def evaluates_to_number(self):
         """
diff --git a/pybamm/meshes/meshes.py b/pybamm/meshes/meshes.py
index 64909a1d0..f5b82ff9d 100644
--- a/pybamm/meshes/meshes.py
+++ b/pybamm/meshes/meshes.py
@@ -46,6 +46,7 @@ class Mesh(dict):
             self[domain] = [
                 submesh_types[domain](geometry[domain]["primary"], submesh_pts[domain])
             ] * repeats
+        self.add_ghost_meshes()
 
     def combine_submeshes(self, *submeshnames):
         """Combine submeshes into a new submesh, using self.submeshclass
diff --git a/pybamm/models/reaction_diffusion.py b/pybamm/models/reaction_diffusion.py
index 4fe39ff24..2cae8a8e4 100644
--- a/pybamm/models/reaction_diffusion.py
+++ b/pybamm/models/reaction_diffusion.py
@@ -38,3 +38,6 @@ class ReactionDiffusionModel(pybamm.BaseModel):
 
         # Create own model from diffusion model
         self.update(diffusion_model)
+
+        # Add j to variables dict
+        self.variables.update({"Interfacial current density": j})
diff --git a/pybamm/parameters/parameter_values.py b/pybamm/parameters/parameter_values.py
index b3d66c27d..3f3eb09dd 100644
--- a/pybamm/parameters/parameter_values.py
+++ b/pybamm/parameters/parameter_values.py
@@ -114,6 +114,28 @@ class ParameterValues(dict):
         for idx, equation in enumerate(model.events):
             model.events[idx] = self.process_symbol(equation)
 
+    def process_discretised_model(self, model, disc):
+        """Process a discretised model.
+        Currently inplace, could be changed to return a new model.
+
+        Parameters
+        ----------
+        model : :class:`pybamm.models.core.BaseModel` (or subclass) instance
+            Model to assign parameter values for
+        disc : :class:`pybamm.Discretisation`
+            The class that was used to discretise
+
+        """
+        # process parameter values for the model
+        self.process_model(model)
+
+        # update discretised quantities using disc
+        model.concatenated_rhs = disc.concatenate(*model.rhs.values())
+        model.concatenated_algebraic = disc.concatenate(*model.algebraic.values())
+        model.concatenated_initial_conditions = disc._concatenate_init(
+            model.initial_conditions
+        ).evaluate(0, None)
+
     def process_geometry(self, geometry):
         """Assign parameter values to a geometry.
             Currently inplace, could be changed to return a new model.
@@ -134,6 +156,7 @@ class ParameterValues(dict):
 
     def process_symbol(self, symbol):
         """Walk through the symbol and replace any Parameter with a Value.
+        Can process a model either before or after discretisation
 
         Parameters
         ----------
@@ -148,7 +171,8 @@ class ParameterValues(dict):
         """
         if isinstance(symbol, pybamm.Parameter):
             value = self.get_parameter_value(symbol)
-            return pybamm.Scalar(value, domain=symbol.domain)
+            # Scalar inherits name (for updating parameters) and domain (for Broadcast)
+            return pybamm.Scalar(value, name=symbol.name, domain=symbol.domain)
 
         elif isinstance(symbol, pybamm.FunctionParameter):
             new_child = self.process_symbol(symbol.children[0])
@@ -161,38 +185,49 @@ class ParameterValues(dict):
                 new_diff_variable = self.process_symbol(symbol.children[0])
                 return function.diff(new_diff_variable)
 
+        elif isinstance(symbol, pybamm.Scalar):
+            # update any Scalar nodes if their name is in the parameter dict (no error)
+            try:
+                value = self.get_parameter_value(symbol)
+            except KeyError:
+                # KeyError -> name not in parameter dict, don't update, return old value
+                value = symbol.value
+            return pybamm.Scalar(value, name=symbol.name, domain=symbol.domain)
+
         elif isinstance(symbol, pybamm.BinaryOperator):
             left, right = symbol.children
             new_left = self.process_symbol(left)
             new_right = self.process_symbol(right)
             return symbol.__class__(new_left, new_right)
 
-        elif isinstance(symbol, pybamm.Broadcast):
-            new_child = self.process_symbol(symbol.children[0])
-            return pybamm.Broadcast(new_child, symbol.domain)
-
-        elif isinstance(symbol, pybamm.Function):
-            new_child = self.process_symbol(symbol.children[0])
-            return pybamm.Function(symbol.func, new_child)
-
-        elif isinstance(symbol, pybamm.Integral):
-            new_child = self.process_symbol(symbol.children[0])
-            return pybamm.Integral(new_child, symbol.integration_variable)
-
-        elif isinstance(symbol, pybamm.BoundaryValue):
-            new_child = self.process_symbol(symbol.children[0])
-            return pybamm.BoundaryValue(new_child, symbol.side)
-
         elif isinstance(symbol, pybamm.UnaryOperator):
             new_child = self.process_symbol(symbol.children[0])
-            return symbol.__class__(new_child)
+            if isinstance(symbol, pybamm.NumpyBroadcast):
+                return pybamm.NumpyBroadcast(new_child, symbol.domain, symbol.mesh)
+            if isinstance(symbol, pybamm.Broadcast):
+                return pybamm.Broadcast(new_child, symbol.domain)
+            elif isinstance(symbol, pybamm.Function):
+                return pybamm.Function(symbol.func, new_child)
+            elif isinstance(symbol, pybamm.Integral):
+                return pybamm.Integral(new_child, symbol.integration_variable)
+            elif isinstance(symbol, pybamm.NodeToEdge):
+                return pybamm.NodeToEdge(new_child, symbol.node_to_edge_function)
+            elif isinstance(symbol, pybamm.BoundaryValue):
+                return pybamm.BoundaryValue(new_child, symbol.side)
+            else:
+                return symbol.__class__(new_child)
 
+        # Concatenations
         elif isinstance(symbol, pybamm.Concatenation):
             new_children = []
             for child in symbol.children:
                 new_child = self.process_symbol(child)
                 new_children.append(new_child)
-            return pybamm.Concatenation(*new_children)
+            if isinstance(symbol, pybamm.DomainConcatenation):
+                return pybamm.DomainConcatenation(new_children, symbol.mesh)
+            else:
+                # Concatenation or NumpyConcatenation
+                return symbol.__class__(*new_children)
 
         else:
             new_symbol = copy.deepcopy(symbol)
diff --git a/pybamm/spatial_methods/finite_volume.py b/pybamm/spatial_methods/finite_volume.py
index ec0e7f10d..1354795e6 100644
--- a/pybamm/spatial_methods/finite_volume.py
+++ b/pybamm/spatial_methods/finite_volume.py
@@ -60,17 +60,7 @@ class FiniteVolume(pybamm.SpatialMethod):
 
         See :meth: `pybamm.SpatialMethod.broadcast`
         """
-
-        broadcasted_symbol = pybamm.NumpyBroadcast(symbol, domain, self.mesh)
-
-        # if the broadcasted symbol evaluates to a constant value, replace the
-        # symbol-Vector multiplication with a single array
-        if broadcasted_symbol.is_constant():
-            broadcasted_symbol = pybamm.Array(
-                broadcasted_symbol.evaluate(), domain=broadcasted_symbol.domain
-            )
-
-        return broadcasted_symbol
+        return pybamm.NumpyBroadcast(symbol, domain, self.mesh)
 
     def gradient(self, symbol, discretised_symbol, boundary_conditions):
         """Matrix-vector multiplication to implement the gradient operator.
@@ -538,6 +528,10 @@ class NodeToEdge(pybamm.SpatialOperator):
         )
         self._node_to_edge_function = node_to_edge_function
 
+    @property
+    def node_to_edge_function(self):
+        return self._node_to_edge_function
+
     def evaluate(self, t=None, y=None):
         """ See :meth:`pybamm.Symbol.evaluate()`. """
         evaluated_child = self.children[0].evaluate(t, y)

Changable parameters 
**Summary**
Add ability to have parameter values that change without recreating the tree. 

- Add an extra subclass of symbol `ChangableParameter`. 
- Do not insert any values for `ChangableParameters` when we `params.process(model)` 
- During `params.process(model)` replace each `ChangableParameter` by `changable_parameters[ChangableParameters]` (a dict with keys that are the changable paramerters).
- add an extra optional input to `model.concatenated_rhs.evaluate(t, y, changable_params)` which is a dict of the changed parameters with their values which will update the `changable_parameters` dict. 
- create a model.set_param() which takes in a dict of parameter values and puts them into the correct location in the changable_params vector

 **Motivation**
 Allows parameters to be changed easily without rebuilding the tree. Efficiently changing parameter values is a requirement of the control community. 

Time dependent functions could also be implemented within this approach. 

**Questions** 
It would be possible to have this as the default approach for setting all parameters. We should consider this as it means someone doesn't need to rebuild the discretisation if they realise afterwards that they want to change a parameter value. I also don't think that this will slow thing down to any great extent. We would also only pass in the parameters values that are changed an update the parameters dict. 
What are peoples thought on this? 

diff --git a/tests/shared.py b/tests/shared.py
index 6ed712bea..b1106df3b 100644
--- a/tests/shared.py
+++ b/tests/shared.py
@@ -21,17 +21,7 @@ class SpatialMethodForTesting(pybamm.SpatialMethod):
         return pybamm.Vector(symbol_mesh[0].nodes)
 
     def broadcast(self, symbol, domain):
-        # for finite volume we send variables to cells and so use number_of_cells
-        broadcasted_symbol = pybamm.NumpyBroadcast(symbol, domain, self.mesh)
-
-        # if the broadcasted symbol evaluates to a constant value, replace the
-        # symbol-Vector multiplication with a single array
-        if broadcasted_symbol.is_constant():
-            broadcasted_symbol = pybamm.Array(
-                broadcasted_symbol.evaluate(), domain=broadcasted_symbol.domain
-            )
-
-        return broadcasted_symbol
+        return pybamm.NumpyBroadcast(symbol, domain, self.mesh)
 
     def gradient(self, symbol, discretised_symbol, boundary_conditions):
         n = 0
diff --git a/tests/test_discretisations/test_discretisation.py b/tests/test_discretisations/test_discretisation.py
index b09a02430..d1d29ed08 100644
--- a/tests/test_discretisations/test_discretisation.py
+++ b/tests/test_discretisations/test_discretisation.py
@@ -512,15 +512,13 @@ class TestDiscretise(unittest.TestCase):
 
         # scalar
         broad = disc._spatial_methods[whole_cell[0]].broadcast(a, whole_cell)
-        self.assertIsInstance(broad, pybamm.Array)
         np.testing.assert_array_equal(
             broad.evaluate(), 7 * np.ones_like(combined_submesh[0].nodes)
         )
         self.assertEqual(broad.domain, whole_cell)
 
         broad_disc = disc.process_symbol(broad)
-        # type of broad will be array as broad is constant
-        self.assertIsInstance(broad_disc, pybamm.Array)
+        self.assertIsInstance(broad_disc, pybamm.NumpyBroadcast)
 
         # process Broadcast variable
         disc._y_slices = {var.id: slice(53)}
@@ -554,7 +552,6 @@ class TestDiscretise(unittest.TestCase):
 
         eqn = pybamm.Concatenation(a, b)
         eqn_disc = disc.process_symbol(eqn)
-        self.assertIsInstance(eqn_disc, pybamm.Vector)
         expected_vector = np.concatenate(
             [
                 5 * np.ones_like(mesh["negative electrode"][0].nodes),
diff --git a/tests/test_expression_tree/test_broadcasts.py b/tests/test_expression_tree/test_broadcasts.py
index a83047b87..327f3f9bd 100644
--- a/tests/test_expression_tree/test_broadcasts.py
+++ b/tests/test_expression_tree/test_broadcasts.py
@@ -25,7 +25,7 @@ class TestBroadcasts(unittest.TestCase):
         broad_a = pybamm.Broadcast(1, ["negative electrode"])
         self.assertEqual(broad_a.name, "broadcast")
         self.assertIsInstance(broad_a.children[0], pybamm.Symbol)
-        self.assertEqual(broad_a.children[0].name, str(1))
+        self.assertEqual(broad_a.children[0].name, str(1.0))
         self.assertEqual(broad_a.domain, ["negative electrode"])
 
         b = pybamm.Symbol("b", domain=["negative electrode"])
diff --git a/tests/test_expression_tree/test_concatenations.py b/tests/test_expression_tree/test_concatenations.py
index 2bd9b17f7..b5cb7a1a1 100644
--- a/tests/test_expression_tree/test_concatenations.py
+++ b/tests/test_expression_tree/test_concatenations.py
@@ -102,6 +102,9 @@ class TestConcatenations(unittest.TestCase):
                 [np.full(mesh[a_dom[0]][0].npts, 2), np.full(mesh[b_dom[0]][0].npts, 1)]
             ),
         )
+        # test size and shape
+        self.assertEqual(conc.size, mesh[a_dom[0]][0].npts + mesh[b_dom[0]][0].npts)
+        self.assertEqual(conc.shape, (mesh[a_dom[0]][0].npts + mesh[b_dom[0]][0].npts,))
 
         # check the reordering in case a child vector has to be split up
         a_dom = ["separator"]
@@ -125,6 +128,15 @@ class TestConcatenations(unittest.TestCase):
                 ]
             ),
         )
+        # test size and shape
+        self.assertEqual(
+            conc.size,
+            mesh[b_dom[0]][0].npts + mesh[a_dom[0]][0].npts + mesh[b_dom[1]][0].npts,
+        )
+        self.assertEqual(
+            conc.shape,
+            (mesh[b_dom[0]][0].npts + mesh[a_dom[0]][0].npts + mesh[b_dom[1]][0].npts,),
+        )
 
     def test_concatenation_orphans(self):
         a = pybamm.Variable("a")
diff --git a/tests/test_expression_tree/test_symbol.py b/tests/test_expression_tree/test_symbol.py
index c47dad489..972cb09a4 100644
--- a/tests/test_expression_tree/test_symbol.py
+++ b/tests/test_expression_tree/test_symbol.py
@@ -53,7 +53,7 @@ class TestSymbol(unittest.TestCase):
         self.assertEqual((A @ a).simplify().evaluate(), 0)
 
         # test when other node is a parameter
-        c = pybamm.Parameter('c')
+        c = pybamm.Parameter("c")
         self.assertIsInstance((a + c).simplify(), pybamm.Parameter)
         self.assertIsInstance((c + a).simplify(), pybamm.Parameter)
         self.assertIsInstance((c + b).simplify(), pybamm.Addition)
diff --git a/tests/test_meshes/test_meshes.py b/tests/test_meshes/test_meshes.py
index 349a84377..ed2188983 100644
--- a/tests/test_meshes/test_meshes.py
+++ b/tests/test_meshes/test_meshes.py
@@ -87,8 +87,12 @@ class TestMesh(unittest.TestCase):
         # create mesh
         mesh = mesh_type(geometry, submesh_types, submesh_pts)
         for domain in mesh:
-            self.assertEqual(mesh[domain][0].npts, submesh_pts[domain]["x"])
-            self.assertEqual(len(mesh[domain][0].edges) - 1, submesh_pts[domain]["x"])
+            # ignore ghost cells for this test
+            if "ghost" not in domain:
+                self.assertEqual(mesh[domain][0].npts, submesh_pts[domain]["x"])
+                self.assertEqual(
+                    len(mesh[domain][0].edges) - 1, submesh_pts[domain]["x"]
+                )
 
     def test_combine_submeshes(self):
         param = pybamm.ParameterValues(
diff --git a/tests/test_models/standard_model_tests.py b/tests/test_models/standard_model_tests.py
index 6c5d41005..bb7d00d20 100644
--- a/tests/test_models/standard_model_tests.py
+++ b/tests/test_models/standard_model_tests.py
@@ -53,3 +53,24 @@ class StandardModelTest(object):
         self.test_processing_parameters(param)
         self.test_processing_disc(disc)
         self.test_solving(solver, t_eval)
+
+    def test_update_parameters(self, param):
+        # check if geometry has changed, throw error if so (need to re-discretise)
+        if any(
+            [
+                length in param.keys() and param[length] != self.param[length]
+                for length in [
+                    "Negative electrode width",
+                    "Separator width",
+                    "Positive electrode width",
+                ]
+            ]
+        ):
+            raise ValueError(
+                "geometry has changed, the orginal model needs to be re-discretised"
+            )
+        # otherwise update self.param and change the parameters in the discretised model
+        self.param = param
+        param.process_discretised_model(self.model, self.disc)
+        # Model should still be well-posed after processing
+        self.model.check_well_posedness()
diff --git a/tests/test_parameters/test_parameter_values.py b/tests/test_parameters/test_parameter_values.py
index 4a3320ce8..604278057 100644
--- a/tests/test_parameters/test_parameter_values.py
+++ b/tests/test_parameters/test_parameter_values.py
@@ -234,7 +234,9 @@ class TestParameterValues(unittest.TestCase):
         self.assertTrue(
             isinstance(model.variables["grad_var1"].children[0], pybamm.Variable)
         )
-        self.assertEqual(model.variables["d_var1"].id, (42 * var1).id)
+        self.assertEqual(
+            model.variables["d_var1"].id, (pybamm.Scalar(42, name="d") * var1).id
+        )
         self.assertIsInstance(model.variables["d_var1"].children[0], pybamm.Scalar)
         self.assertTrue(
             isinstance(model.variables["d_var1"].children[1], pybamm.Variable)
diff --git a/tests/test_parameters/test_standard_parameters_lead_acid.py b/tests/test_parameters/test_standard_parameters_lead_acid.py
index 9afaaa151..55802a948 100644
--- a/tests/test_parameters/test_standard_parameters_lead_acid.py
+++ b/tests/test_parameters/test_standard_parameters_lead_acid.py
@@ -69,8 +69,6 @@ class TestStandardParametersLeadAcid(unittest.TestCase):
         processed_s = disc.process_symbol(parameter_values.process_symbol(s))
 
         # test output
-        self.assertIsInstance(processed_s, pybamm.Vector)
-
         combined_submeshes = disc.mesh.combine_submeshes(
             "negative electrode", "separator", "positive electrode"
         )
diff --git a/tests/test_parameters/test_update_parameters.py b/tests/test_parameters/test_update_parameters.py
new file mode 100644
index 000000000..374c40795
--- /dev/null
+++ b/tests/test_parameters/test_update_parameters.py
@@ -0,0 +1,112 @@
+#
+# Tests for updating parameter values
+#
+import pybamm
+
+import unittest
+import numpy as np
+import tests
+
+
+class TestUpdateParameters(unittest.TestCase):
+    def test_update_parameters_eqn(self):
+        a = pybamm.Scalar(1)
+        b = pybamm.Scalar(2, name="test parameter")
+        c = pybamm.Scalar(3)
+        eqn = a + b * c
+        self.assertEqual(eqn.evaluate(), 7)
+
+        parameter_values = pybamm.ParameterValues({"test parameter": 3})
+        eqn_changed = parameter_values.process_symbol(eqn)
+        self.assertEqual(eqn_changed.evaluate(), 10)
+
+    def test_set_and_update_parameters(self):
+        a = pybamm.Scalar(1)
+        b = pybamm.Parameter(name="test parameter")
+        c = pybamm.Scalar(3)
+        eqn = a + b * c
+
+        parameter_values = pybamm.ParameterValues({"test parameter": 2})
+        eqn_changed = parameter_values.process_symbol(eqn)
+        self.assertEqual(eqn_changed.evaluate(), 7)
+
+        parameter_values = pybamm.ParameterValues({"test parameter": 3})
+        eqn_changed_again = parameter_values.process_symbol(eqn_changed)
+        self.assertEqual(eqn_changed_again.evaluate(), 10)
+
+    def test_update_model(self):
+        # standard model
+        model1 = pybamm.ReactionDiffusionModel()
+        modeltest1 = tests.StandardModelTest(model1)
+        modeltest1.test_all()
+        Y1 = modeltest1.solver.y
+
+        # double initial conditions
+        model2 = pybamm.ReactionDiffusionModel()
+        # process and solve the model a first time
+        modeltest2 = tests.StandardModelTest(model2)
+        modeltest2.test_all()
+        # process and solve with updated parameter values
+        parameter_values_update = pybamm.ParameterValues(
+            base_parameters=model2.default_parameter_values,
+            optional_parameters={"Typical current density": 2},
+        )
+        modeltest2.test_update_parameters(parameter_values_update)
+        modeltest2.test_solving()
+        Y2 = modeltest2.solver.y
+
+        # results should be different
+        self.assertNotEqual(np.linalg.norm(Y1 - Y2), 0)
+
+    def test_update_geometry(self):
+        # standard model
+        model1 = pybamm.ReactionDiffusionModel()
+        modeltest1 = tests.StandardModelTest(model1)
+        modeltest1.test_all()
+        T1, Y1 = modeltest1.solver.t, modeltest1.solver.y
+
+        # trying to update the geometry fails
+        parameter_values_update = pybamm.ParameterValues(
+            base_parameters=model1.default_parameter_values,
+            optional_parameters={
+                "Negative electrode width": 0.0002,
+                "Separator width": 0.0003,
+                "Positive electrode width": 0.0004,
+            },
+        )
+        with self.assertRaisesRegex(ValueError, "geometry has changed"):
+            modeltest1.test_update_parameters(parameter_values_update)
+
+        # instead we need to make a new model and re-discretise
+        model2 = pybamm.ReactionDiffusionModel()
+        parameter_values_update = pybamm.ParameterValues(
+            base_parameters=model2.default_parameter_values,
+            optional_parameters={
+                "Negative electrode width": 0.0002,
+                "Separator width": 0.0003,
+                "Positive electrode width": 0.0004,
+            },
+        )
+        modeltest2 = tests.StandardModelTest(model2)
+        modeltest2.test_all(param=parameter_values_update)
+        T2, Y2 = modeltest2.solver.t, modeltest2.solver.y
+        # results should be different
+        for idx in range(len(T1)):
+            j1 = modeltest1.model.variables["Interfacial current density"].evaluate(
+                T1[idx], Y1[:, idx]
+            )
+            j2 = modeltest2.model.variables["Interfacial current density"].evaluate(
+                T2[idx], Y2[:, idx]
+            )
+            self.assertNotEqual(np.linalg.norm(j1 - j2), 0)
+        self.assertNotEqual(np.linalg.norm(Y1 - Y2), 0)
+
+
+if __name__ == "__main__":
+    import sys
+
+    print("Add -v for more debug output")
+
+    if "-v" in sys.argv:
+        debug = True
+    unittest.main()

pip install -e .[dev,docs]
parse_log_pytest
pytest
flake8 sphinx pytest
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
anyio==3.6.2
anytree==2.8.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
async-generator==1.10
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
autograd==1.6.2
Babel==2.11.0
backcall==0.2.0
bleach==4.1.0
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
comm==0.1.4
contextvars==2.4
cycler==0.11.0
dataclasses==0.8
decorator==5.1.1
defusedxml==0.7.1
docutils==0.17.1
entrypoints==0.4
flake8==5.0.4
future==1.0.0
guzzle-sphinx-theme==0.7.11
idna==3.10
imagesize==1.4.1
immutables==0.19
importlib-metadata==4.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
ipykernel==5.5.6
ipython==7.16.3
ipython-genutils==0.2.0
ipywidgets==7.8.5
jedi==0.17.2
Jinja2==3.0.3
json5==0.9.16
jsonschema==3.2.0
jupyter==1.1.1
jupyter-client==7.1.2
jupyter-console==6.4.3
jupyter-core==4.9.2
jupyter-server==1.13.1
jupyterlab==3.2.9
jupyterlab-pygments==0.1.2
jupyterlab-server==2.10.3
jupyterlab_widgets==1.1.11
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
mccabe==0.7.0
mistune==0.8.4
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
nbclassic==0.3.5
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
nest-asyncio==1.6.0
notebook==6.4.10
numpy==1.19.5
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pandas==1.1.5
pandocfilters==1.5.1
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
Pillow==8.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
prometheus-client==0.17.1
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
-e git+https://github.com/pybamm-team/PyBaMM.git@c8e1df9db5474c25fa51bbfaa375f621ffe8a3e7#egg=pybamm
pycodestyle==2.9.1
pycparser==2.21
pyflakes==2.5.0
Pygments==2.14.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pyrsistent==0.18.0
pytest==6.2.4
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==25.1.2
requests==2.27.1
scipy==1.5.4
Send2Trash==1.8.3
six==1.17.0
sniffio==1.2.0
snowballstemmer==2.2.0
Sphinx==4.3.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
terminado==0.12.1
testpath==0.6.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tornado==6.1
traitlets==4.3.3
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
urllib3==1.26.20
wcwidth==0.2.13
webencodings==0.5.1
websocket-client==1.3.1
widgetsnbextension==3.6.10
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: PyBaMM
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - anyio==3.6.2
      - anytree==2.8.0
      - argon2-cffi==21.3.0
      - argon2-cffi-bindings==21.2.0
      - async-generator==1.10
      - autograd==1.6.2
      - babel==2.11.0
      - backcall==0.2.0
      - bleach==4.1.0
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - comm==0.1.4
      - contextvars==2.4
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==5.1.1
      - defusedxml==0.7.1
      - docutils==0.17.1
      - entrypoints==0.4
      - flake8==5.0.4
      - future==1.0.0
      - guzzle-sphinx-theme==0.7.11
      - idna==3.10
      - imagesize==1.4.1
      - immutables==0.19
      - importlib-metadata==4.2.0
      - ipykernel==5.5.6
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - ipywidgets==7.8.5
      - jedi==0.17.2
      - jinja2==3.0.3
      - json5==0.9.16
      - jsonschema==3.2.0
      - jupyter==1.1.1
      - jupyter-client==7.1.2
      - jupyter-console==6.4.3
      - jupyter-core==4.9.2
      - jupyter-server==1.13.1
      - jupyterlab==3.2.9
      - jupyterlab-pygments==0.1.2
      - jupyterlab-server==2.10.3
      - jupyterlab-widgets==1.1.11
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - mccabe==0.7.0
      - mistune==0.8.4
      - nbclassic==0.3.5
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nest-asyncio==1.6.0
      - notebook==6.4.10
      - numpy==1.19.5
      - pandas==1.1.5
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==8.4.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - pycodestyle==2.9.1
      - pycparser==2.21
      - pyflakes==2.5.0
      - pygments==2.14.0
      - pyrsistent==0.18.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyzmq==25.1.2
      - requests==2.27.1
      - scipy==1.5.4
      - send2trash==1.8.3
      - six==1.17.0
      - sniffio==1.2.0
      - snowballstemmer==2.2.0
      - sphinx==4.3.2
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - terminado==0.12.1
      - testpath==0.6.0
      - tornado==6.1
      - traitlets==4.3.3
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - websocket-client==1.3.1
      - widgetsnbextension==3.6.10
prefix: /opt/conda/envs/PyBaMM

tests/test_expression_tree/test_broadcasts.py::TestBroadcasts::test_broadcast_number tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_numpy_domain_concatenation tests/test_parameters/test_update_parameters.py::TestUpdateParameters::test_set_and_update_parameters tests/test_parameters/test_update_parameters.py::TestUpdateParameters::test_update_parameters_eqn
tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_model_concatenation tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_model_dae tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_model_ode tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_visualise tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_model tests/test_parameters/test_update_parameters.py::TestUpdateParameters::test_update_geometry tests/test_parameters/test_update_parameters.py::TestUpdateParameters::test_update_model
tests/test_discretisations/test_discretisation.py::TestDiscretise::test_broadcast tests/test_discretisations/test_discretisation.py::TestDiscretise::test_concatenate_init tests/test_discretisations/test_discretisation.py::TestDiscretise::test_concatenation tests/test_discretisations/test_discretisation.py::TestDiscretise::test_concatenation_of_scalars tests/test_discretisations/test_discretisation.py::TestDiscretise::test_core_NotImplementedErrors tests/test_discretisations/test_discretisation.py::TestDiscretise::test_discretise_slicing tests/test_discretisations/test_discretisation.py::TestDiscretise::test_discretise_spatial_operator tests/test_discretisations/test_discretisation.py::TestDiscretise::test_discretise_spatial_variable tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_complex_expression tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_dict tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_symbol_base tests/test_discretisations/test_discretisation.py::TestDiscretise::test_process_variables_dict tests/test_expression_tree/test_broadcasts.py::TestBroadcasts::test_broadcast tests/test_expression_tree/test_broadcasts.py::TestBroadcasts::test_numpy_broadcast tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_base_concatenation tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_broadcast_and_concatenate tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_concatenation_domains tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_concatenation_orphans tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_domain_error tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_numpy_concatenation_vector_scalar tests/test_expression_tree/test_concatenations.py::TestConcatenations::test_numpy_concatenation_vectors tests/test_expression_tree/test_symbol.py::TestSymbol::test_has_spatial_derivatives tests/test_expression_tree/test_symbol.py::TestSymbol::test_multiple_symbols tests/test_expression_tree/test_symbol.py::TestSymbol::test_orphans tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_diff tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_domains tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_evaluates_to_number tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_evaluation tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_init tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_is_constant tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_methods tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_repr tests/test_expression_tree/test_symbol.py::TestSymbol::test_symbol_simplify tests/test_meshes/test_meshes.py::TestMesh::test_combine_submeshes tests/test_meshes/test_meshes.py::TestMesh::test_ghost_cells tests/test_meshes/test_meshes.py::TestMesh::test_mesh_creation tests/test_meshes/test_meshes.py::TestMesh::test_mesh_sizes tests/test_meshes/test_meshes.py::TestMesh::test_multiple_meshes tests/test_parameters/test_parameter_values.py::TestParameterValues::test_get_parameter_value tests/test_parameters/test_parameter_values.py::TestParameterValues::test_init tests/test_parameters/test_parameter_values.py::TestParameterValues::test_overwrite tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_complex_expression tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_function_parameter tests/test_parameters/test_parameter_values.py::TestParameterValues::test_process_symbol tests/test_parameters/test_parameter_values.py::TestParameterValues::test_read_parameters_csv tests/test_parameters/test_standard_parameters_lead_acid.py::TestStandardParametersLeadAcid::test_concatenated_parameters tests/test_parameters/test_standard_parameters_lead_acid.py::TestStandardParametersLeadAcid::test_current_functions tests/test_parameters/test_standard_parameters_lead_acid.py::TestStandardParametersLeadAcid::test_functions_lead_acid tests/test_parameters/test_standard_parameters_lead_acid.py::TestStandardParametersLeadAcid::test_parameters_defaults_lead_acid
pybamm/parameters/parameter_values.py pybamm/expression_tree/broadcasts.py pybamm/expression_tree/concatenations.py pybamm/expression_tree/scalar.py pybamm/models/reaction_diffusion.py pybamm/discretisations/discretisation.py pybamm/spatial_methods/finite_volume.py pybamm/meshes/meshes.py pybamm/expression_tree/symbol.py
pybamm/parameters/parameter_values.py pybamm/expression_tree/broadcasts.py pybamm/expression_tree/concatenations.py pybamm/expression_tree/scalar.py pybamm/models/reaction_diffusion.py pybamm/discretisations/discretisation.py pybamm/spatial_methods/finite_volume.py pybamm/meshes/meshes.py pybamm/expression_tree/symbol.py