def HamSN1D_Hamiltonian(t, u):
    """
    Returns Hamiltonian for the 1DoF saddle-node model.
    Functional form: H = y**2/2 + x**3/3 + x**2/2, with u = (x, y).

    Parameters
    ----------
    t : float
        Time. (This Hamiltonian is independent of time.)

    u : ndarray, shape(n,)
        Points in phase space.

    Returns
    -------
    H : ndarray, shape(n,)
        Hamiltonian at points u, in phase space at time t.
    """
    x, y = u.T
    return 0.5*y*y + x**3/3 + 0.5*x*x