You lost the list here, others may have alternative solutions. Martin 1. apr. 2014 16:46 skrev "Miroslav Kuchta" <[email protected]> følgende:
> On 04/01/2014 04:21 PM, Martin Sandve Alnæs wrote: > > 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. > > > So the normals that I see on the interior edges are the same regardless or > whether I use Raviart-Thomas > or the discontinous Raviart-Thomas? > > > What do you need this for? The symbolic term for what you ask for would > be > > > I'd like to compute divergence of vector u in each cell from the Gauss law > and so I need to integrate normal > fluxes over the cell boundary. If u was linear, then I could do the > integration exactly by midpoint rule and this > is where n*edge_length comes in. > > n = FacetNormal(mesh) > a = FacetArea(mesh) > term = a*n > > which you can use in forms directly but not (yet) interpolate. > > Martin > > Thanks, I'll think about how to put this to use. > > Miro > > > 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
