Should be a method to create a P0 Function from a CellFunction

Bug #908146 reported by Garth Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
New
Undecided
Unassigned

Bug Description

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.

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 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. 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?

Johan

Revision history for this message
Garth Wells (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.

> 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.

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

Revision history for this message
Johan Hake (johan-hake) wrote :

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

Revision history for this message
Anders Logg (logg) wrote :

B1;2802;0cOn Tue, Jan 03, 2012 at 10:24:19AM -0000, Johan Hake wrote:
> 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.

I wouldn't mind adding back precompiled function spaces for P0 and
P1.

--
Anders

> > >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
> > >
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.