uflFunction
By accident I came across the following problem:
from dune.grid import structuredGrid as leafGridView
from ufl import SpatialCoordinate, TrialFunction
from dune.fem.function import uflFunction
from dune.fem.space import lagrange
gridView = leafGridView([0, 0], [1, 1], [4, 4])
space = lagrange(gridView, order = 1)
x = SpatialCoordinate(space)
u = TrialFunction(space)
wrongUfl = u * 5
fct = uflFunction(gridView, name="fct", order=3, ufl=wrongUfl)
This will create code that will not compile since u is not a discrete function or grid function.
I think we should add some more meaningful error message on the Python side.
Question: Where and what to put?