Add fwave functionality to 3D classic code.