← Back to team overview

dolfin team mailing list archive

Re: new Function design in C++

 

For the interpolation between different spaces, is it not possible to have a routine that traverses the mesh cell-by-cell, and computes the interpolant (in space A) from the function in space B by using the coordinates of the DoF from space A? This may only work for largrange type elements; elements like Raviart-Thomas would be more difficult.

- Shawn

On Wed, 22 Oct 2008, Garth N. Wells wrote:

The thread on the new Function design has digressed from the immediate
issue, so I'm restarting it.

The issue is how to deal with user defined functions in C++. What if we
have a design such that:

- All Functions must have a FunctionSpace

- A FunctionSpace does not have to be complete (a complete FunctionSpace
having a Mesh, a FiniteElement and a DofMap). As a minimum requirement,
and FunctionSpace must have a Mesh.

- A FiniteElement and/or DofMap can be attached to a FunctionSpace after
its creation


Related to the functions Function::interpolate(double* coefficients, ..)
for interpolating Functions on cells

- The new Function::interpolate functions do not take a FiniteElement as
an argument, so it is not possible to interpolate a function in a
different space. Is it desirable to allow Functions from one space to be
interpolated in another?

If we do this, would:

- The above allow FiniteElement types to be checked at runtime for
consistency (the FiniteElement passed to Function::interpolate should be
the same as the Functions own FiniteElement for discrete Functions. This
is what we did with the old design.)>

- The above deal with the issue of user-defined functions which have a a
FunctionSpace but no FiniteElement?

- The above deal with special functions, like the mesh size h?

Garth


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev



References