-
-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
proposalSuggested change or additionSuggested change or addition
Description
From @blechta
Expressions have element associated with them. That enables any expression to be used immediately in integrals. This poses several problems:
- Not all expressions are intended to be used in integrals. Why should they have element.
- Attached element does not have any relevance apart of integrals. This is confusing
degree
kwarg being shortcut for Lagrange element is overly confusing.
Proposal is to separate Expression
from ufl.Coefficient
in a following spirit
expression = Expression("x[0]*x[0]")
expression.eval(...) # ok
u = interpolate(expression, some_function_space) # ok
bc = DirichletBC(space, expression, where) # ok
expression*dx # failure: is not ufl expression
Expression(expression, element=...)*dx # ok
create_pointwise_expression(expression, ...)*dx # ok
The last two lines could be renamed to something more sensible, e.g.,
Coefficient(expression, element)*dx # ok
See #2 for discussion about pointwise expressions.
Metadata
Metadata
Assignees
Labels
proposalSuggested change or additionSuggested change or addition