← Back to team overview

ffc team mailing list archive

Re: DG operators for BDM

 

Quoting Fredrik Bengzon <fredrik.bengzon@xxxxxxxxxxx>:

> Hello
> I'm wondering if there is some simple way (i.e., other than component 
> wise) of writing the term
> 
> integral ( [ outer(n, v) ] : < grad u > ) dS

If I do the following:

element = FiniteElement("BDM", "triangle", 1)

v = TrialFunction(element)
u = TestFunction(element)
n = FacetNormal("triangle")

print "jump", jump(outer(n,v))
print "avg", avg(grad(u))

a = dot(jump(outer(n,v)), avg(grad(u)))*dS

print "a", a

at least the output (the print statements) looks OK as far as I can tell, but
have a look. The above form will however produce an error in simplify.py. Maybe
you can have a look and see what is going wrong?

Kristian

> where the test and trial functions u, and v are BDM functions. Here 
> outer(n,v) is the outer product of the normal n and v, [] is the jump, 
> and <> the average operator. Can you use some sort of python arrays to 
> do the outer product, for instance? Also is there a way of imposing 
> constraints using FFC; I'm thinking of the pressure in the Stokes 
> equations for instance which sometimes is required to have a zero integral?
> 
> Regards
>  
> Fredrik Bengzon
> 
> 
> 
> 
> 
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
> 




Follow ups

References