Error when running examples in tutorial: "Shape mismatch in Sum"

Bug #1182044 reported by Maximilian Albert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dolfin-adjoint
Fix Committed
Critical
Patrick Farrell

Bug Description

The main purpose of this bug report is to say that the code on the tutorial page [1] is outdated and throws an error when run with dolfin/ufl 1.2.0. The error itself is not related to dolfin-adjoint, but if anybody knows how to fix it anyway that would be appreciated. Otherwise I'll ask on the dolfin/ufl forums and report back here.

This is the error message I get when running the examples in the tutorial (tutorial1.py and tutorial2.py) with dolfin/ufl version 1.2.0:

==>
Solving linear system of size 61 x 61 (PETSc Krylov solver).
Shape mismatch in Sum.
Traceback (most recent call last):
  File "tutorial1.py", line 18, in <module>
    + nu*grad(u_next)*grad(v))*dx
  File "/usr/lib/python2.7/dist-packages/ufl/exproperators.py", line 194, in _add
    return Sum(self, o)
  File "/usr/lib/python2.7/dist-packages/ufl/algebra.py", line 63, in __new__
    error("Shape mismatch in Sum.")
  File "/usr/lib/python2.7/dist-packages/ufl/log.py", line 154, in error
    raise self._exception_type(self._format_raw(*message))
ufl.log.UFLException: Shape mismatch in Sum.
<==

As an aside, the meshes in the examples are generated using "UnitInterval", which has been deprecated in dolfin 1.1. The code should be updated to use "UnitInvervalMesh".

Many thanks!

[1] http://dolfin-adjoint.org/documentation/tutorial.html

Revision history for this message
Patrick Farrell (pefarrell) wrote :

Dear Max,

Thanks for letting me know! I hadn't run the tutorial examples since upgrading to 1.2. I've fixed them all now.

Thanks again,

Patrick

Changed in dolfin-adjoint:
importance: Undecided → Critical
status: New → Fix Committed
assignee: nobody → Patrick Farrell (pefarrell)
Revision history for this message
Maximilian Albert (cilix) wrote :

Awesome, thanks a lot!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.