Apologies for the confusion: we updated the API, but haven't changed the documentation or made a release to reflect this. I am travelling for a conference now, but I will fix that as soon as I can.
The short answer to your question: If you had
FinalFunctional(whatever)
change it to
Functional(whatever*dt[FINISH_TIME])
where dt comes pre-defined in dolfin_adjoint. If you've redefined dt (to use it as a timestep length, say), create another time measure and use it like
Long answer: The syntax works as follows:
- *dt means "integrate over all time" (analogous to *dx)
- * dt[0.5] means "evaluate at time=0.5"
- * dt[FINISH_TIME] means "evaluate at the final time"
- * dt[a:b] means "integrate over the time interval a to b
The time integration is currently only working for linear in time, but that will be fixed soon. The evaluation at the end of time works fine.
Dear Emmanuel,
Apologies for the confusion: we updated the API, but haven't changed the documentation or made a release to reflect this. I am travelling for a conference now, but I will fix that as soon as I can.
The short answer to your question: If you had
FinalFunctional (whatever)
change it to
Functional( whatever* dt[FINISH_ TIME])
where dt comes pre-defined in dolfin_adjoint. If you've redefined dt (to use it as a timestep length, say), create another time measure and use it like
dtm = TimeMeasure() whatever* dtm[FINISH_ TIME])
Functional(
Long answer: The syntax works as follows:
- *dt means "integrate over all time" (analogous to *dx)
- * dt[0.5] means "evaluate at time=0.5"
- * dt[FINISH_TIME] means "evaluate at the final time"
- * dt[a:b] means "integrate over the time interval a to b
The time integration is currently only working for linear in time, but that will be fixed soon. The evaluation at the end of time works fine.
Hope this helps,
Patrick