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 : #pragma once 20 : 21 : #include "SpatialBinUserObject.h" 22 : 23 : /** 24 : * Class that provides a side bin index given a spatial coordinate 25 : */ 26 : class PlaneSpatialBinUserObject : public SpatialBinUserObject 27 : { 28 : public: 29 : static InputParameters validParams(); 30 : 31 : PlaneSpatialBinUserObject(const InputParameters & parameters); 32 : 33 : /** 34 : * Distance between a point and a gap 35 : * @param[in] point point 36 : * @param[in] gap_index gap index 37 : */ 38 : virtual Real distanceFromGap(const Point & point, const unsigned int & gap_index) const = 0; 39 : 40 : /** 41 : * Gap index closest to the point 42 : * @param[in] point point 43 : * @return gap index 44 : */ 45 : virtual unsigned int gapIndex(const Point & point) const = 0; 46 : 47 : /** 48 : * Distance between a point and a gap 49 : * @param[in] point point 50 : * @param[out] index index of the gap that the point is closest to 51 : * @param[out] distance distance from point to the closest gap 52 : */ 53 : virtual void 54 : gapIndexAndDistance(const Point & point, unsigned int & index, Real & distance) const = 0; 55 : 56 : /** 57 : * Get the unit normals for each gap 58 : * @return gap unit normals 59 : */ 60 : virtual const std::vector<Point> & gapUnitNormals() const = 0; 61 : 62 : /** 63 : * Apply an additional normalization factor to the bin value 64 : * @param[in] bin bin index 65 : * @return multiplicative value to apply 66 : */ 67 37056 : virtual Real adjustBinValue(const unsigned int & /* bin */) const { return 1.0; } 68 : };