[firedrake] absolute value of gradient

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Thu Nov 19 09:31:15 GMT 2015


On 18/11/15 21:43, George Ovchinnikov wrote:
> Hi Lawrence,
> 
>> sqrt(dot(grad(w), grad(w)))
> 
> Yes, this is exactly what I meant. I needed to use in Tikhonov
> regularization in method which I'm working with.
> I'm updating on every step w based on the rule
> H(w) - \alpha |\grad(w)|,
> 
> where H(w) is basic updating rule, and |\grad(w)| is a penalty for
> local non-smoothness.

So if w is a Function, you can just add the term alpha *
sqrt(dot(grad(w), grad(w))) to your residual and things should work.
If you really need it in a different function space you'll have to
solve an equation for the mass matrix (to L2 project it into the space).

Lawrence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20151119/a937dbfc/attachment.sig>


More information about the firedrake mailing list