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
13using namespace libMesh;
14
16
19{
22
23 params.addClassDescription("Problem that checks for convergence relative to "
24 "a user-supplied reference quantity rather than "
25 "the initial residual");
26
27 return params;
28}
29
34
35void
37{
38 const std::string class_name = "ReferenceResidualConvergence";
39 InputParameters params = _factory.getValidParams(class_name);
40 params.applyParameters(params_to_apply);
42 params.set<bool>("added_as_default") = true;
43 for (const auto & conv_name : getNonlinearConvergenceNames())
44 addConvergence(class_name, conv_name, params);
45}
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
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.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...