Structure Preserving Algorithms For Oscillato