Lp norm with p rational number

More
6 years 5 months ago - 6 years 5 months ago #527 by pschroe
Hey guys,

I have yet another question ;)
Say I want to measure an error not in the usual L^2 norm, but instead, e.g., in the L^(3/2) norm.

Attached you'll find a script with a Poisson example where my naive attempt of computing the L^(3/2) error does not work.

I would appreciate your help!

Best, Philipp
Attachments:
Last edit: 6 years 5 months ago by pschroe.
More
6 years 5 months ago #528 by schruste
Hi Philipp,

I suggest you write your term as exp(1.5*log(ABS(...))) or ABS(...)*sqrt(ABS(...)).

Best, Christoph
The following user(s) said Thank You: pschroe
More
6 years 5 months ago #529 by pschroe
Oh well, sometimes it is easier than it seems, thanks :)

Just for the record, the following works:
Code:
def POW(a,b): return exp(log(a)*b) L32err = POW(Integrate(POW(ABS(gfu-exact),3/2),mesh),2/3)

Best, Philipp
Time to create page: 0.108 seconds