A fast direct singular boundary method for three-dimensional potential problems. (June 2022)