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...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 

Static Public Member Functions

static ExecFlagEnum getExecuteOptions ()
 (DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType More...
 

Protected Attributes

const ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType 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 29 of file SetupInterface.h.

Constructor & Destructor Documentation

◆ SetupInterface()

SetupInterface::SetupInterface ( const MooseObject moose_object)

Definition at line 27 of file SetupInterface.C.

28  : _execute_enum(moose_object->parameters().isParamValid("execute_on")
29  ? moose_object->parameters().get<ExecFlagEnum>("execute_on")
31  _exec_flags(_execute_enum.begin(), _execute_enum.end()), // deprecated TODO: ExecFlagType
33  (moose_object->parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"))
34  ->getCurrentExecuteOnFlag())
35 {
36  _empty_execute_enum.clear(); // remove any flags for the case when "execute_on" is not used
37 }
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the items in the enum.
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...
MooseEnumIterator end() const
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
void clear()
Clear the MultiMooseEnum.
const ExecFlagEnum & _execute_enum
Execute settings for this oejct.
ExecFlagEnum _empty_execute_enum
Empty ExecFlagEnum for the case when the "execute_on" parameter is not included.
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...
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 39 of file SetupInterface.C.

39 {}

Member Function Documentation

◆ execBitFlags()

ExecFlagType SetupInterface::execBitFlags ( ) const

(DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType

Definition at line 85 of file SetupInterface.C.

86 {
87  // TODO: ExecFlagType
88  mooseDeprecated("The execBitFlags method is being removed because MOOSE was updated to use a "
89  "ExecFlagEnum for execute flags. This method maintains the behavior of the "
90  "original method but the use of this method should be removed from your "
91  "application. The ExecFlagEnum should be inspected directly via the "
92  "getExecuteOnEnum() method.");
93 
94  unsigned int exec_bit_field = EXEC_NONE;
95  for (const auto & flag : _exec_flags)
96  exec_bit_field |= flag.id();
97  return ExecFlagType("deprecated", exec_bit_field);
98 }
MooseEnumItem ExecFlagType
Definition: Moose.h:85
const ExecFlagType EXEC_NONE
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const int & id() const
Return the numeric, name, or raw name.
Definition: MooseEnumItem.h:37
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ execFlags()

const std::vector< ExecFlagType > & SetupInterface::execFlags ( ) const
virtual

(DEPRECATED) Get the execution flag for the object TODO: ExecFlagType

Reimplemented in MultiAppTransfer.

Definition at line 73 of file SetupInterface.C.

74 {
75  // TODO: ExecFlagType
76  mooseDeprecated("The execFlags() method is being removed because MOOSE has been updated to use a "
77  "ExecFlagEnum for execute flags. The current flags should be retrieved from "
78  "the \"exeucte_on\" parameters of your object or by using the \"_execute_enum\" "
79  "reference to the parameter or the getExecuteOnEnum() method.");
80 
81  return _exec_flags;
82 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ getExecuteOnEnum()

const ExecFlagEnum & SetupInterface::getExecuteOnEnum ( ) const

Return the execute on MultiMooseEnum for this object.

Definition at line 67 of file SetupInterface.C.

Referenced by ExecuteMooseObjectWarehouse< Transfer >::addObjectMask(), EigenExecutionerBase::init(), AttribExecOns::initFrom(), and MultiAppTransfer::MultiAppTransfer().

68 {
69  return _execute_enum;
70 }
const ExecFlagEnum & _execute_enum
Execute settings for this oejct.

◆ getExecuteOptions()

ExecFlagEnum SetupInterface::getExecuteOptions ( )
static

(DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType

Returns
A MooseEnum with the available 'execute_on' options, the default is 'residual'

Definition at line 101 of file SetupInterface.C.

102 {
103  // TODO: ExecFlagType
104  ::mooseDeprecated("The 'getExecuteOptions' was replaced by the ExecFlagEnum class because MOOSE "
105  "was updated to use this for the execute flags and the new function provides "
106  "additional arguments for modification of the enum.");
108 }
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:724
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ initialSetup()

void SetupInterface::initialSetup ( )
virtual

◆ jacobianSetup()

void SetupInterface::jacobianSetup ( )
virtual

Gets called just before the Jacobian is computed and before this object is asked to do its job.

Reimplemented in EqualValueEmbeddedConstraint.

Definition at line 52 of file SetupInterface.C.

53 {
54 }

◆ residualSetup()

void SetupInterface::residualSetup ( )
virtual

Gets called just before the residual is computed and before this object is asked to do its job.

Definition at line 57 of file SetupInterface.C.

58 {
59 }

◆ 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 Material, Constraint, GeneralUserObject, NodalUserObject, and ThreadedGeneralUserObject.

Definition at line 62 of file SetupInterface.C.

63 {
64 }

◆ timestepSetup()

void SetupInterface::timestepSetup ( )
virtual

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

Reimplemented in SolutionUserObject, VectorPostprocessorVisualizationAux, NumNonlinearIterations, EqualValueEmbeddedConstraint, VectorMemoryUsage, and MemoryUsage.

Definition at line 47 of file SetupInterface.C.

48 {
49 }

Friends And Related Function Documentation

◆ FEProblemBase

friend class FEProblemBase
friend

Definition at line 101 of file SetupInterface.h.

Member Data Documentation

◆ _current_execute_flag

const ExecFlagType& SetupInterface::_current_execute_flag
protected

Reference to FEProblemBase.

Definition at line 98 of file SetupInterface.h.

◆ _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 88 of file SetupInterface.h.

Referenced by SetupInterface().

◆ _exec_flags

const std::vector<ExecFlagType> SetupInterface::_exec_flags
protected

(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType

Definition at line 95 of file SetupInterface.h.

Referenced by execBitFlags(), MultiAppTransfer::execFlags(), and execFlags().

◆ _execute_enum

const ExecFlagEnum& SetupInterface::_execute_enum
protected

Execute settings for this oejct.

Definition at line 92 of file SetupInterface.h.

Referenced by ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), and getExecuteOnEnum().


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