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 : 21 : #include "CellInstanceAux.h" 22 : 23 : registerMooseObject("CardinalApp", CellInstanceAux); 24 : 25 : InputParameters 26 3132 : CellInstanceAux::validParams() 27 : { 28 3132 : InputParameters params = OpenMCAuxKernel::validParams(); 29 3132 : params.addClassDescription("OpenMC cell instance, mapped to each MOOSE element"); 30 3132 : return params; 31 0 : } 32 : 33 1574 : CellInstanceAux::CellInstanceAux(const InputParameters & parameters) : OpenMCAuxKernel(parameters) 34 : { 35 1574 : } 36 : 37 : Real 38 38376736 : CellInstanceAux::computeValue() 39 : { 40 : // no special catch for unmapped elements is required here, because elemToCellInstance 41 : // returns -1 for UNMAPPED elements 42 38376736 : return _openmc_problem->elemToCellInstance(_current_elem->id()); 43 : } 44 : 45 : #endif