https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SetupInterface.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
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{
35 .clearSetValues(); // remove any flags for the case when "execute_on" is not used
36}
37
38#ifdef MOOSE_KOKKOS_ENABLED
40 : _execute_enum(object._execute_enum), _current_execute_flag(object._current_execute_flag)
41{
42}
43#endif
44
46
47void
51
52void
56
57void
61
62void
66
67void
71
72const ExecFlagEnum &
InputParameters emptyInputParameters()
const ExecFlagType EXEC_LINEAR
Definition Moose.C:31
A MultiMooseEnum object to hold "execute_on" flags.
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
void clearSetValues()
Clear the MultiMooseEnum.
virtual void residualSetup()
Gets called just before the residual is computed and 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 subdomainSetup()
Gets called when the subdomain changes (i.e.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
static InputParameters validParams()
virtual void timestepSetup()
Gets called at the beginning of the timestep before this object is asked to do its job.
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job.
const ExecFlagEnum & getExecuteOnEnum() const
Return the execute on MultiMooseEnum for this object.
ExecFlagEnum _empty_execute_enum
Empty ExecFlagEnum for the case when the "execute_on" parameter is not included.
SetupInterface(const MooseObject *moose_object)
virtual ~SetupInterface()
ExecFlagEnum getDefaultExecFlagEnum()
Definition MooseUtils.C:972