streamlined bordercheck in gaussDisplace