Is there any natural way to define with UFL the L ^ 1-Norm of a function's coefficients as a Functional? || u ||1 = sum(abs(u.vector())) Can you place non-negative restrictions on the domain of this Functional? Any help is appreciated!
Hi Andre,
Could you please improve the formatting of your question?
Hi Marie, yes I could. I am looking for alternatives to using FEniCS project in optimization problems. I need to minimize the L^1 norm (functional).
I know that L^2 norm can be defined as
u = Function(V) F = Functional(inner(u, u)*dx)
But what about L^1 norm?
||u||1 = sum(abs(u.vector()))
Is there a natural way of defining this type of norm trough the ufl?
# The quadrature is not exact as integrand (in mathematical sense) # is not polynomial - UFL, in fact, operates DOF-wise and keeps # polynomial basis. F = abs(u)*dx # Customize quadrature F = abs(u)*dx(None, {'quadrature_degre': 5})
Jan, thanks for the help.