[Trilinos-Users] evalModel, dfdp with several parameters

Nico Schlömer nico.schloemer at ua.ac.be
Thu May 27 04:06:36 MDT 2010

Hi all,

I'm playing around with that model evaluator here, and one thing about
parameters is not quite clear to me.
Suppose the model has 2 parameters, announced by

createInArgs() const
  inArgs.set_Np( 2 );


createOutArgs() const
  outArgs.set_Np_Ng( 2, 0 );
  outArgs.setSupports( OUT_ARG_DfDp, 0,
DerivativeSupport(DERIV_MV_BY_COL) );

(why are two declarations necessary?).
Now, in evalModel I usually check if

   Teuchos::RCP<Epetra_MultiVector> dfdp_out =

is non-null, and then try to fill it. I noticed that whenever dfdp_out
is not null, then the multi-vector would always just contain one vector,
corresponding to one of the parameters I suppose. I ran the code through
several situations where I would expect the model to need dfdp0 and
dfdfp1, but I can't seem to figure out how the ModelEvaluator tells me
about which one it needs.

Maybe I'm missing something in the setup of the {in,out}Args? I tried to
copy-and-paste this kind of stuff as much as possible from test cases
and examples as I couldn't find documentation on setting and working
with the args.


More information about the Trilinos-Users mailing list