www.mooseframework.org
VectorPostprocessorData.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef VECTORPOSTPROCESSORDATA_H
16 #define VECTORPOSTPROCESSORDATA_H
17 
18 // MOOSE includes
19 #include "MooseTypes.h"
20 #include "Restartable.h"
21 
22 #include <map>
23 
24 class FEProblemBase;
25 
27 {
28 public:
33 
35  {
38  };
39 
47  VectorPostprocessorValue & declareVector(const std::string & vpp_name,
48  const std::string & vector_name);
49 
53  bool hasVectorPostprocessor(const std::string & name);
54 
61  VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName & vpp_name,
62  const std::string & vector_name);
63 
71  getVectorPostprocessorValueOld(const VectorPostprocessorName & vpp_name,
72  const std::string & vector_name);
73 
77  bool hasVectors(const std::string & vpp_name) const;
78 
83  const std::vector<std::pair<std::string, VectorPostprocessorState>> &
84  vectors(const std::string & vpp_name) const;
85 
89  void copyValuesBack();
90 
91 private:
92  VectorPostprocessorValue & getVectorPostprocessorHelper(const VectorPostprocessorName & vpp_name,
93  const std::string & vector_name,
94  bool get_current);
95 
97  std::map<std::string, std::vector<std::pair<std::string, VectorPostprocessorState>>> _values;
98 
99  std::set<std::string> _requested_items;
100  std::set<std::string> _supplied_items;
101 };
102 
103 #endif // VECTORPOSTPROCESSORDATA_H
VectorPostprocessorValue & declareVector(const std::string &vpp_name, const std::string &vector_name)
Initialization method, sets the current and old value to 0.0 for this VectorPostprocessor.
const std::vector< std::pair< std::string, VectorPostprocessorState > > & vectors(const std::string &vpp_name) const
Get the map of vectors for a particular VectorPostprocessor.
A class for creating restricted objects.
Definition: Restartable.h:31
void copyValuesBack()
Copy the current post-processor values into old (i.e.
std::set< std::string > _requested_items
VectorPostprocessorValue & getVectorPostprocessorValueOld(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
The the old value of an post-processor.
bool hasVectorPostprocessor(const std::string &name)
Returns a true value if the VectorPostprocessor exists.
VectorPostprocessorValue & getVectorPostprocessorHelper(const VectorPostprocessorName &vpp_name, const std::string &vector_name, bool get_current)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the value for the post processor.
VectorPostprocessorData(FEProblemBase &fe_problem)
Class constructor.
std::map< std::string, std::vector< std::pair< std::string, VectorPostprocessorState > > > _values
Values of the vector post-processor.
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:74
bool hasVectors(const std::string &vpp_name) const
Check to see if a VPP has any vectors at all.
std::set< std::string > _supplied_items