Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #1313

Closed
Open
Created May 10, 2017 by James Willenbring@jmwilleMaintainer

[Tempus] WrapperModelEvaluator: add W_prec capability

Created by: bartgol

Currently, the ResidualModelEvaluator does not do anything to allow the use of W_prec. NOX has two ways to get a preconditioner from the model: through model_->create_W_prec() and through model_->get_W_factory()->getPreconditionerFactory()->createPrec() (assuming the prec factory is nonnull). Without the support for W_prec in ResidualModelEvaluator, in order to get NOX to use a preconditioner one must force his/her transientModel object to return a lows factory that does have a valid preconditioner factory

However, this is not always convenient/safe. One may want to always use his/her particular preconditioner for the problem at hand, and writing such a generic structure as a preconditioner factory for just one preconditioner seems too big of a hassle (besides not forcing the user to use the particular preconditioner for the problem). He/she may be better off writing the create_W_prec method in his/her model evaluator, and be done with it.

To fix this, I suggest to add the following lines to the method createOutArgsImpl of ResidualModelEvaluator

   MEB::OutArgsSetup<Scalar> transientOutArgs = transientModel_->createOutArgs();
   if (transientOutArgs.supports(MEB::OUT_ARG_W_prec))
   {
     outArgs.setSupports(MEB::OUT_ARG_W_prec);
   }

add this method to the class

     Teuchos::RCP<Thyra::PreconditionerBase<Scalar> > create_W_prec() const
          { return transientModel_->create_W_prec(); }

and finally add these lines in the evalModelImpl method (right before the call to evalModel of the transientModel)

   if (outArgs.supports(MEB::OUT_ARG_W_prec) && transientOutArgs.supports(MEB::OUT_ARG_W_prec))
   {
     transientOutArgs.set_W_prec(outArgs.get_W_prec());
   }

(the second part in the if may be redundant, I'm not sure).

Assignee
Assign to
Time tracking