Subject: [UFC-dev] tabulate_facet_dofs wrong!(?)

From: Anders Logg <[email-masked]>
Date: Tue, 10 Apr 2007 17:42:27 +0200

We have dof_map::tabulate_facet_dofs() and the comment says

/// Tabulate the local-to-global mapping of dofs on a facet of a cell

Shouldn't it rather be a "local-to-local" mapping, that picks out the
subset of the local dofs on the cell that are located on the facet?

For a triangle with one dof at each vertex, num_facet_dofs() should
return 2 (there are 2 vertices on each edge) and tabulate_facet_dofs()
should compute the following arrays of local dofs for each facet:

   facet = 0: [1, 2] (facet 0 is non-incident with vertex 0)
   facet = 1: [0, 2] (facet 1 is non-incident with vertex 1)
   facet = 2: [0, 1] (facet 2 is non-incident with vertex 2)

It doesn't make sense to tabulate the global dofs. One could get that
anyway by a direct lookup in the array computed by tabulate_dofs. (And
one could get the local number by searching.)

/Anders

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Wed, 11 Apr 2007 00:10:30 +0200

My current implementation does what the comment says, but I think
you're right. The local-to-local mapping is needed to modify the
element tensor directly for Dirichlet conditions, and it's cheaper and
easier to go obtain the global dof from the local dof than the other
way around. No searching then.

martin

2007/4/10, Anders Logg <[email-masked]>:
> _______________________________________________
> UFC-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufc-dev
>

-- 
---
Martin Sandve Alnæs
PhD student, Cardiac Computations
Simula Research Laboratory, Norway

---

From: Anders Logg <[email-masked]>
Date: Wed, 11 Apr 2007 11:49:20 +0200

ok, good. I'll change the comment.

/Anders