← Back to team overview

libadjoint team mailing list archive

Re: r379

 

On 06/10/2012 03:06 PM, Patrick Farrell wrote:
On 10/06/12 13:42, Marie E. Rognes wrote:

I had an issue earlier this week when trying to compute a gradient
with respect to a Constant. The derivative resulted in an empty form,
because the differentation variable was not present in the form
(although staring at the code indicated that it was). Replacing
the Constant with a Function over R resolved the issue immediately.

I think that's just a missing try/except catch in the relevant spot.
Can you supply the example?


It's in the beat-adjoint repo; revert to -r 35 and run ischemia.py
(or would you like me to extract a minimal, standalone, running example? ;-) )


On a side note: we might want to reconsider the naming
of the ScalarParameter and InitialConditionParameter:
As far as I've understood now, the latter refers can be any Function
(not just the initial condition for the state variable) however,
this was absolutely not transparent to me.

Yep, it just means the initial value of *any* Function, not just
the state variable. I agree that is unnecessarily confusing.

How about

ScalarParameter -> ConstantParameter
ScalarParameters -> ConstantParameter (fold the two)
InitialConditionParameter -> InitialValueParameter ?
             (suggestions welcome)

SteadyFunctionParameter?
NonsteadyFunctionParameter?
SteadyDirichletParameter?
NonsteadyDirichletParameter?

(these last two will require some cooperation from Dolfin)


Why do they need different names? Couldn't one just extract the data type from the argument?

--
Marie


Follow ups

References