The normals used for dof definitions are chosen such that elements on both sides of a facet agree by design in FEniCS. As a consequence half of the facet normals you get should point inwards as you experience.
What do you need this for? The symbolic term for what you ask for would be n = FacetNormal(mesh) a = FacetArea(mesh) term = a*n which you can use in forms directly but not (yet) interpolate. Martin On 1 April 2014 16:08, Miroslav Kuchta <[email protected]> wrote: > Hi everyone, > > for all the cells of my mesh, I'd like to compute the term [outer normal > of edge]*[edge length] > for each edge of the cell. It seemed that this term could be obtained by > interpolating Constant(1, 0) > and Constant(0, 1) to DRT1 space which would yield n_x*[edge length] and > n_y*[edge length] and > then putting the two together. The motivation for this is > > l_i((1, 0)) = \int_{e_i} n_x dl = n_x |e_i|, where l_i is the degree of > freedom of DRT1 on edge ei. > > Unfortunately this approach only works for some edges. Moreover, for edges > that are shared by > two cells I obtained the result vectors that point in the same direction. > Based on the form of l_i, > I imagine that since the normals are pointing in opposite directions, the > signs in the result should > be opposite as well. Is this assumption wrong? It seems that the normal > used in the integral is not > the always the outer one. > > Thanks for answer, Miro > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
