Line data Source code
1 : /********************************************************************/ 2 : /* SOFTWARE COPYRIGHT NOTIFICATION */ 3 : /* Cardinal */ 4 : /* */ 5 : /* (c) 2021 UChicago Argonne, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /* */ 8 : /* Prepared by UChicago Argonne, LLC */ 9 : /* Under Contract No. DE-AC02-06CH11357 */ 10 : /* With the U. S. Department of Energy */ 11 : /* */ 12 : /* Prepared by Battelle Energy Alliance, LLC */ 13 : /* Under Contract No. DE-AC07-05ID14517 */ 14 : /* With the U. S. Department of Energy */ 15 : /* */ 16 : /* See LICENSE for full restrictions */ 17 : /********************************************************************/ 18 : 19 : #ifdef ENABLE_OPENMC_COUPLING 20 : #include "FilterBase.h" 21 : 22 : #include "OpenMCCellAverageProblem.h" 23 : 24 : InputParameters 25 1196 : FilterBase::validParams() 26 : { 27 1196 : auto params = MooseObject::validParams(); 28 1196 : params.addPrivateParam<OpenMCCellAverageProblem *>("_openmc_problem"); 29 : 30 1196 : params.registerBase("Filter"); 31 1196 : params.registerSystemAttributeName("Filter"); 32 : 33 1196 : return params; 34 0 : } 35 : 36 612 : FilterBase::FilterBase(const InputParameters & parameters) 37 : : MooseObject(parameters), 38 1224 : _openmc_problem(*getParam<OpenMCCellAverageProblem *>("_openmc_problem")) 39 : { 40 612 : } 41 : 42 : openmc::Filter * 43 1116 : FilterBase::getWrappedFilter() 44 : { 45 : // Error check the API to make sure the filter has been initialized. 46 1116 : if (!_filter) 47 0 : mooseError(_name + " has not initialized an OpenMC filter!"); 48 : 49 1116 : return _filter; 50 : } 51 : #endif