← Back to team overview

ffc team mailing list archive

Re: Arbitraryness in code generated by quadrature representation?

 

On 01/20/2011 02:55 PM, Kristian Ølgaard wrote:
On 20 January 2011 14:32, Marie E. Rognes<meg@xxxxxxxxx>  wrote:
Repeated runs of the dolfin generate-form-files scripts seems to generate
different code. For instance for the forms defined in

     /demo/undocumented/dg-advection-diffusion/cpp/AdvectionDiffusion.ufl

I get differences of the type

-    G[1] = 0.500000000000000*det*n1;
-    G[2] = 0.500000000000000*det;
+    G[1] = 0.500000000000000*det;
+    G[2] = 0.500000000000000*det*n1;

in tabulate_tensor and corresponding differences for the tensor terms. The
code seems equivalent, but this behaviour makes it tedious to check for
changes in the generated code. Has anyone else experienced this?
Not lately, but I haven't been looking for it either. The quadrature
generator uses dicts heavily, so somewhere we need to throw in a
sorted(.keys()) to get rid of this behaviour but I don't know where
exactly.

Do you have any guesses (other than in quadrature/*)? I can fix if you point me in the right direction.

--
Marie


Follow ups

References