  We consider an open domain with a compact boundary in an Euclidean space and
a Schroedinger operator with magnetic field on this domain. We give sufficient
conditions on the rate of growth of the magnetic field near the boundary which
guarantees essential self-adjointness of this operator. From the physical point
of view, it means that the quantum particle is confined in the domain by the
magnetic field. We construct examples on polytopes and domains with smooth
boundaries; these examples of "magnetic bottles" are highly simplified models
of what is done for nuclear fusion in tokamacs.
