From 2910d4904a4ad9f827240e55537ac874f9fb2537 Mon Sep 17 00:00:00 2001 From: schnellerhase <56360279+schnellerhase@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:55:04 +0100 Subject: [PATCH] Fix inconsistent ufl import in biharmonic example --- python/demo/demo_biharmonic.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/python/demo/demo_biharmonic.py b/python/demo/demo_biharmonic.py index bf8f0d9c9bc..a65223749de 100644 --- a/python/demo/demo_biharmonic.py +++ b/python/demo/demo_biharmonic.py @@ -127,11 +127,25 @@ # + import dolfinx -import ufl from dolfinx import fem, io, mesh, plot from dolfinx.fem.petsc import LinearProblem from dolfinx.mesh import CellType, GhostMode -from ufl import CellDiameter, FacetNormal, avg, div, dS, dx, grad, inner, jump, pi, sin +from ufl import ( + CellDiameter, + FacetNormal, + SpatialCoordinate, + TestFunction, + TrialFunction, + avg, + div, + dS, + dx, + grad, + inner, + jump, + pi, + sin, +) # - @@ -207,9 +221,9 @@ # + # Define variational problem -u = ufl.TrialFunction(V) -v = ufl.TestFunction(V) -x = ufl.SpatialCoordinate(msh) +u = TrialFunction(V) +v = TestFunction(V) +x = SpatialCoordinate(msh) f = 4.0 * pi**4 * sin(pi * x[0]) * sin(pi * x[1]) a = (