  Energy preserving numerical methods for a certain class of PDEs are derived,
applying the partition of unity method. The methods are extended to also be
applicable in combination with moving mesh methods by the rezoning approach.
These energy preserving moving mesh methods are then applied to the
Benjamin--Bona--Mahony equation, resulting in schemes that exactly preserve an
approximation to one of the Hamiltonians of the system. Numerical experiments
that demonstrate the advantages of the methods are presented.
