[firedrake] Problem with Jacobian
Buesing, Henrik
HBuesing at eonerc.rwth-aachen.de
Fri Nov 6 14:23:02 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.
>
@Stephan: Thank you! Is there also a way to write the attached enthn.py in UFL notation? Basically I failed to do the int(dm), if dm is a UFL expression. And probably the array access might be a problem?
Thank you!
Henrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enthn.py
Type: application/octet-stream
Size: 491 bytes
Desc: enthn.py
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20151106/56cedd16/attachment.obj>
More information about the firedrake
mailing list