← Back to team overview

ffc team mailing list archive

Strange results for quadrature for mixed Stokes

 

I just fixed a bug in UFL for lhs/rhs when applied to mixed problems
and noticed some strange results for the generated quadrature
code. Nothing serious, but a bit annoying.

There are two different demos in UFL: Stokes.ufl and StokesEquation.ufl.
They should give the same results. The results are the same for tensor
representation, but differ for quadrature. The difference is in the
following code:

1. Code generated from Stokes.ufl

  // Number of operations for primary indices = 90
  for (unsigned int j = 0; j < 15; j++)
  {
    // Number of operations to compute entry = 6
    A[j] += (FE0_C0[ip][j]*F0 + FE0_C1[ip][j]*F1)*W9[ip]*det;
  }

2. Code generated from StokesEquation.ufl

  // Number of operations for primary indices = 120
  for (unsigned int j = 0; j < 15; j++)
  {
    // Number of operations to compute entry = 8
    A[j] += (FE0_C0[ip][j]*F0 + FE0_C1[ip][j]*F1)*-1*-1*W9[ip]*det;
  }

So we get an extra (-1)*(-1) which I guess should be possible to remove?

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups