← Back to team overview

dolfin team mailing list archive

Re: Second thoughts on DofMap in Function

 



Anders Logg wrote:
On Wed, Dec 06, 2006 at 11:39:44PM +0100, Garth N. Wells wrote:
Anders Logg wrote:
Do you mean "DofMap associated with mesh and finite element"?

Yep.

I'm ok with that. We could have a DiscreteFunction with two members:

    Vector
    DofMap

That would work.

On second thought, I'm not sure this would work. The current class
FiniteElement has a few other functions than what is accomplished by
the DofMap. We have the value type for the function space (scalar,
vector, tensor) and we have evaluation at vertices with vertexeval()
which is used for output at vertices. So just the DofMap is not
enough.

I know the DofMap has a FiniteElement that can be accessed, but the
FiniteElement is more central. The DofMap is just a way to reorder the
dofs for efficiency.

How about letting

    Function = (vector, mesh, element, dofmap = 0)

so that the dofmap is optional (the pointer migth be 0). If it is
nonzero, the implementation must look at the dofmap when it does
interpolation.


It is nicer having just

  Function = (vector, mesh, element)

The danger is that it offers more possibilities for mistakes - dofs might be remapped without a Function knowing. It's still sometime away, so we don't have to settle on anything just yet.

Garth

?

/Anders



References