Local high-order regularization and applications to hp-methods