On Mon, May 21, 2018 at 10:48 AM, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> wrote:
On 21/05/18 14:50, Matthew Knepley wrote:
> This should do the 1-norm and the \infty-norm

errornorm (and norm, which it uses) compute the L^2 (H1, H(div),
H(curl)) norms.  Adding the p-norm:

||f||_p = (\int |f|^p dx)^(1/p)

is easy to do.

Great, I would take that.
 
The inf-norm is harder, because the the function is not contained in
the hull defined by its piecewise linear interpolant at the nodes.

I thought you could get it by duality, but I am guessing I am wrong (maybe just a bound).

  Thanks,

     Matt
 
Or do you want (not currently implemented, but available via the Vec
representation) the discrete l2/l1/linf norms?  Available as:

with assemble(expr).dat.vec_ro as v:
   v.norm(whatever norm type)

Lawrence



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener