Following up the seminal Spectral Methods in Fluid Dynamics, this book surveys the essential algorithmic and theoretical aspects of spectral methods for complex geometries. The chapter on spectral algorithms for incompressible flow is focused on those algorithms that have proven most useful in practice over the past two decades, has much greater coverage of algorithms for two or more non-periodic directions, and describes how to treat outflow boundaries. The material on spectral methods for compressible flow emphasizes boundary conditions for hyperbolic systems, algorithms for simulation of homogeneous turbulence, and improved methods for shock fitting.