Comment 3 for bug 908146

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 908146] [NEW] Should be a method to create a P0 Function from a CellFunction

On Tuesday January 3 2012 10:46:29 Garth Wells wrote:
> On 3 January 2012 09:03, Johan Hake <email address hidden> wrote:
> > On Friday December 23 2011 16:24:37 Garth Wells wrote:
> >> Public bug reported:
> >>
> >> It would be useful to have a simple and robust way to create a P0
> >> Function from a CellFunction<double/int>. It should be very simple to
> >> implement, but it must make no assumptions on the dof map.
> >>
> >> ** Affects: dolfin
> >> Importance: Undecided
> >> Status: New
> >
> > Then we need to precompile the ufc::element and ufc::dof_map. I am not
> > against this but we had some objections against it when it was removed.
> >
> >From C++ we can require a user to supply the FunctionSpace. From
>
> Python it can be generated via JIT.

Ok

> > If we deside
> > on it it would be nice to have a similare functionality for
> > VertexFunctions which maps to P1 continuous Functions, maybe also
> > something for the FacetFunctions?
>
> Maybe, but MeshFunctions and FE functions in these cases are not
> really the same thing.

Sure, but at least for the P1 the dofs cooincides with the vertices. Special
care need to be taken for parallel dofmaps, but that should be possible to
take care of by iterating over the cells in the constructor.

Johan

> Garth
>
> > Johan
> >
> > --
> > You received this bug notification because you are a member of DOLFIN
> > Core Team, which is subscribed to DOLFIN.
> > https://bugs.launchpad.net/bugs/908146
> >
> > Title:
> > Should be a method to create a P0 Function from a CellFunction
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/dolfin/+bug/908146/+subscriptions