On Mon, Dec 22, 2008 at 01:28:26PM +0100, Martin Sandve Alnæs wrote: > On Mon, Dec 22, 2008 at 1:14 PM, Garth N. Wells <[email protected]> wrote: > > > > > > Martin Sandve Alnæs wrote: > >> > >> On Mon, Dec 22, 2008 at 1:02 PM, Garth N. Wells <[email protected]> wrote: > >>> > >>> Martin Sandve Alnæs wrote: > >>>> > >>>> This check isn't general either. > >>>> > >>> Can you give me an example of when it fails? > >> > >> It will fail for symmetric tensor elements. > >> > > > > Which we don't yet support :). > > Which SFC with UFL will support quite soon, > and which our shared interface UFC allows :) > > > >>>> // Test for cell-based element type > >>>> - const uint tdim = mesh.topology().dim(); > >>>> - bool only_cell_dofs = dofmap.needs_mesh_entities(tdim); > >>>> - for (uint i = 0; i < tdim; i++) > >>>> - { > >>>> - if (dofmap.needs_mesh_entities(i)) > >>>> - only_cell_dofs = false; > >>>> - } > >>>> - if (only_cell_dofs) > >>>> + if( dofmap.local_dimension() == std::pow(mesh.topology().dim(), rank) > >>>> ) > >>>> data_type = "cell"; > >>>> > >>>> > >>>> This is the check I suggested to Anders earlier: > >>>> > >>>> const uint tdim = mesh.topology().dim(); > >>>> if(dofmap.num_entity_dofs(tdim) == dofmap.local_dimension()) > >>>> > >>> What does num_entity_dofs(tdim) return? > >>> > >>> Garth > >> > >> The number of dofs associated with a cell (mesh entity of dimension tdim). > >> dofmap.num_entity_dofs(0) would return the number of dofs associated > >> with the vertices. > > > > OK. That would make the test easy. > > > >> > >>>> Or hasn't FFC implemented UFC 1.1 yet? > > > > FFC hasn't implemented num_entity_dofs(tdim) > > > > Garth > > It's more than ten months since UFC 1.1 was > released, it would be nice if FFC implemented it. > > Martin
It should be fairly simple to fix, but a lot of work is piled up for FFC that I plan to look at after the release of DOLFIN 0.9.0. Will the current fix work for a while? -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
