Confine in a closed space