www.mooseframework.org
SpatialAverageBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 
19 {
20 public:
22 
24 
25  virtual void initialize() override;
26  virtual void execute() override;
27  virtual void finalize() override;
28  virtual void threadJoin(const UserObject & y) override;
29 
30 protected:
32  virtual Real computeDistance() = 0;
33 
35  const unsigned int _nbins;
36 
38  const Real _radius;
39 
41  const Point _origin;
42 
44  const Real _deltaR;
45 
47  const unsigned int _nvals;
48 
50  const std::vector<const VariableValue *> _values;
51 
53  unsigned int _qp;
54 
57 
60 
62  std::vector<unsigned int> _counts;
63 
65  std::vector<VectorPostprocessorValue *> _average;
66 };
virtual Real computeDistance()=0
compute the distance of the current quadarature point for binning
static InputParameters validParams()
const unsigned int _nvals
number of coupled variables
virtual void threadJoin(const UserObject &y) override
Must override.
std::vector< unsigned int > _counts
sample count per bin
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::vector< VectorPostprocessorValue * > _average
aggregated global average vectors
SpatialAverageBase(const InputParameters &parameters)
const Real _deltaR
bin width
virtual void finalize() override
Finalize.
unsigned int _qp
current quadrature point - used in computeVolume()
const Real _radius
maximum variable value
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:192
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _nbins
number of histogram bins
const std::vector< const VariableValue * > _values
coupled variable that is being binned
const Point _origin
origin of sphere [or other body]
const InputParameters & parameters() const
Get the parameters of the object.
VectorPostprocessorValue & _bin_center
value mid point of the bin
const Real _empty_bin_value
value to assign to empty bins
Base class for user-specific data.
Definition: UserObject.h:39
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Base clase for computing spatial average of a variable over simple spatial regions of the computation...
virtual void execute() override
Execute method.