Subject: [UFC-dev] dof_map / finite element consistency

From: "Garth N. Wells" <[email-masked]>
Date: Wed, 07 Oct 2009 10:47:53 +0100

We added some time ago

   dof_map::max_local_dimension()

and perhaps we also need

   finite_element::max_local_dimension()

and

   finite_element::local_dimension(const ufc_cell& )

I have a problem for which the number of dofs an element has can grow 
during a computation. You may say that this is then a different element, 
but that would make it hard to handle in DOLFIN and hard to generate 
code for.

Here's an example of an inconsistency. In dolfin::Function, we 
initialise some scratch space for the dof map based on the element space 
dimension,

   dofs = new uint[element.space_dimension()];
   for (uint i = 0; i < element.space_dimension(); i++)
     dofs[i] = 0;

whereas is dolfin::UFC we use dof_map::max_local_dimension().

Garth

---

From: Anders Logg <[email-masked]>
Date: Thu, 8 Oct 2009 13:59:24 +0200

> whereas is dolfin::UFC we use dof_map::max_local_dimension().

Yes, it would be natural to have max_ in both and an optional cell
argument.

But for the finite element class, it would be better to have

  unsigned int max_space_dimension() const;
  unsigned int space_dimension(const cell& cell) const;

rather than (max_)local_dimension, since there is always only one
dimension for an element (not local and global).

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 08 Oct 2009 13:02:43 +0100

> dimension for an element (not local and global).

Yes, these names are what I intended.

We should list things as Blueprints on Launchpad and pick a date on 
which to discuss what should and shouldn't be in the next UFC release. 
Otherwise things bounce around for a long time.

Garth

> --
> Anders
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> DOLFIN-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/dolfin-dev

---

From: Anders Logg <[email-masked]>
Date: Thu, 8 Oct 2009 14:11:29 +0200

> Otherwise things bounce around for a long time.

I just added a copy of this discussion:

https://blueprints.launchpad.net/ufc/+spec/max-space-dimension-in-finite-element

I suggest we try to get closer to DOLFIN 1.0 and when we think we're
close enough, we take a round and look at which things we want to add
to UFC. It's probably good to wait and collect a bunch of changes
since it's a bit of a pain to update UFC (changes needed in both
DOLFIN and the form compilers, and the UFC manual).

We can then release DOLFIN 1.0 and UFC 2.0 at the same time.

--
Anders