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_NEK_COUPLING 20 : 21 : #include "NekVolumeSpatialBinUserObject.h" 22 : #include "PlaneSpatialBinUserObject.h" 23 : 24 : InputParameters 25 390 : NekVolumeSpatialBinUserObject::validParams() 26 : { 27 390 : InputParameters params = NekSpatialBinUserObject::validParams(); 28 390 : return params; 29 : } 30 : 31 198 : NekVolumeSpatialBinUserObject::NekVolumeSpatialBinUserObject(const InputParameters & parameters) 32 198 : : NekSpatialBinUserObject(parameters) 33 : { 34 : // we need to enforce that there are only volume distributions 35 : unsigned int num_side_distributions = 0; 36 : 37 501 : for (auto & uo : _bins) 38 : { 39 : const PlaneSpatialBinUserObject * side_bin = 40 308 : dynamic_cast<const PlaneSpatialBinUserObject *>(uo); 41 308 : if (side_bin) 42 1 : ++num_side_distributions; 43 : } 44 : 45 193 : if (num_side_distributions != 0) 46 2 : mooseError( 47 1 : "This user object requires all bins to be volume distributions; you have specified " + 48 0 : Moose::stringify(num_side_distributions) + " side distributions." + 49 : "\noptions: HexagonalSubchannelBin, LayeredBin, RadialBin"); 50 : 51 : // the 'normal' velocity component direction does not apply to volume bins 52 192 : if (_field == field::velocity_component && _velocity_component == component::normal) 53 2 : mooseError("Setting 'velocity_component = normal' is not supported for the '" + name() + 54 : "' user object!"); 55 191 : } 56 : 57 : #endif