ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #03758
Re: Tensor contraction bug
Anders Logg wrote:
> On Wed, Feb 17, 2010 at 11:19:53AM +0000, Garth N. Wells wrote:
>> I've run into a tensor contraction bug. The jit log contains:
>>
>> In member function ‘virtual void
>> form_96980ae3ebe60648ee99493c681869c0377c12ac_exterior_facet_integral_0_0::tabulate_tensor(double*,
>> const double* const*, const ufc::cell&, unsigned int) const’:
>> form_96980ae3ebe60648ee99493c681869c0377c12ac.h:1952: error: ‘detJ’ was
>> not declared in this scope
>> error: command 'gcc' failed with exit status 1
>>
>> It seems to related to linear forms which have only an exterior facet
>> integral. In the generated code I see:
>>
>> . . . .
>> const double J_11 = x[2][1] - x[0][1];
>>
>> // Compute determinant of Jacobian
>>
>> // Compute inverse of Jacobian
>>
>> // Get vertices on edge
>> static unsigned int edge_vertices[3][2] = {{1, 2}, {0, 2}, {0, 1}};
>> . . . .
>>
>> Which looks like the detJ has been stripped out, despite being used
>> later in the code.
>>
>> Garth
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~ffc
>> Post to : ffc@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ffc
>> More help : https://help.launchpad.net/ListHelp
>
> ok. Do you have a simple test that fails?
>
Attached is a simple problem that fails.
Garth
> --
> Anders
BDM = FiniteElement("Brezzi-Douglas-Marini", "triangle", 1)
tau = TestFunction(BDM)
sigma = TrialFunction(BDM)
U0 = Coefficient(BDM)
L = dot(tau, U0)*ds
#include <dolfin.h>
#include "MixedPoisson.h"
using namespace dolfin;
int main()
{
// Source term
class MyFunction : public Expression {};
// Create mesh and source term
UnitSquare mesh(32, 32);
MyFunction f;
// Define PDE
MixedPoisson::FunctionSpace V(mesh);
MixedPoisson::LinearForm L(V);
L.U0 = f;
}
Follow ups
References