def spatial_variable(self, symbol):
    '\n        Convert a :class:`pybamm.SpatialVariable` node to a linear algebra object that\n        can be evaluated (here, a :class:`pybamm.Vector` on either the nodes or the\n        edges).\n\n        Parameters\n        -----------\n        symbol : :class:`pybamm.SpatialVariable`\n            The spatial variable to be discretised.\n\n        Returns\n        -------\n        :class:`pybamm.Vector`\n            Contains the discretised spatial variable\n        '
    symbol_mesh = self.mesh.combine_submeshes(*symbol.domain)
    if symbol.name.endswith('_edge'):
        return pybamm.Vector(symbol_mesh[0].edges, domain=symbol.domain)
    else:
        return pybamm.Vector(symbol_mesh[0].nodes, domain=symbol.domain)
Convert a :class:`pybamm.SpatialVariable` node to a linear algebra object that
can be evaluated (here, a :class:`pybamm.Vector` on either the nodes or the
edges).

Parameters
-----------
symbol : :class:`pybamm.SpatialVariable`
    The spatial variable to be discretised.

Returns
-------
:class:`pybamm.Vector`
    Contains the discretised spatial variable
def spatial_variable(self, symbol):
    '\n        Convert a :class:`pybamm.SpatialVariable` node to a linear algebra object that\n        can be evaluated (here, a :class:`pybamm.Vector` on either the nodes or the\n        edges).\n\n        Parameters\n        -----------\n        symbol : :class:`pybamm.SpatialVariable`\n            The spatial variable to be discretised.\n\n        Returns\n        -------\n        :class:`pybamm.Vector`\n            Contains the discretised spatial variable\n        '
    symbol_mesh = self.mesh.combine_submeshes(*symbol.domain)
    if symbol.name.endswith('_edge'):
        return pybamm.Vector(symbol_mesh[0].edges, domain=symbol.domain)
    else:
        return pybamm.Vector(symbol_mesh[0].nodes, domain=symbol.domain)