www.mooseframework.org
SphericalAverage.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef SPHERICALAVERAGE_H
16 #define SPHERICALAVERAGE_H
17 
19 
20 class SphericalAverage;
21 
22 template <>
24 
30 {
31 public:
33 
34  virtual void initialize() override;
35  virtual void execute() override;
36  virtual void finalize() override;
37  virtual void threadJoin(const UserObject & y) override;
38 
39 protected:
41  virtual Real computeDistance();
42 
44  const unsigned int _nbins;
45 
47  const Real _radius;
48 
50  const Real _deltaR;
51 
53  const unsigned int _nvals;
54 
56  std::vector<const VariableValue *> _values;
57 
59  unsigned int _qp;
60 
62  const Real _empty_bin_value;
63 
66 
68  std::vector<unsigned int> _counts;
69 
71  std::vector<VectorPostprocessorValue *> _average;
72 };
73 
74 #endif // SPHERICALAVERAGE_H
virtual void threadJoin(const UserObject &y) override
Must override.
virtual void execute() override
Execute method.
InputParameters validParams< SphericalAverage >()
std::vector< unsigned int > _counts
sample count per bin
const unsigned int _nbins
number of histogram bins
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real computeDistance()
compute the distance of the current quadarature point for binning
VectorPostprocessorValue & _bin_center
value mid point of the bin
std::vector< const VariableValue * > _values
coupled variable that is being binned
virtual void finalize() override
Finalize.
SphericalAverage(const InputParameters &parameters)
unsigned int _qp
current quadrature point - used in computeVolume()
std::vector< VectorPostprocessorValue * > _average
aggregated global average vectors
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const Real _empty_bin_value
value to assign to empty bins
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:74
const Real _radius
maximum variable value
const Real _deltaR
bin width
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
Compute a spherical average of a variableas a function of radius throughout the simulation domain...
Base class for user-specific data.
Definition: UserObject.h:42
const unsigned int _nvals
number of coupled variables