Cardinal
LayeredGapBin.h
Go to the documentation of this file.
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 
22 
27 {
28 public:
29  static InputParameters validParams();
30 
31  LayeredGapBin(const InputParameters & parameters);
32 
33  virtual unsigned int bin(const Point & p) const override;
34 
35  virtual unsigned int num_bins() const override;
36 
37  virtual Real distanceFromGap(const Point & point, const unsigned int & gap_index) const override;
38 
39  virtual unsigned int gapIndex(const Point & point) const override;
40 
41  virtual void
42  gapIndexAndDistance(const Point & point, unsigned int & index, Real & distance) const override;
43 
44  virtual const std::vector<Point> & gapUnitNormals() const override { return _unit_normals; }
45 
46  virtual Real adjustBinValue(const unsigned int & i) const override;
47 
48 protected:
50  const unsigned int _direction;
51 
53  const unsigned int & _num_layers;
54 
56  const SubProblem * _layered_subproblem;
57 
59  const unsigned int _num_faces;
60 
63 
66 
68  std::vector<Real> _layer_pts;
69 
71  std::vector<Real> _effective_layer_pts;
72 
74  std::vector<Point> _unit_normals;
75 };
LayeredGapBin::bin
virtual unsigned int bin(const Point &p) const override
Definition: LayeredGapBin.C:78
LayeredGapBin::_direction_min
Real _direction_min
Minimum coordinate in the direction.
Definition: LayeredGapBin.h:62
PlaneSpatialBinUserObject.h
LayeredGapBin::_direction_max
Real _direction_max
Maxium coordinate in the direction.
Definition: LayeredGapBin.h:65
PlaneSpatialBinUserObject
Definition: PlaneSpatialBinUserObject.h:26
LayeredGapBin::_unit_normals
std::vector< Point > _unit_normals
Unit normal vectors of the gaps.
Definition: LayeredGapBin.h:74
LayeredGapBin::_num_layers
const unsigned int & _num_layers
Number of equal-size layers.
Definition: LayeredGapBin.h:53
LayeredGapBin::num_bins
virtual unsigned int num_bins() const override
Definition: LayeredGapBin.C:85
LayeredGapBin::validParams
static InputParameters validParams()
Definition: LayeredGapBin.C:24
LayeredGapBin::_num_faces
const unsigned int _num_faces
Number of bins.
Definition: LayeredGapBin.h:59
LayeredGapBin
Definition: LayeredGapBin.h:26
LayeredGapBin::gapIndexAndDistance
virtual void gapIndexAndDistance(const Point &point, unsigned int &index, Real &distance) const override
Definition: LayeredGapBin.C:104
LayeredGapBin::_layer_pts
std::vector< Real > _layer_pts
Bounds of the 1-D layering.
Definition: LayeredGapBin.h:68
LayeredGapBin::adjustBinValue
virtual Real adjustBinValue(const unsigned int &i) const override
Definition: LayeredGapBin.C:111
LayeredGapBin::_direction
const unsigned int _direction
Direction of the bins (x, y, or z)
Definition: LayeredGapBin.h:50
LayeredGapBin::_layered_subproblem
const SubProblem * _layered_subproblem
Underlying problem.
Definition: LayeredGapBin.h:56
LayeredGapBin::LayeredGapBin
LayeredGapBin(const InputParameters &parameters)
Definition: LayeredGapBin.C:40
LayeredGapBin::distanceFromGap
virtual Real distanceFromGap(const Point &point, const unsigned int &gap_index) const override
Definition: LayeredGapBin.C:97
LayeredGapBin::_effective_layer_pts
std::vector< Real > _effective_layer_pts
Bounds of the volume bins that achieve the same pairing of points to bins.
Definition: LayeredGapBin.h:71
LayeredGapBin::gapIndex
virtual unsigned int gapIndex(const Point &point) const override
Definition: LayeredGapBin.C:91
LayeredGapBin::gapUnitNormals
virtual const std::vector< Point > & gapUnitNormals() const override
Definition: LayeredGapBin.h:44