Hypervirial analysis of enclosed quantum mechanical systems. III. Unsymmetrical boundary conditions