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