of the barriers, i.e., at $|x|>7$, see Eq. (\[potential\]). For this purpose, the DWP is embedded into a broad free-space domain, $%
|x|<L/2$, with zero boundary conditions (b.c.): $$u(|x|=L/2)=0.  \label{bc}$$

Spontaneous symmetry breaking (SSB) of leaky and trapped modes
==============================================================

The structure of symmetric and asymmetric modes
-----------------------------------------------

Numerical solutions of Eq. (\[stationaryNLSE\]) were obtained by means of the shooting and Newton-matrix methods. While the former one makes it possible to find all relevant solutions independently of an input trial function, the latter method can be applied to obtain solution with high accuracy, provided that the initial guess is taken not too far from the final result. For the setting addressed in this paper, the combination of both algorithms is the most efficient way of obtaining stationary solutions.

As is typical for the SSB in systems with self-focusing nonlinearity, it was found that the GS is spatially symmetric below the bifurcation point ($k<k_{%
\mathrm{bif}}$) and asymmetric above it, at $k>k_{\mathrm{bif}}$. The symmetric state exists at $k>k_{\mathrm{bif}}$ too, but in that case it is not a GS, and is no longer stable. As mentioned above, all mean-field phase transitions exhibited by the present system are of the second kind, featuring no 