  In this paper we present energy-conserving, mixed discontinuous Galerkin (DG)
and continuous Galerkin (CG) schemes for the solution of a broad class of
physical systems described by Hamiltonian evolution equations. These systems
often arise in fluid mechanics (incompressible Euler equations) and plasma
physics (Vlasov--Poisson equations and gyrokinetic equations), for example. The
dynamics is described by a distribution function that evolves given a
Hamiltonian and a corresponding Poisson bracket operator, with the Hamiltonian
itself computed from field equations. Hamiltonian systems have several
conserved quantities, including the quadratic invariants of total energy and
the $L_2$ norm of the distribution function. For accurate simulations one must
ensure that these quadratic invariants are conserved by the discrete scheme. We
show that using a discontinuous Galerkin scheme to evolve the distribution
function and ensuring that the Hamiltonian lies in its continuous subspace
leads to an energy-conserving scheme in the continuous-time limit. Further, the
$L_2$ norm is conserved if central fluxes are used to update the distribution
function, but decays monotonically when using upwind fluxes. The conservation
of density and $L_2$ norm is then used to show that the entropy is a
non-decreasing function of time. The proofs shown here apply to any Hamiltonian
system, including ones in which the Poisson bracket operator is non-canonical
(for example, the gyrokinetic equations). We demonstrate the ability of the
scheme to solve the Vlasov--Poisson and incompressible Euler equations in 2D
and provide references where we have applied these schemes to solve the much
more complex 5D electrostatic and electromagnetic gyrokinetic equations.
