Kadomtsev–Petviashvili equation: One-constraint method and lump pattern