https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ReferenceResidualProblem.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
12
14
17{
20
21 params.addClassDescription("Problem that checks for convergence relative to "
22 "a user-supplied reference quantity rather than "
23 "the initial residual");
24
25 return params;
26}
27
32
33void
35{
36 const std::string class_name = "ReferenceResidualConvergence";
37 InputParameters params = _factory.getValidParams(class_name);
38 params.applyParameters(params_to_apply);
40 params.set<bool>("added_as_default") = true;
41 for (const auto & conv_name : getNonlinearConvergenceNames())
42 addConvergence(class_name, conv_name, params);
43}
registerMooseObject("MooseApp", ReferenceResidualProblem)
const std::vector< ConvergenceName > & getNonlinearConvergenceNames() const
Gets the nonlinear system convergence object name(s).
virtual void addConvergence(const std::string &type, const std::string &name, InputParameters &parameters)
Adds a Convergence object.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition FEProblem.h:21
static InputParameters validParams()
Definition FEProblem.C:26
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition Factory.C:68
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Method for applying common parameters.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Interface class shared between ReferenceResidualProblem and ReferenceResidualConvergence.
static InputParameters validParams()
Problem that checks for convergence relative to a user-supplied reference quantity rather than the in...
static InputParameters validParams()
virtual void addDefaultNonlinearConvergence(const InputParameters &params) override
Adds the default nonlinear Convergence associated with the problem.
ReferenceResidualProblem(const InputParameters &params)
Factory & _factory
The Factory for building objects.