[firedrake] Problem with Jacobian
Stephan Kramer
s.kramer at imperial.ac.uk
Fri Nov 6 13:01:38 GMT 2015
On 06/11/15 12:40, Buesing, Henrik wrote:
>>> Are you sure the problem isn't that he needs bounds for his solve?
>>> AFAICS dS/dh=0 for h<hw or h>hn. Otherwise shouldn't rewriting this
>>> with conditionals have worked?
>
> @Stephan: So how can I rewrite the attached saturation.py with conditionals?
Sw=conditional(hin>hn, Constant(0.0), conditional(hin<hw, Constant(1.0),
(hin-hn)/(hw-hn)))
This gives you a UFL expression that you can use in a larger system, or
project to some function space.
Cheers
Stephan
More information about the firedrake
mailing list