import networkx


def is_connected(domain):
    """ Test if a :py:class:`~fieldkit.mesh.Domain` is connected.

    Returns
    -------
    bool
        `True` if the `domain` is a single connected component, and
        `False` otherwise.

    """
    return networkx.is_connected(domain.graph)