Based on d2Ibr_dV2.m from MATPOWER by Ray Zimmerman, developed
        at PSERC Cornell. See U{http://www.pserc.cornell.edu/matpower/} for
        more information.

        @rtype: tuple
        @return: The 2nd derivatives of complex branch current w.r.t. voltage.

def d2Ibr_dV2(self, Ybr, V, lam):
        """ Based on d2Ibr_dV2.m from MATPOWER by Ray Zimmerman, developed
        at PSERC Cornell. See U{http://www.pserc.cornell.edu/matpower/} for
        more information.

        @rtype: tuple
        @return: The 2nd derivatives of complex branch current w.r.t. voltage.
        """
        nb = len(V)
        ib = range(nb)
        diaginvVm = csr_matrix((ones(nb) / abs(V), (ib, ib)))

        Haa = csr_matrix((-(Ybr.T * lam) / V, (ib, ib)))
        Hva = -1j * Haa * diaginvVm
        Hav = Hva
        Hvv = csr_matrix((nb, nb))

        return Haa, Hav, Hva, Hvv