← Back to team overview

ffc team mailing list archive

Re: Issue with optimized quadrature representation

 

On 27 February 2013 23:48, Anders Logg <logg@xxxxxxxxx> wrote:
> I'm trying to get DOLFIN to build against the new UFC branch (the
> foo-ufc-geometry branches) and it works mostly ok now, but for a few
> demos, something strange happens in the optimized quadrature code.
>
> One example that fails is AdaptivePoisson.ufl/h in
> demo/undocumented/auto-adaptive-poisson/. In the new code, the
> following fails to build
>
>     double G[6];
>     G[0] =  - F1*det*(K[0]*K[2] + K[1]*K[3]);
>     G[1] =  - F1*det*(K[2]*K[2] + K[3]*K[3]);
>     G[2] =  - F1*det*(K[0]*K[0] + K[1]*K[1]);
>     G[3] = F1*det;
>     G[4] =  - det*(K[0]*(F4*K[0] + F5*K[2]) + K[1]*(F4*K[1] + F5*K[3]));
>     G[5] =  - det*(K[2]*(F4*K[0] + F5*K[2]) + K[3]*(F4*K[1] + F5*K[3]));
>
> because F1 has not been defined.

F1 is something related to a coefficient function while G are geometry
konstants.
So F1 is always computed after the geometry constants (the first thing
to be computed inside the loop over integration points)
Why F1 is being marked as a geometry constant and not as depending on
integration points I don't know.
I assume what you did in ufc-geometry is to store all the K_** in the
array K, but I don't see how that has an effect on the optimisations.
Perhaps Martin changed something if you are running against ffc dev?

Kristian

> In the old code, that same piece of code is instead
>
>     double G[3];
>     G[0] =  - det*(K_00*K_10 + K_01*K_11);
>     G[1] =  - det*(K_10*K_10 + K_11*K_11);
>     G[2] =  - det*(K_00*K_00 + K_01*K_01);
>
> Any ideas what might have gone wrong?
>
> --
> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ffc
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References