J. Yang, "Newton-conjugate-gradient methods for solitary wave computations", J. Comp. Phys. 228, 7007–7024 (2009).
    Fig. 5(b, d): Newton-CG method for a 2D gap soliton near band edges in Eq. (3.15).
    
the code