← Back to team overview

ufl team mailing list archive

Re: Changing Constant from DG0 to Real in UFL?

 

On 19 October 2011 17:00, Anders Logg <logg@xxxxxxxxx> wrote:
> On Wed, Oct 19, 2011 at 04:47:03PM +0200, Martin Sandve Alnæs wrote:
>> 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.
>
> Seems ok to me.

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


Follow ups

References