www.mooseframework.org
StochasticResults.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef STOCHASTICRESULTS_H
9 #define STOCHASTICRESULTS_H
10 
11 // MOOSE includes
12 #include "GeneralVectorPostprocessor.h"
13 #include "SamplerInterface.h"
14 
15 class StochasticResults;
16 
17 template <>
18 InputParameters validParams<StochasticResults>();
19 
23 class StochasticResults : public GeneralVectorPostprocessor, SamplerInterface
24 {
25 public:
26  StochasticResults(const InputParameters & parameters);
27  void virtual initialize() override;
28  void virtual finalize() override {}
29  void virtual execute() override {}
30 
37  void init(Sampler & _sampler);
38 
44  VectorPostprocessorValue & getVectorPostprocessorValueByGroup(unsigned int group);
45 
50  const std::vector<VectorPostprocessorValue *> & getSampleVectors() const
51  {
52  return _sample_vectors;
53  }
54 
55 protected:
57  std::vector<VectorPostprocessorValue *> _sample_vectors;
58 
60  Sampler * _sampler = nullptr;
61 };
62 
63 #endif
void init(Sampler &_sampler)
Initialize storage based on the Sampler returned by the SamplerMultiApp.
virtual void finalize() override
StochasticResults(const InputParameters &parameters)
const std::vector< VectorPostprocessorValue * > & getSampleVectors() const
Get the sample vectors.
Sampler * _sampler
The sampler to extract data.
VectorPostprocessorValue & getVectorPostprocessorValueByGroup(unsigned int group)
Return the VectorPostprocessorValue for a given Sampler group index.
A tool for output Sampler data.
virtual void execute() override
std::vector< VectorPostprocessorValue * > _sample_vectors
Storage for declared vectors.
virtual void initialize() override
InputParameters validParams< StochasticResults >()