Subject: [Ufl] Changing Constant from DG0 to Real in UFL?

From: Martin Sandve Alnæs <[email-masked]>
Date: Wed, 19 Oct 2011 16:47:03 +0200

I want to change ('',Vector,Tensor)Constant from DG0 to Real in UFL,
as has been done already in PyDOLFIN. It seems to me that only a
couple of lines need to be changed in UFL, and FFC will be unaffected,
but I haven't tried it yet. Does anyone foresee any trouble with this
change? Is it safe enough to do now? Since a dolfin::Constant is
generated for the wrapper code, and this does not have any
constructors making it possible to actually create DG0 functions from
an ufl.Constant, I don't think it's possible for C++ dolfin users to
be affected by this either.

Martin

---

From: Anders Logg <[email-masked]>
Date: Wed, 19 Oct 2011 17:00:44 +0200

> be affected by this either.

Seems ok to me.

--
Anders

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Wed, 19 Oct 2011 17:47:47 +0200

>> be affected by this either.

I did the change locally (see lp:~martinal/ufl/work),
and running the ffc tests results in basically the expected
regressions, like dofmap changes and signatures. Only a few
tabulate_tensor entries changed, but the differences are hard to spot
and seem to be basically FE0 <-> FE1 variable naming changes and some
floating point precision changes in the values.

The dolfin demos all compile, and running a few of them manually
everything looks splendid.

I suggest that some of the FFC devs do a
cd ufl
bzr pull lp:~martinal/ufl/work
<install>

cd ffc
bzr pull lp:~martinal/ffc/work  # just some "triangle"->triangle
test if you want to
update references

and then push the ufl change and ffc references simultaneously so as
not to break stuff.

Going home now.

Martin

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Fri, 21 Oct 2011 12:46:16 +0200

> and then push the ufl change and ffc references simultaneously so as

All dolfin tests pass locally with this change, so I am confident that
this is safe now.

Martin