  We present the first systematic work for deriving a posteriori error
estimates for general non-polynomial basis functions in an interior penalty
discontinuous Galerkin (DG) formulation for solving second order linear PDEs.
Our residual type upper and lower bound error estimates measure the error in
the energy norm. The main merit of our method is that the method is
parameter-free, in the sense that all but one solution-dependent constants
appearing in the upper and lower bound estimates are explicitly computable by
solving local eigenvalue problems, and the only non-computable constant can be
reasonably approximated by a computable one without affecting the overall
effectiveness of the estimates in practice. As a side product of our
formulation, the penalty parameter in the interior penalty formulation can be
automatically determined as well. We develop an efficient numerical procedure
to compute the error estimators. Numerical results for a variety of problems in
1D and 2D demonstrate that both the upper bound and lower bound are effective.
