Now I understand. Thanks. In my case I¹m calculating three QoI for an optimization, but I only want one for the adjoint_error_estimator. I also use the QoISet for those quantities that do not require an adjoint analysis for the sensitivity analysis.
Miguel On 2/22/16, 9:53 AM, "Roy Stogner" <royst...@ices.utexas.edu> wrote: > > >On Mon, 22 Feb 2016, Salazar De Troya, Miguel wrote: > >> inline >> bool QoISet::has_index(unsigned int i) const >> { >> return (_indices.size() <= i || _indices[i]); >> } >> >> Why does it accept as valid indices greater than _indices.size() >> (_indices.size() <= i ) ? For instance, say I have three QoI, but I >> want only to calculate the second QoI; therefore I create a QoISet >> and call add_index(1). This is going to resize _indices to two and >> make them all true (_indices.resize(i+1, true)). Now I am >> calculating 0 and 1, but also when I call QoISet::has_index(2) it is >> also going to accept it as valid. There must be something I am >> missing in the way QoISet is used. > >You're just missing a questionable design decision, IIRC. The idea >was that QoISet::has_index(i) would default to true (because most >people don't bother defining a QoI unless they want to calculate it), >and so the way to define a more limited QoISet is to remove QoIs from >the set, not to add them. >--- >Roy ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users