https://mooseframework.inl.gov
ElementReporter.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 // MOOSE includes
11 #include "ElementReporter.h"
12 
15 {
17  params += Reporter::validParams();
18  // Whether or not to always store this object's value
19  // See the override for shouldStore() for more information
20  params.addPrivateParam<bool>("_always_store", true);
21 
22  return params;
23 }
24 
26  : ElementUserObject(parameters), Reporter(this), _always_store(getParam<bool>("_always_store"))
27 {
28 }
29 
30 bool
32 {
33  // Either we always store, or we store if the current execution flag matches
34  // a flag that is within this ElementReporter's 'execute_on'
36 }
static InputParameters validParams()
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
static InputParameters validParams()
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Reporter objects allow for the declaration of arbitrary data types that are aggregate values for a si...
Definition: Reporter.h:47
const ExecFlagEnum & getExecuteOnEnum() const
Return the execute on MultiMooseEnum for this object.
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
bool shouldStore() const override final
const bool _always_store
Whether or not this ElementReporter should always store its information; see shouldStore() ...
static InputParameters validParams()
Definition: Reporter.C:16
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
Definition: UserObject.h:211
ElementReporter(const InputParameters &parameters)