def broadcast(self, symbol, domain, auxiliary_domains, broadcast_type):
    "\n        Broadcast symbol to a specified domain.\n\n        Parameters\n        ----------\n        symbol : :class:`pybamm.Symbol`\n            The symbol to be broadcasted\n        domain : iterable of strings\n            The domain to broadcast to\n        broadcast_type : str\n            The type of broadcast, either: 'primary' or 'full'\n\n        Returns\n        -------\n        broadcasted_symbol: class: `pybamm.Symbol`\n            The discretised symbol of the correct size for the spatial method\n        "
    primary_pts_for_broadcast = sum((self.mesh[dom][0].npts_for_broadcast for dom in domain))
    full_pts_for_broadcast = sum((subdom.npts_for_broadcast for dom in domain for subdom in self.mesh[dom]))
    if (broadcast_type == 'primary'):
        out = pybamm.Outer(symbol, pybamm.Vector(np.ones(primary_pts_for_broadcast), domain=domain))
        out.auxiliary_domains = auxiliary_domains
    elif (broadcast_type == 'full'):
        out = (symbol * pybamm.Vector(np.ones(full_pts_for_broadcast), domain=domain))
    return out
Broadcast symbol to a specified domain.

Parameters
----------
symbol : :class:`pybamm.Symbol`
    The symbol to be broadcasted
domain : iterable of strings
    The domain to broadcast to
broadcast_type : str
    The type of broadcast, either: 'primary' or 'full'

Returns
-------
broadcasted_symbol: class: `pybamm.Symbol`
    The discretised symbol of the correct size for the spatial method
def broadcast(self, symbol, domain, auxiliary_domains, broadcast_type):
    "\n        Broadcast symbol to a specified domain.\n\n        Parameters\n        ----------\n        symbol : :class:`pybamm.Symbol`\n            The symbol to be broadcasted\n        domain : iterable of strings\n            The domain to broadcast to\n        broadcast_type : str\n            The type of broadcast, either: 'primary' or 'full'\n\n        Returns\n        -------\n        broadcasted_symbol: class: `pybamm.Symbol`\n            The discretised symbol of the correct size for the spatial method\n        "
    primary_pts_for_broadcast = sum((self.mesh[dom][0].npts_for_broadcast for dom in domain))
    full_pts_for_broadcast = sum((subdom.npts_for_broadcast for dom in domain for subdom in self.mesh[dom]))
    if (broadcast_type == 'primary'):
        out = pybamm.Outer(symbol, pybamm.Vector(np.ones(primary_pts_for_broadcast), domain=domain))
        out.auxiliary_domains = auxiliary_domains
    elif (broadcast_type == 'full'):
        out = (symbol * pybamm.Vector(np.ones(full_pts_for_broadcast), domain=domain))
    return out