> I don't think this is right.

No, it's right.  Just take into the account default values for the euler_equations arguments.

But for loop could be moved above to the first if clause.