  Simulating discontinuities is a long standing problem especially for shock
waves with strong nonlinear feather. Despite being a promising method, the
recently developed physics-informed neural network (PINN) is still weak for
calculating discontinuities compared with traditional shock-capturing methods.
In this paper, we intend to improve the shock-capturing ability of the PINN.
The primary strategy of this work is to weaken the expression of the network
near discontinuities by adding a gradient-weight into the governing equations
locally at each residual point. This strategy allows the network to focus on
training smooth parts of the solutions. Then, automatically affected by the
compressible property near shock waves, a sharp discontinuity appears with
wrong inside shock transition-points compressed into well-trained smooth
regions as passive particles. We study the solutions of one-dimensional Burgers
equation and one- and two-dimensional Euler equations. Compared with the
traditional high-order WENO-Z method in numerical examples, the proposed method
can substantially improve discontinuity computing.
