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 790 : SpatialBinUserObject::validParams() 24 : { 25 790 : InputParameters params = GeneralUserObject::validParams(); 26 790 : return params; 27 : } 28 : 29 394 : SpatialBinUserObject::SpatialBinUserObject(const InputParameters & parameters) 30 394 : : GeneralUserObject(parameters) 31 : { 32 394 : } 33 : 34 : Real 35 113598 : SpatialBinUserObject::spatialValue(const Point & p) const 36 : { 37 113598 : return bin(p); 38 : } 39 : 40 : unsigned int 41 287388918 : SpatialBinUserObject::binFromBounds(const Real & pt, const std::vector<Real> & bounds) const 42 : { 43 287388918 : return bin_utility::linearBin(pt, bounds); 44 : }