https://mooseframework.inl.gov
HistogramVectorPostprocessor.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
25 {
26 public:
28 
30  virtual void initialSetup() override;
31  virtual void initialize() override;
32  virtual void execute() override;
33  virtual void finalize() override;
34 
35 protected:
39  struct HistoData
40  {
43 
46 
49  };
50 
57  void computeHistogram(const std::vector<Real> & values, HistoData & histo_data);
58 
60  const VectorPostprocessorName & _vpp_name;
61 
63  const unsigned int & _num_bins;
64 
66  std::map<std::string, HistoData> _histogram_data;
67 };
const unsigned int & _num_bins
The number of bins.
Computes a histogram for each column in a given VectorPostprocessor.
Helper class to hold the vectors for the histogram.
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
VectorPostprocessorValue * _upper
The upper edges for each bin.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void execute() override
Execute method.
std::map< std::string, HistoData > _histogram_data
The VPP vectors that will hold the Histogram for each column.
const VectorPostprocessorName & _vpp_name
The name of the VPP to work on.
VectorPostprocessorValue * _lower
The lower edges for each bin.
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:203
virtual void finalize() override
Finalize.
VectorPostprocessorValue * _histogram
Where the data will actually be stored.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
HistogramVectorPostprocessor(const InputParameters &parameters)
void computeHistogram(const std::vector< Real > &values, HistoData &histo_data)
Compute the histogram of a vector and fill in the lower/upper edges.