  In this paper we propose a {\it discontinuous} plane wave neural network
(DPWNN) method with $hp-$refinement for approximately solving Helmholtz
equation and time-harmonic Maxwell equations. In this method, we define a
quadratic functional as in the plane wave least square (PWLS) method with
$h-$refinement and introduce new discretization sets spanned by element-wise
neural network functions with a single hidden layer, where the activation
function on each element is chosen as a complex-valued exponential function
like the plane wave function. The desired approximate solution is recursively
generated by iteratively solving the minimization problem associated with the
functional and the sets described above, which is defined by a sequence of
approximate minimizers of the underlying residual functionals, where plane wave
direction angles and activation coefficients are alternatively computed by
iterative algorithms. For the proposed DPWNN method, the plane wave directions
are adaptively determined in the iterative process, which is different from
that in the standard PWLS method (where the plane wave directions are
preliminarily given). Numerical experiments will confirm that this DPWNN method
can generate approximate solutions with higher accuracy than the PWLS method.
