gmarkall / manycore_form_compiler

MCFC is deprecated. See https://code.launchpad.net/~grm08/ffc/pyop2
https://code.launchpad.net/~grm08/ffc/pyop2
GNU General Public License v3.0
3 stars 1 forks source link

I forgot to multiply the value of the coefficient at the nodes by the value of the basis function at the quadrature point #1

Closed gmarkall closed 13 years ago

gmarkall commented 13 years ago

In the quadrature loop nest, we get:

__shared__ double c_q0[24];
for(int i_g = 0; i_g < 6; i_g++)
{
  for(int i_d_0 = 0; i_d_0 < 2; i_d_0++)
  {
    for(int i_d_1 = 0; i_d_1 < 2; i_d_1++)
    {
      (c_q0[((i_g + (6 * i_d_0)) + (2 * (6 * i_d_1)))] = 0.0);
      for(int i_r_0 = 0; i_r_0 < 3; i_r_0++)
      {
        (c_q0[((i_g + (6 * i_d_0)) + (2 * (6 * i_d_1)))] += c0[((i_d_1 + (2 * i_d_0)) + (2 * (2 * i_r_0)))]);
      };
    };
  };
};

The RHS of the expression should be:

c0[((i_d_1 + (2 * i_d_0)) + (2 * (2 * i_r_0)))]) * CG0[subscript for current basis fn at current quad point]
gmarkall commented 13 years ago

Fixed in [master 5f3b7f6]