“…Structure-preserving algorithms have been widely adopted in many subfields of computational physics, including gravitational simulations [8,9,10,11,12], geophysics [13,14] and plasma physics [15,16,17,18,19,20,21,22,23]. Such algorithms generally derive from variational principles or Hamiltonian systems.…”