← Back to team overview

ffc team mailing list archive

Re: form integration

 

In principle UFL isn't concerned with integration method,
since this is the main difference between the form compilers.
But we need this functionality in both form compilers,
so it should be implemented properly in ufl.algorithms
at some point.

Martin



On Fri, Dec 12, 2008 at 11:41 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> I guess it's the following code in monomialtabulation.py that causes
> this:
>
> def __compute_degree(basisfunctions):
>    "Compute total degree for given monomial term."
>    q = 0
>    for v in basisfunctions:
>        q += v.element.degree()
>        for d in v.derivatives:
>            q -= 1
>    return q
>
>
> It just looks at v.element.degree() which for a mixed element returns
>
> def degree(self):
>    "Return degree of polynomial basis"
>    return max([element.degree() for element in self.__elements])
>
>
> So it's a feature/bug. We would need to modify _compute_degree so that
> it calls a new function v.degree() which would look at the element for
> that specific component.
>
> --
> Anders
>
>
> On Fri, Dec 05, 2008 at 05:39:23PM +0100, Kristian Oelgaard wrote:
>>
>> Hi,
>>
>> I stumbled over the following which seems peculiar to me:
>>
>> P2 = VectorElement("Lagrange", "triangle", 2)
>>
>> DG = FiniteElement("Discontinuous Lagrange", "triangle", 0)
>>
>> ME = MixedElement([P2, DG])
>>
>>
>>
>>
>> (v, q) = TestFunctions(ME)
>>
>> (u, p) = TrialFunctions(ME)
>>
>>
>>
>>
>> a = q*p*dx
>>
>>
>> Now, FFC insists that the degree of the above form is 4 and it will therefore
>> use 3x3 integration points. For tensor representation this will lead to an
>> increase in FFC compile time, for quadrature an increase in runtime.
>>
>> Is this a bug? Or something that happens for a good reason and which is hard to
>> do anything about? What will UFL do?
>>
>> Kristian
>>
>>
>> _______________________________________________
>> FFC-dev mailing list
>> FFC-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/ffc-dev
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAklCP+QACgkQTuwUCDsYZdH60wCfam6M9xqYqMJygqmQ/HKHVXfw
> OQwAn2uInqEQz7Qt3/Qkk1qYc8LSPO92
> =V/Dr
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
>


Follow ups

References