On Mon, 26 Oct 2015, Miguel Angel Salazar de Troya wrote:

> Can libmesh handle computing the adjoint solution for several QoI? It looks
> like it can do so by looping over the QoISet, but then when it comes to
> calculate the adjoint solution in ImplicitSystem::adjoint_solve() we don't
> loop over different diff_qoi in FEMSystem::assemble_qoi_derivative (). In
> fact we cannot store several diff_qoi.

Nope.  A single DifferentiableQoI gets asked for all QoI (or for a
QoISet subset of them) at once.  If you want better factored code than
that (which is certainly reasonable!) then it's up to you to implement
a CompoundQoI subclass that combines other DifferentiableQoI members.

I'd have put such a thing in libMesh long ago, except that Paul Bauman
beat me to it in
https://github.com/grinsfem/grins/blob/master/src/qoi/include/grins/composite_qoi.h
with a class which has left me in limbo: the design there is IMHO not
quite good enough to move straight into libMesh but not nearly bad
enough that I've felt any impulse to rewrite it.

My main complaint with Paul's CompositeQoI is just that the members
aren't themselves DifferentiableQoI subclasses; they subclass a
separate and somewhat redundant GRINS::QoIBase.  But that probably
wasn't his fault; IIRC he started on GRINS before I even had
DifferentiableQoI properly refactored out, and he wasn't yet confident
enough with libMesh code to call me out rather than come up with
workarounds when he spotted something poorly factored.
---
Roy

------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to