A method is developed for solving bang-bang and singular optimal control problems using adaptive Legendre-Gauss-Radau (LGR) collocation. The method is divided into several parts. First, a structure detection method is developed that identifies switch times in the control and analyzes the corresponding switching function for segments where the solution is either bang-bang or singular. Second, after the structure has been detected, the domain is decomposed into multiple domains such that the multiple-domain formulation includes additional decision variables that represent the switch times in the optimal control. In domains classified as bang-bang, the control is set to either its upper or lower limit. In domains identified as singular, the objective function is augmented with a regularization term to avoid the singular arc. An iterative procedure is then developed for singular domains to obtain a control that lies in close proximity to the singular control. The method is demonstrated on four examples, three of which have either a bang-bang and/or singular optimal control while the fourth has a smooth and nonsingular optimal control. The results demonstrate that the method of this paper provides accurate solutions to problems whose solutions are either bang-bang or singular when compared against previously developed mesh refinement methods that are not tailored for solving nonsmooth and/or singular optimal control problems, and produces results that are equivalent to those obtained using previously developed mesh refinement methods for optimal control problems whose solutions are smooth.