High Order Structure-Preserving Discontinuous Galerkin Methods For Shallow Water Equations And Nonlinear Dirac Equation