  We show that DM halos, in n--body simulations, have a boundary layer (BL),
separating bound from unbound mass. Let T(r) and W(r) be the kinetic and
potential energies in shells of halos. We find that, in almost all halos: (i)
The virial ratio R=-2T/W has at least one persistent (i.e. resolution
independent) minimum r_c, such that, close to it, (ii) the function w=-d log
W/d log r has a maximum and (iii) the relation R(r_c)=w(r_c) is almost exactly
fulfilled. The radius r_c is the position of BL's, in halos found in
simulations of TCDM and LCDM models, run using ART and GADGET codes at various
resolutions. We find that 97% of the ~300 halos (per model) with M>4.2 10^14
M_s h^-1 owns a BL. Those with no BL are undergoing major mergings. The mass
M_c enclosed in r_c almost coincides with the mass evaluated from velocities,
according to virial theorem. Particles at r>r_c are not in virial equilibrium.
Using r_c we have a density contrast \Delta_c for each halo. For each mass
scale, \Delta_v=178 Omega_m^0.45 is within the range of \Delta_c's, but the
spread in \Delta_c is wide and the average \Delta_c is ~25% smaller than the
corresponding \Delta_v. The matching of properties derived under the assumption
of spherical symmetry is a consequence of violent relaxation destroying
features related to previous ellipsoidal non-linear growth. In turn, the spread
of final \Delta_c's is an imprint of the different 3-D geometries and of the
variable environment during collapses, as suggested by a comparison with Sheth
& Tormen analysis.
