Comment 1 for bug 880815

Revision history for this message
eldad (eldad-a) wrote :

in the web tutorial (as well as in the book draft available online) there is a piece of code not compatible with current PPA FEniCS version; I refer to the first code appearing in http://fenicsproject.org/doc/tutorial/fundamentals.html :

# Compute solution
problem = VariationalProblem(a, L, bc)
u = problem.solve()

Running the code as is will result in the output error:

*** Error: Unable to create variational problem.
*** Reason: The VariationalProblem class has been removed. Please visit http://fenicsproject.org/releases/1.0-beta/ to see which changes you need to make to your program..
*** Where: This error was encountered inside variationalproblem.py.

This should be changed to (based on the link in the error output):

# Compute solution
u = Function(V)
problem = LinearVariationalProblem(a, L, u, bc)
solver = LinearVariationalSolver(problem)
solver.solve()