www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
SetupInterface Class Reference

#include <SetupInterface.h>

Inheritance diagram for SetupInterface:
[legend]

Public Member Functions

 SetupInterface (const MooseObject *moose_object)
 
virtual ~SetupInterface ()
 
virtual void initialSetup ()
 Gets called at the beginning of the simulation before this object is asked to do its job. More...
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual void subdomainSetup ()
 Gets called when the subdomain changes (i.e. More...
 
virtual void customSetup (const ExecFlagType &)
 Gets called in FEProblemBase::execute() for execute flags other than initial, timestep_begin, nonlinear, linear and subdomain. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Attributes

const ExecFlagEnum_execute_enum
 Execute settings for this object. More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 

Private Attributes

ExecFlagEnum _empty_execute_enum
 Empty ExecFlagEnum for the case when the "execute_on" parameter is not included. More...
 

Friends

class FEProblemBase
 

Detailed Description

Definition at line 23 of file SetupInterface.h.

Constructor & Destructor Documentation

◆ SetupInterface()

SetupInterface::SetupInterface ( const MooseObject moose_object)

Definition at line 26 of file SetupInterface.C.

27  : _execute_enum(moose_object->parameters().isParamValid("execute_on")
28  ? moose_object->parameters().get<ExecFlagEnum>("execute_on")
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 }
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const ExecFlagType & _current_execute_flag
Reference to FEProblemBase.
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void clear()
Clear the MultiMooseEnum.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
const InputParameters & parameters() const
Get the parameters of the object.
ExecFlagEnum _empty_execute_enum
Empty ExecFlagEnum for the case when the "execute_on" parameter is not included.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ ~SetupInterface()

SetupInterface::~SetupInterface ( )
virtual

Definition at line 37 of file SetupInterface.C.

37 {}

Member Function Documentation

◆ customSetup()

virtual void SetupInterface::customSetup ( const ExecFlagType )
inlinevirtual

Gets called in FEProblemBase::execute() for execute flags other than initial, timestep_begin, nonlinear, linear and subdomain.

Reimplemented in Function.

Definition at line 61 of file SetupInterface.h.

61 {}

◆ getExecuteOnEnum()

const ExecFlagEnum & SetupInterface::getExecuteOnEnum ( ) const

◆ initialSetup()

void SetupInterface::initialSetup ( )
virtual

Gets called at the beginning of the simulation before this object is asked to do its job.

Reimplemented in SolutionUserObject, AdvancedOutput, MooseVariableBase, MultiApp, MooseLinearVariableFV< OutputType >, MooseLinearVariableFV< ComputeValueType >, MooseLinearVariableFV< T >, MooseLinearVariableFV< RealEigenVector >, MooseLinearVariableFV< RealVectorValue >, MooseLinearVariableFV< Real >, MooseParsedFunction, MooseParsedGradFunction, DerivativeFunctionMaterialBaseTempl< is_ad >, Transfer, ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >, CSV, Exodus, OversampleOutput, Terminator, MultiAppGeneralFieldTransfer, Axisymmetric2D3DSolutionFunction, LibtorchControlValuePostprocessor, MultiAppTransfer, Nemesis, RadialAverage, MooseParsedVectorFunction, ImageFunction, Console, PiecewiseConstantFromCSV, NodalVariableValue, MortarNodalAuxKernelTempl< ComputeValueType >, LibtorchArtificialNeuralNetParameters, TimePeriod, MatDiffusionBase< T >, TransientMultiApp, ElementalVariableValue, GhostingUserObject, InterfaceQpUserObjectBase, MatDiffusionBase< Real >, SolutionAux, MultiAppProjectionTransfer, HistogramVectorPostprocessor, SolutionScalarAux, LinearFVAdvection, LinearFVDiffusion, MultiAppDofCopyTransfer, MultiAppGeneralFieldNearestLocationTransfer, CoarsenedPiecewiseLinear, PiecewiseTabularBase, MatReaction, SideIntegralMaterialPropertyTempl< is_ad >, SideIntegralPostprocessor, MultiAppVariableValueSamplePostprocessorTransfer, NodalPatchRecoveryMaterialProperty, ProjectedStatefulMaterialAuxTempl< T, is_ad >, PiecewiseLinear, FullSolveMultiApp, MultiAppFieldTransfer, MultiAppVariableValueSampleTransfer, PiecewiseLinearBase, MultiAppConservativeTransfer, MultiAppCloneReporterTransfer, MultiAppReporterTransfer, ElementSubdomainModifier, and DerivativeSumMaterialTempl< is_ad >.

Definition at line 40 of file SetupInterface.C.

Referenced by SideIntegralPostprocessor::initialSetup(), ElementalVariableValue::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), and Positions::meshChanged().

41 {
42 }

◆ jacobianSetup()

void SetupInterface::jacobianSetup ( )
virtual

◆ residualSetup()

void SetupInterface::residualSetup ( )
virtual

◆ subdomainSetup()

void SetupInterface::subdomainSetup ( )
virtual

Gets called when the subdomain changes (i.e.

in a Jacobian or residual loop) and before this object is asked to do its job

Reimplemented in MaterialBase, Material, NodalUserObject, GeneralUserObject, Constraint, and ThreadedGeneralUserObject.

Definition at line 60 of file SetupInterface.C.

61 {
62 }

◆ timestepSetup()

void SetupInterface::timestepSetup ( )
virtual

◆ validParams()

InputParameters SetupInterface::validParams ( )
static

Definition at line 15 of file SetupInterface.C.

Referenced by FunctorMaterial::validParams(), AuxScalarKernel::validParams(), Transfer::validParams(), Control::validParams(), Function::validParams(), Output::validParams(), UserObject::validParams(), Sampler::validParams(), FVInterfaceKernel::validParams(), AuxKernelTempl< Real >::validParams(), and MultiApp::validParams().

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 }
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:1056
std::string getDocString() const
Generate a documentation string for the "execute_on" parameter.
Definition: ExecFlagEnum.C:39
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
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...

Friends And Related Function Documentation

◆ FEProblemBase

friend class FEProblemBase
friend

Definition at line 81 of file SetupInterface.h.

Member Data Documentation

◆ _current_execute_flag

const ExecFlagType& SetupInterface::_current_execute_flag
protected

Reference to FEProblemBase.

Definition at line 78 of file SetupInterface.h.

Referenced by PseudoTimestep::execute().

◆ _empty_execute_enum

ExecFlagEnum SetupInterface::_empty_execute_enum
private

Empty ExecFlagEnum for the case when the "execute_on" parameter is not included.

This is private because others should not be messing with it.

Definition at line 71 of file SetupInterface.h.

Referenced by SetupInterface().

◆ _execute_enum

const ExecFlagEnum& SetupInterface::_execute_enum
protected

The documentation for this class was generated from the following files: