Subject: [Fenics-ufc] Release of UFC 1.6

From: Anders Logg <[email-masked]>
Date: Thu, 10 Feb 2011 13:00:18 +0100

Did we all agree on the new functions to be added in the next UFC
release?

1. create() in finite_element and dof_map:

  virtual finite_element* create() const = 0;
  virtual dof_map* create() const = 0;

2. tabulate_tensor which takes *global* coordinates in all the
integral classes:

  virtual void tabulate_tensor(double* A,
                               const double * const * w,
                               const ufc::cell& c,
                               unsigned int num_quadrature_points,
                               const double * const * quadrature_points,
                               const double * quadrature_weights) const = 0;

If so, I can add those and make a release of UFC 1.6 later today.
It would be good to get the new release out so that it can be
installed on the buildbots (and new code added to DOLFIN that depends
on 1.6 without #ifdefs).

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 10 Feb 2011 12:12:26 +0000

>   virtual dof_map* create() const = 0;

Sounds fine.

> 2. tabulate_tensor which takes *global* coordinates in all the

I'm not sure about global coordinates - could get tricky with non-affine
maps.

> installed on the buildbots (and new code added to DOLFIN that depends

We should also look at the Blueprints for anything else that should be done.

Garth

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

---

From: "Marie E. Rognes" <[email-masked]>
Date: Thu, 10 Feb 2011 18:19:11 +0100

> Did we all agree on the new functions to be added in the next UFC

Yes.

--
Marie

> Mailing list: https://launchpad.net/~dolfin
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~dolfin

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Thu, 10 Feb 2011 18:55:02 +0100

With global coordinates, can't there also be a loss of floating point
precision?

Martin

---

From: Anders Logg <[email-masked]>
Date: Thu, 10 Feb 2011 21:00:54 +0100

I don't have any strong arguments for using global coordinates, but I
think we use global coordinates for most other functions.

Perhaps the strongest argument for local coordinates is that it makes
it easy to use a fixed set of quadrature points (on the reference
cell). Those that need special quadrature points that vary throughout
the mesh will need to map back to the reference cell.

I looked over the blueprints and suggest we implement these:

https://blueprints.launchpad.net/ufc/+spec/create
https://blueprints.launchpad.net/ufc/+spec/topological-dimension
https://blueprints.launchpad.net/ufc/+spec/rename-num-foo-integrals
https://blueprints.launchpad.net/ufc/+spec/remove-dofmap-underscore
+ the quadrature version of tabulate_tensor

There are a few others that are interesting too but I feel they would
require too much work and discussion to get right at this point.

If we implement the above blueprints, we should make it UFC 2.0 since
we change the names of some classes and functions.

Let me know what you think and I can handle the implementation +
release quickly.

--
Anders

On Thu, Feb 10, 2011 at 06:55:02PM +0100, Martin Sandve Alnæs wrote:
> Den 10. feb. 2011 13.12 skrev "Garth N. Wells" <[email-masked]> f lgende:
> >
> >

---

From: Anders Logg <[email-masked]>
Date: Fri, 11 Feb 2011 13:47:28 +0100

> Let me know what you think and I can handle the implementation +

Please look at the above and comment what should go into UFC 1.6 (or
2.0).

Quite a few things depend on it: New features in Marie's branch rely
on the new create() functions so it cannot be merged before the new
UFC is released, which means some other things (shared_ptr stuff in
refine.cpp, refine --> adapt), release of 0.9.10 need to wait.

--
Anders

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Fri, 11 Feb 2011 17:02:43 +0100

> think we use global coordinates for most other functions.

I've been away from this for too long to remember the details easily...
Do we use global coordinates for e.g. finite_element::evaluate_basis?

Martin

---

From: Kristian Ølgaard <[email-masked]>
Date: Fri, 11 Feb 2011 18:24:14 +0100

> Do we use global coordinates for e.g. finite_element::evaluate_basis?

Yes, but check out this blueprint
https://blueprints.launchpad.net/ufc/+spec/evaluate-basis-referencethis.

Kristian

---

From: Kristian Ølgaard <[email-masked]>
Date: Fri, 11 Feb 2011 18:36:47 +0100

> https://blueprints.launchpad.net/ufc/+spec/evaluate-basis-referencethis.

Sorry, the link is:

https://blueprints.launchpad.net/ufc/+spec/evaluate-basis-reference

Kristian

---

From: "Garth N. Wells" <[email-masked]>
Date: Sun, 13 Feb 2011 11:57:44 +0000

> I'm not sure about global coordinates - could get tricky with non-affine

I don't think that we should use global coordinates. Internally, the
generated code will attempt to map from the global coordinates back to
the local coordinates, which is unnecessary if I want to use local
coordinates in the first place.

I suggest using local coordinates, and adding a new function that
transfoms global coordinates to local coordinates. If as user wants to
use global coordinates, they can first use a UFC function to transform
their global coords to local coords, and then feed the local coords into
tabulate_tensor.

Garth

---

From: Anders Logg <[email-masked]>
Date: Sun, 13 Feb 2011 13:08:23 +0100

> coordinates in the first place.

Yes, I think we've agreed on local coordinates.

> their global coords to local coords, and then feed the local coords into

As part of the generated element code? We could have something like

  virtual void affine_map(double* x,
                          const double* xhat,
                          const cell& c) = 0;

  virtual void inverse_affine_map(double* xhat,
                                  const double* x,
                                  const cell& c);

?

Take a look at the blueprints I suggested (separate post). I
don't think we have time to add any major new things to UFC
but the create functions, the tabulate_tensor with quadrature point
argument, the mappings above + possibly some of the renames suggested
in the bluerpints.

--
Anders