← Back to team overview

ffc team mailing list archive

Re: Internal integration in discontinuous vector element

 

Quoting Bartosz Sawicki <sawickib@xxxxxxxxxxxxx>:

> I have a problem how to define form for integration over internal facets 
> inside VectorElement("Discontinuous Lagrange", "tetrahedron", 0).
> Having vector function "j" which is constant over element, I want to 
> integrate over all internal facets term dot(j,n), where n is facet 
> normal vector.
> 
> Consider form:
> =====
> element = FiniteElement("Discontinuous Lagrange", "tetrahedron", 0)
> vectorelement = VectorElement("Discontinuous Lagrange", "tetrahedron", 0)
> 
> v = TestFunction(element)
> e = TrialFunction(element)
> j = Function(vectorelement)
> n = FacetNormal("tetrahedron")
> 
> a = v*e*dx
> L = v*dot(j, n)*dS
> =====
> 
> Unfortunately it doesn't work. FFC communicates that "Integrand must be 
> restricted ('+') or ('-') in an interior facet integral". That is 
> confusing for me.

Functions on interior facets can potentially be double valued (in your case they
really are). So you need to tell FFC which value you want.

Maybe you want something like:

L = v*jump(j, n)*dS = v*(dot(j('+'), n('+')) + dot(j('-'), n('-')))*dS

The discontinuous operators are explained in more detail in the FFC manual.

Kristian
 
> Maybe interior integration operator works differently?
> So, would it be possible to use form language to describe such simple 
> algorithm?
> 
> iterate for every cell c:
>    e_i = 0
>    integrate for every facet in cell:
>      e_i += dot(j,n)
>    e(c) = e_i
> 
> 
> regrds.
> BArtek
> 
> 
> 
> 
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
> 




Follow ups

References