www.mooseframework.org
VolumeHistogram.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 
14 class VolumeHistogram;
15 
16 template <>
18 
25 {
26 public:
28 
29  virtual void initialize() override;
30  virtual void execute() override;
31  virtual void finalize() override;
32  virtual void threadJoin(const UserObject & y) override;
33 
34 protected:
36  virtual Real computeVolume();
37 
39  const unsigned int _nbins;
40 
42  const Real _min_value;
43 
45  const Real _max_value;
46 
48  const Real _deltaV;
49 
52 
54  unsigned int _qp;
55 
58 
61 };
62 
VectorPostprocessorValue & _volume
aggregated volume for the given bin
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Compute a histogram of volume fractions binned according to variable values.
virtual void execute() override
Execute method.
const VariableValue & _value
coupled variable that is being binned
const Real _deltaV
bin width
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< VolumeHistogram >()
const Real _min_value
minimum variable value
unsigned int _qp
current quadrature point - used in computeVolume()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
const unsigned int _nbins
number of histogram bins
VolumeHistogram(const InputParameters &parameters)
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:155
virtual void finalize() override
Finalize.
forward declarations
Definition: MooseArray.h:16
virtual void threadJoin(const UserObject &y) override
Must override.
virtual Real computeVolume()
compute the volume contribution at the current quadrature point
Base class for user-specific data.
Definition: UserObject.h:37
const Real _max_value
maximum variable value
VectorPostprocessorValue & _bin_center
value mid point of the bin