[firedrake] absolute value of gradient
George Ovchinnikov
lives9 at gmail.com
Wed Nov 18 21:43:30 GMT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
- --George
On 18.11.2015 19:21, Lawrence Mitchell wrote:
> On 18/11/15 15:42, George Ovchinnikov wrote:
>> Hello folks,
>>
>> I have a scalar field in 2D, $w$, say:
>>
>> V = FunctionSpace(mesh, "CG", 1) w = Function(V)
>> w.interpolate(Expression("1"))
>>
>> and I need too find an norm of grad(w) in every point of the
>> given area, i.e. get a scalar field back.
>>
>> I've found no way to iterate through individual elements of
>> grad(w) to be able to do in manually, neither abs(grad(w)) or
>> something similar works. Any ideas? Do I need to solve some
>> variational problem for this, too?
>
> You can't do this pointwise because the strong gradient doesn't
> exist.
>
> What do you later want to use this for. If you need |grad(w)| in
> a form, you can just write it in directly. When you say norm
> grad(w), do you mean:
>
> sqrt(dot(grad(w), grad(w))) ?
>
>
> Lawrence
>
>
>
> _______________________________________________ firedrake mailing
> list firedrake at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJWTPD7AAoJEAmjzQNAL1ujqhsP/0eA5bc/dZmV5otSGuKOUG2b
C42OIoGjKMwyDev8V9Hb3pGU4AHS3A4Si1LWkqCc7ZyTpTf1Xx3Cg+CH/JASwxT3
NFGQ5OitPEZD0LjNq+cZ78pX6sQ2SrVzTD1rcv8LFTKBH3a2Om5Ytzo26SL+wL7h
KGQ9UDCICJqhm4t294QARyoISMfLDvwvyXh9e97bNJl2+1n/OqS1xBcceYnIOn6W
F2EjebF5yG1vfVt7mABP0vdO/cquqVdhyilLgUzzg8eI9QZIDjXo2WGT1t28aSDp
2ypuk4Ew4/Cpb0h4LT/sVvepL1ZezabwwThYKftZEdivvaDWMJh9kNue9HIyna2J
7sXatCjZKnMtCJl6WUOsC8bgFIA0oALJLN2S6cGxmILmAARwHimiIp5EbIlqIvTF
zfW7/gvKcRDeiuVPMo7Qataw5m8b30Q5eHVUNzPuhytZfA7lPI3YjV5EXcNFO0OI
lCjka/aOYHsNrXpcT7G0mCk9GcYsPPLee+vwIl/qj+h9U6AJFOq5iNYlH2AH+vO4
2TumrEf34p2Y74o0GRoYRD3qg9RjuD51vJCTGT4ipDwf+LG0gmv2xd1ItAw5pz5+
wAlsN6I7l+67P9Iq2zOn9k/d85oVm0JSP5jhxJcJUlbKPTKjOAzj3RmhIcyKmHKH
Z760tpuaoSohR01q+KRl
=aUqy
-----END PGP SIGNATURE-----
More information about the firedrake
mailing list