ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01847
Importing Zero
In r946 Zero was exposed to the ufl namespace. What is that used for?
from ufl.constantvalue import PermutationSymbol, Identity, Zero, as_ufl
If it's for internal ffc usage, it can be retrieved as from ufl.classes
import Zero.
If it's needed for users, I would rather add something like:
def zero(*shape):
return Zero(shape)
Usage:
d = cell.d
v = zero(d)
M = zero(d, d)
For consistency and to hide the index dimensions details from the user.
Martin
Follow ups