Genesis 7:16: "...and the Lord shut him in."
God shut the door of the ark. All outside were shut out. All inside were shut in. Doors are opened and shut according to God's prerogative (e.g. Rev. 3: 7,8; II Cor. 2:12; Col. 4:3).
Jesus said, "I am the door; by me if any man enter in, he shall be saved, and shall go in and out, and find pasture." John 10:9.