Adjoint error estimation and grid adaptation for functional outputs: Application to quasi-one-dimensional flow