Loading [MathJax]/extensions/tex2jax.js
Cardinal
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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{
28public:
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
48protected:
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};
Definition LayeredGapBin.h:27
virtual unsigned int num_bins() const override
Definition LayeredGapBin.C:85
static InputParameters validParams()
Definition LayeredGapBin.C:24
virtual Real distanceFromGap(const Point &point, const unsigned int &gap_index) const override
Definition LayeredGapBin.C:97
const unsigned int _num_faces
Number of bins.
Definition LayeredGapBin.h:59
Real _direction_max
Maxium coordinate in the direction.
Definition LayeredGapBin.h:65
const unsigned int & _num_layers
Number of equal-size layers.
Definition LayeredGapBin.h:53
virtual unsigned int gapIndex(const Point &point) const override
Definition LayeredGapBin.C:91
virtual void gapIndexAndDistance(const Point &point, unsigned int &index, Real &distance) const override
Definition LayeredGapBin.C:104
virtual unsigned int bin(const Point &p) const override
Definition LayeredGapBin.C:78
std::vector< Point > _unit_normals
Unit normal vectors of the gaps.
Definition LayeredGapBin.h:74
virtual Real adjustBinValue(const unsigned int &i) const override
Definition LayeredGapBin.C:111
virtual const std::vector< Point > & gapUnitNormals() const override
Definition LayeredGapBin.h:44
std::vector< Real > _layer_pts
Bounds of the 1-D layering.
Definition LayeredGapBin.h:68
Real _direction_min
Minimum coordinate in the direction.
Definition LayeredGapBin.h:62
const SubProblem * _layered_subproblem
Underlying problem.
Definition LayeredGapBin.h:56
const unsigned int _direction
Direction of the bins (x, y, or z)
Definition LayeredGapBin.h:50
std::vector< Real > _effective_layer_pts
Bounds of the volume bins that achieve the same pairing of points to bins.
Definition LayeredGapBin.h:71
Definition PlaneSpatialBinUserObject.h:27