[Trilinos-Users] Thyra::ModelEvaluator and NOX

Bartlett, Roscoe A rabartl at sandia.gov
Mon Sep 10 07:40:52 MDT 2007

Hello Marco,

Another suggestion might be to just save your current 'x' and then
compare it to the incoming x to see if it has changed.  This will cost a
little extra (a vector subtraction and a norm calculation) but that
should work, no?  This will relieve you from having to keep track of the
NOX solver iteration.



-----Original Message-----
From: trilinos-users-bounces at software.sandia.gov
[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Roger
P. Pawlowski
Sent: Monday, September 10, 2007 7:08 AM
To: Marco Morandini
Cc: trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] Thyra::ModelEvaluator and NOX

Hi Marco,

Your are correct - NOX does make calls to the model evaluator with
arbitrary values of x.  The reason for this is that globalization
routines such as line searches must perform extra function evaluations
along the direction of interest during the same nonlinear iteration.  So
out of the box, NOX will not work with your code.  However, we have run
into the exact case you describe in a code at Sandia and have worked
around it.  It just makes the model evaluator a little more tricky to
implement.  The trick is to save the auxiliary data needed to perform a
residual evaluation with respect to the current nonlinear iteration.  
During residual evaluations in your model evaluator, query the nox
nonlinear solver to see if the iterate has been incremented. If not,
reuse the same auxiliary data.  As soon as the iterate is incremented,
then update your auxiliary data.  This trick has worked well in the
past.  If you have any questions, feel free to contact me.


Marco Morandini wrote:
> We're interested in using NOX/LOCA in a non-linear finite-element 
> research code.
> Reading from
> http://trilinos.sandia.gov/packages/docs/r8.0/packages/thyra/src/inter
> faces/nonlinear/model_evaluator/ana/fundamental/doc/html/classThyra_1_
> 1ModelEvaluator.html#_details
> I see that the Thyra::ModelEvaluator< Scalar > is a "stateless" model.
> Does this mean that NOX will call it with arbitrary values of the 
> independent variable x, regardless of any previous evaluation?
> I'm asking this because, in our model, the problem state variables are

> updated in an incremental and nonlinear way (the nonlinear nature of 
> the update is fundamental) from a previously known configuration.
> For this reason, at each nonlinear iteration we need, in order to 
> perform the internal update, a (reasonably small) increment of the 
> unknown variables from a previously known configuration.
> So the question is: do you think it is possible to use NOX with this 
> kind of problem?
> Thanks in advance,
> Marco Morandini
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users


Roger P. Pawlowski
Computer Science and Mathematics
Sandia National Laboratories
PO Box 5800, MS-1318
Albuquerque, NM 87185-1318

email: rppawlo at sandia.gov
phone: (505) 284-3740
fax:   (505) 284-5451

Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov

More information about the Trilinos-Users mailing list