This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

p-norm in FEniCS

0 votes

Is it possible to define a form that is the p-norm of a function in FEniCS?

$G(v) = \|v\|_p = \left( \int v^p d\Omega \right)^{1/p}$

It seems that it is not supported by conventional means, I was wondering if there was a workaround. I would like to use it as my goal in the AdaptiveLinearVariationalSolver()

asked Sep 19, 2016 by miguelito FEniCS Novice (760 points)

1 Answer

+2 votes

u = Function(V)
p = 3.14
p_norm = pow(assemble(pow(u, p)*dx), 1/p)

answered Sep 21, 2016 by Kent-Andre Mardal FEniCS Expert (14,380 points)
...