dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10267
new Function design in C++
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
Follow ups