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 : #include "SpatialBinUserObject.h" 20 : #include "BinUtility.h" 21 : 22 : InputParameters 23 738 : SpatialBinUserObject::validParams() 24 : { 25 738 : InputParameters params = GeneralUserObject::validParams(); 26 738 : return params; 27 : } 28 : 29 368 : SpatialBinUserObject::SpatialBinUserObject(const InputParameters & parameters) 30 368 : : GeneralUserObject(parameters) 31 : { 32 368 : } 33 : 34 : Real 35 113598 : SpatialBinUserObject::spatialValue(const Point & p) const 36 : { 37 113598 : return bin(p); 38 : } 39 : 40 : unsigned int 41 98303824 : SpatialBinUserObject::binFromBounds(const Real & pt, const std::vector<Real> & bounds) const 42 : { 43 98303824 : return bin_utility::linearBin(pt, bounds); 44 : }