Structure-preserving general linear methods