www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected 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 const std::vector< ExecFlagType > & execFlags () const
 Get the execution flag for the object. More...
 
ExecFlagType execBitFlags () const
 Build and return the execution flags as a bitfield. More...
 

Static Public Member Functions

static MultiMooseEnum getExecuteOptions ()
 Returns the available options for the 'execute_on' input parameters. More...
 

Protected Attributes

std::vector< ExecFlagType_exec_flags
 execution flag (when is the object executed/evaluated) More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 

Friends

class FEProblemBase
 

Detailed Description

Definition at line 32 of file SetupInterface.h.

Constructor & Destructor Documentation

SetupInterface::SetupInterface ( const MooseObject moose_object)

While many of the MOOSE systems inherit from this interface, it doesn't make sense for them all to adjust their execution flags. Our way of dealing with this is by not having those particular classes add the this classes valid params to their own. In those cases it won't exist so we just set it to a default and ignore it.

Definition at line 42 of file SetupInterface.C.

44  (moose_object->parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"))
45  ->getCurrentExecuteOnFlag())
46 {
47  const InputParameters & params = moose_object->parameters();
48 
56  if (params.have_parameter<bool>("check_execute_on") && params.get<bool>("check_execute_on"))
57  {
58  MultiMooseEnum flags = params.get<MultiMooseEnum>("execute_on");
60  }
61 
62  else
63  _exec_flags.push_back(EXEC_LINEAR);
64 }
Object is evaluated in every residual computation.
Definition: MooseTypes.h:96
const ExecFlagType & _current_execute_flag
Reference to FEProblemBase.
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.
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...
std::vector< ExecFlagType > _exec_flags
execution flag (when is the object executed/evaluated)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
std::vector< ExecFlagType > vectorStringsToEnum< ExecFlagType >(const MultiMooseEnum &v)
Definition: Conversion.C:356
SetupInterface::~SetupInterface ( )
virtual

Definition at line 66 of file SetupInterface.C.

66 {}

Member Function Documentation

ExecFlagType SetupInterface::execBitFlags ( ) const

Build and return the execution flags as a bitfield.

Definition at line 100 of file SetupInterface.C.

Referenced by EigenExecutionerBase::init().

101 {
102  unsigned int exec_bit_field = EXEC_NONE;
103  for (unsigned int i = 0; i < _exec_flags.size(); ++i)
104  exec_bit_field |= _exec_flags[i];
105 
106  return static_cast<ExecFlagType>(exec_bit_field);
107 }
std::vector< ExecFlagType > _exec_flags
execution flag (when is the object executed/evaluated)
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
const std::vector< ExecFlagType > & SetupInterface::execFlags ( ) const
virtual

Get the execution flag for the object.

Reimplemented in MultiAppTransfer.

Definition at line 94 of file SetupInterface.C.

Referenced by ExecuteMooseObjectWarehouse< T >::addObjectMask(), and MultiAppTransfer::execFlags().

95 {
96  return _exec_flags;
97 }
std::vector< ExecFlagType > _exec_flags
execution flag (when is the object executed/evaluated)
MultiMooseEnum SetupInterface::getExecuteOptions ( )
static

Returns the available options for the 'execute_on' input parameters.

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

Definition at line 110 of file SetupInterface.C.

Referenced by AddNodalNormalsAction::act(), AdvancedOutput::addValidParams(), AdvancedOutput::initExecutionTypes(), OutputOnWarehouse::OutputOnWarehouse(), validParams< CommonOutputAction >(), validParams< Output >(), and validParams< SetupInterface >().

111 {
112  return MultiMooseEnum("none=0x00 initial=0x01 linear=0x02 nonlinear=0x04 timestep_end=0x08 "
113  "timestep_begin=0x10 final=0x20 custom=0x100",
114  "linear");
115 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void SetupInterface::initialSetup ( )
virtual
void SetupInterface::jacobianSetup ( )
virtual

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

Definition at line 79 of file SetupInterface.C.

80 {
81 }
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 84 of file SetupInterface.C.

85 {
86 }
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, and NodalUserObject.

Definition at line 89 of file SetupInterface.C.

90 {
91 }
void SetupInterface::timestepSetup ( )
virtual

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

Reimplemented in SolutionUserObject, NumNonlinearIterations, and MemoryUsage.

Definition at line 74 of file SetupInterface.C.

75 {
76 }

Friends And Related Function Documentation

friend class FEProblemBase
friend

Definition at line 88 of file SetupInterface.h.

Member Data Documentation

const ExecFlagType& SetupInterface::_current_execute_flag
protected

Reference to FEProblemBase.

Definition at line 85 of file SetupInterface.h.

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

execution flag (when is the object executed/evaluated)

Definition at line 82 of file SetupInterface.h.

Referenced by execBitFlags(), execFlags(), and SetupInterface().


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