Line data Source code
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 "GeneralReporter.h" 11 : 12 : InputParameters 13 537442 : GeneralReporter::validParams() 14 : { 15 537442 : InputParameters params = GeneralUserObject::validParams(); 16 537442 : params += Reporter::validParams(); 17 : 18 : // Whether or not to always store this object's value 19 : // See the override for shouldStore() for more information 20 537442 : params.addPrivateParam<bool>("_always_store", true); 21 : 22 537442 : return params; 23 0 : } 24 : 25 4020 : GeneralReporter::GeneralReporter(const InputParameters & parameters) 26 4020 : : GeneralUserObject(parameters), Reporter(this), _always_store(getParam<bool>("_always_store")) 27 : { 28 4020 : } 29 : 30 : bool 31 1437 : GeneralReporter::shouldStore() const 32 : { 33 : // Either we always store, or we store if the current execution flag matches 34 : // a flag that is within this GeneralReporter's 'execute_on' 35 1437 : return _always_store || getExecuteOnEnum().isValueSet(_fe_problem.getCurrentExecuteOnFlag()); 36 : }