www.mooseframework.org
SetupInterface.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
10 #include "SetupInterface.h"
11 #include "Conversion.h"
12 #include "FEProblem.h"
13 
16 {
18 
19  // Add the 'execute_on' input parameter for users to set
21  execute_options = EXEC_LINEAR;
22  params.addParam<ExecFlagEnum>("execute_on", execute_options, execute_options.getDocString());
23  return params;
24 }
25 
27  : _execute_enum(moose_object->parameters().isParamValid("execute_on")
28  ? moose_object->parameters().get<ExecFlagEnum>("execute_on")
29  : _empty_execute_enum),
30  _current_execute_flag(
31  (moose_object->parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"))
32  ->getCurrentExecuteOnFlag())
33 {
34  _empty_execute_enum.clear(); // remove any flags for the case when "execute_on" is not used
35 }
36 
38 
39 void
41 {
42 }
43 
44 void
46 {
47 }
48 
49 void
51 {
52 }
53 
54 void
56 {
57 }
58 
59 void
61 {
62 }
63 
64 const ExecFlagEnum &
66 {
67  return _execute_enum;
68 }
virtual void subdomainSetup()
Gets called when the subdomain changes (i.e.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1147
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual ~SetupInterface()
InputParameters emptyInputParameters()
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:1053
virtual void timestepSetup()
Gets called at the beginning of the timestep before this object is asked to do its job...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
const ExecFlagEnum & getExecuteOnEnum() const
Return the execute on MultiMooseEnum for this object.
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
Definition: ExecFlagEnum.C:39
SetupInterface(const MooseObject *moose_object)
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
static InputParameters validParams()
void clear()
Clear the MultiMooseEnum.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
ExecFlagEnum _empty_execute_enum
Empty ExecFlagEnum for the case when the "execute_on" parameter is not included.
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
virtual void jacobianSetup()
Gets called just before the Jacobian is computed and before this object is asked to do its job...
virtual void residualSetup()
Gets called just before the residual is computed and before this object is asked to do its job...