www.mooseframework.org
VectorPostprocessor.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 
12 // MOOSE includes
13 #include "MooseTypes.h"
14 #include "OutputInterface.h"
15 
16 // libMesh
17 #include "libmesh/parallel.h"
18 
19 // Forward declarations
20 class FEProblemBase;
21 class InputParameters;
22 class SamplerBase;
25 
26 template <typename T>
28 
29 template <>
31 
36 {
37 public:
38  VectorPostprocessor(const InputParameters & parameters);
39 
40  virtual ~VectorPostprocessor() = default;
41 
45  virtual VectorPostprocessorValue & getVector(const std::string & vector_name);
46 
50  std::string PPName() { return _vpp_name; }
51 
56 
57 protected:
61  VectorPostprocessorValue & declareVector(const std::string & vector_name);
62 
64  std::string _vpp_name;
65 
68 
69  friend class SamplerBase;
70 
71 private:
73 
75 
76  const bool _is_broadcast;
77 
78  std::map<std::string, VectorPostprocessorValue> _thread_local_vectors;
79 };
80 
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
Definition: SamplerBase.h:40
FEProblemBase * _vpp_fe_problem
Pointer to FEProblemBase.
std::string _vpp_name
The name of the VectorPostprocessor.
A class to provide an common interface to objects requiring "outputs" option.
InputParameters validParams< VectorPostprocessor >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual VectorPostprocessorValue & getVector(const std::string &vector_name)
This will get called to actually grab the final value the VectorPostprocessor has calculated...
const bool _contains_complete_history
bool containsCompleteHistory() const
Return whether or not this VectorPostprocessor contains complete history.
VectorPostprocessorValue & declareVector(const std::string &vector_name)
Register a new vector to fill up.
VectorPostprocessor(const InputParameters &parameters)
std::map< std::string, VectorPostprocessorValue > _thread_local_vectors
InputParameters validParams()
This is the templated validParams() function that every MooseObject-derived class is required to spec...
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:155
std::string PPName()
Returns the name of the VectorPostprocessor.
Base class for Postprocessors that produce a vector of values.
virtual ~VectorPostprocessor()=default
unsigned int THREAD_ID
Definition: MooseTypes.h:161