www.mooseframework.org
PostprocessorData.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 POSTPROCESSORDATA_H
16 #define POSTPROCESSORDATA_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:
32  PostprocessorData(FEProblemBase & fe_problem);
33 
38  void init(const std::string & name);
39 
43  bool hasPostprocessor(const std::string & name);
44 
48  PostprocessorValue & getPostprocessorValue(const PostprocessorName & name);
49 
55  PostprocessorValue & getPostprocessorValueOld(const PostprocessorName & name);
56 
62  PostprocessorValue & getPostprocessorValueOlder(const PostprocessorName & name);
63 
64  void storeValue(const std::string & name, PostprocessorValue value);
65 
69  const std::map<std::string, PostprocessorValue *> & values() const { return _values; }
70 
74  void copyValuesBack();
75 
76 protected:
78  std::map<std::string, PostprocessorValue *> _values;
79 
81  std::map<std::string, PostprocessorValue *> _values_old;
82 
84  std::map<std::string, PostprocessorValue *> _values_older;
85 };
86 
87 #endif // POSTPROCESSORDATA_H
std::map< std::string, PostprocessorValue * > _values
Values of the Postprocessor at the current time.
A class for creating restricted objects.
Definition: Restartable.h:31
void storeValue(const std::string &name, PostprocessorValue value)
void init(const std::string &name)
Initialization method, sets the current and old value to 0.0 for this postprocessor.
std::map< std::string, PostprocessorValue * > _values_older
Values of the Postprocessors at the time t-2.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
PostprocessorValue & getPostprocessorValueOld(const PostprocessorName &name)
The the old value of an Postprocessor.
PostprocessorValue & getPostprocessorValueOlder(const PostprocessorName &name)
The the older value of an Postprocessor.
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:73
PostprocessorData(FEProblemBase &fe_problem)
Class constructor.
const std::map< std::string, PostprocessorValue * > & values() const
Get the map of names -> Postprocessor values.
void copyValuesBack()
Copy the current Postprocessor values into old (i.e.
bool hasPostprocessor(const std::string &name)
Returns a true value if the Postprocessor exists.
PostprocessorValue & getPostprocessorValue(const PostprocessorName &name)
Return the value for the Postprocessor.
std::map< std::string, PostprocessorValue * > _values_old
Values of the Postprocessors at the time t-1.