Subject: [UFC-dev] tabulate_tensor(....)

From: "Garth N. Wells" <[email-masked]>
Date: Sat, 01 Aug 2009 13:21:43 +0100

It could be useful if tabulate_tensor also accepted an argument which 
specified whether the tensor should be set or added to A, e.g. something 
along the lines

   tabulate_tensor(double* A, const double * const * w, const cell& c,
                   bool add = false);

Garth

---

From: Anders Logg <[email-masked]>
Date: Sun, 2 Aug 2009 15:08:25 +0200

>    tabulate_tensor(double* A, const double * const * w, const cell& c,

That would be fairly easy to do in FFC since we already first reset
the tensor, then add the values, to be able to handle contributions
that are computed with different representation (tensor rep and
quadrature).

When is this needed?

-- 
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: 03 Aug 2009 09:57:16 +0100

>that are computed with different representation (tensor rep and

It would be useful when assembling cell and facet integrals at the same 
time (which is what happens in SystemAssembler).

Another advantage is that it makes UFC more explicit in terms of whether or 
not a user needs to initialise to zero the array into which the element 
tensor is put.

Perhaps the overriding disadvantage is that it would increase the size of 
the generated code inside tabulate_tensor.

Garth