← Back to team overview

ffc team mailing list archive

Re: form integration

 

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

Attachment: signature.asc
Description: Digital signature


Follow ups

References