As I understood Martin's objection it was only concerned with calling expand_indices inside UFL because other UFL algorithms might not work very well with and expression which is expanded.
I use expand_indices just before generating the code, to get rid of the free_indices 'i' and 'j' etc. to make things easier when dealing with things like derivatives and components.
As I understood Martin's objection it was only concerned with calling expand_indices inside UFL because other UFL algorithms might not work very well with and expression which is expanded.
I use expand_indices just before generating the code, to get rid of the free_indices 'i' and 'j' etc. to make things easier when dealing with things like derivatives and components.