An adaptive weak Galerkin finite element method with hierarchical bases for the elliptic problem