UFL

Comment 10 for bug 844642

Revision history for this message
Anders Logg (logg) wrote : Re: [Bug 844642] Re: DOLFIN not attaching spatial dim to UFL functions (from Python)

I'm working on it. The problem is that I enabled a bunch of unit tests
that had somehow gone missing from the top level driver file. So
new bugs have been introduced - it's only showing already existing
bugs or possibly broken unit tests.

--
Anders

On Thu, Nov 10, 2011 at 06:28:54PM -0000, Martin Sandve Alnæs wrote:
> I don't want to push my fixes until I can test it towards a green buildbot.
> Can whoever feels responsible fix? Then I can push tomorrow.
> My fix is available on lp:~martinal/ufl/work/ now.
>
> Martin
>
> On 10 November 2011 19:01, Martin Sandve Alnæs <email address hidden> wrote:
> > Actually, I think I've fixed it instead :)
> >
> > Martin
> >
> >
> > On 10 November 2011 15:10, Marie Rognes <email address hidden> wrote:
> >> On 11/10/2011 02:16 PM, Martin Sandve Alnæs wrote:
> >>> A simpler case:
> >>>
> >>>
> >>> from dolfin import *
> >>>
> >>> mesh = UnitSquare(2, 2)
> >>> V = FunctionSpace(mesh, "CG", 1)
> >>> f = Constant(1.0)
> >>> v = TestFunction(V)
> >>>
> >>> F = grad(f*v)[0]*dx
> >>> a, L = system(F)
> >>>
> >>>
> >>> This is expected. Just pass cell to Constant to create
> >>> a well formed UFL expression and it will work fine:
> >>> f = Constant(1.0, cell=mesh.ufl_cell())
> >>>
> >>
> >> Yes.
> >>
> >> So, let's mark the bug as a no fix, and add the "fixed" version as a
> >> unit test to please the blueprint. Ok?
> >>
> >>
> >>
> >> Title:
> >>  DOLFIN not attaching spatial dim to UFL functions (from Python)
> >>
> >> Status in DOLFIN:
> >>  Confirmed
> >>
> >> Bug description:
> >>  I'm getting a UFL error from the Python interface when using the UFL
> >>  commands lhs/rhs because UFL is not getting the spatial dim for
> >>  coefficient functions in forms. lhs/rhs calls expand_derivatives, and
> >>  then this bails out because the spatial dim is unknown (although I'm
> >>  taking derivatives of the coefficient function). I expect that DOLFIN
> >>  is failing to attach this data.
> >>
> >>  I'll post a short piece of code soon and look into, unless someone
> >>  sees a quick fix.
> >>
> >> To manage notifications about this bug go to:
> >> https://bugs.launchpad.net/dolfin/+bug/844642/+subscriptions
> >>
> >
>