Subject: [Fenics] UFC copy functions

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 24 Feb 2011 16:23:36 +0000

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

Garth

---

From: Anders Logg <[email-masked]>
Date: Thu, 24 Feb 2011 20:20:27 +0100

> mesh available in order to initialise the ufc::dofmap that it returned

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

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 24 Feb 2011 19:54:35 +0000

> copy can be created using the create function.

I'm reluctant to add the Mesh to DofMap, since unless we store a copy of
the Mesh the Mesh could change which would make it inconsistent with the
dof map. Also, I've tried to simplify DofMap and minimise the private
data because it can get pretty complex with views, parallel ownership, etc.

For now I've added GenericDofMap::copy(const Mesh& mesh), which is ok.
Internally, DofMap creates some UFCMesh objects which could be avoided
if ufc::dofmaps could be copied.

Garth

---

From: Anders Logg <[email-masked]>
Date: Thu, 24 Feb 2011 21:50:47 +0100

> data because it can get pretty complex with views, parallel ownership, etc.

Good.

> if ufc::dofmaps could be copied.

I was going to suggest something like that.

--
Anders

---

From: Johan Hake <[email-masked]>
Date: Thu, 24 Feb 2011 12:55:59 -0800

On Thursday February 24 2011 12:50:47 Anders Logg 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'.
> > > 

Looking forward to the technical report:

  Parallel dofmap in DOLFIN: The easy way

Johan

> _______________________________________________
> Mailing list: https://launchpad.net/~fenics
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~fenics
> More help   : https://help.launchpad.net/ListHelp