← Back to team overview

fenics team mailing list archive

Re: UFC copy functions

 

On Thu, Feb 24, 2011 at 04:23:36PM +0000, Garth N. Wells wrote:
> We've just added 'create' functions to UFC, but it would also be useful
> to add 'copy' functions. It'd like to get a copy a ufc::dofmap, but I
> can't do it at present. 'create' doesn't work since I don't have the
> mesh available in order to initialise the ufc::dofmap that it returned
> by 'create'.

Implementing copy might be problematic for form compilers since it
would involve copying data that may have been generated as part of the
call to init_mesh and init_cell. It's no big deal in the case of FFC
since only _global_dimension needs to be copied, but it might be
problematic in general. The more functions we add to the interface,
the more work it is to implement the UFC interface.

It would be better to store the Mesh as part of the DofMap so that a
copy can be created using the create function.

--
Anders



Follow ups

References