www.mooseframework.org
PostprocessorInterface.C
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 #include "PostprocessorInterface.h"
16 #include "FEProblem.h"
17 #include "Postprocessor.h"
18 #include "MooseTypes.h"
19 #include "MooseObject.h"
20 
22  : _ppi_params(moose_object->parameters()),
23  // TODO: Retrieve using checked pointer method
24  _pi_feproblem(*_ppi_params.get<FEProblemBase *>("_fe_problem_base"))
25 {
26 }
27 
28 const PostprocessorValue &
30 {
31  // Return the default if the Postprocessor does not exist and a default does, otherwise
32  // continue as usual
35  else
36  return _pi_feproblem.getPostprocessorValue(_ppi_params.get<PostprocessorName>(name));
37 }
38 
39 const PostprocessorValue &
41 {
42  // Return the default if the Postprocessor does not exist and a default does, otherwise
43  // continue as usual
46  else
47  return _pi_feproblem.getPostprocessorValueOld(_ppi_params.get<PostprocessorName>(name));
48 }
49 
50 const PostprocessorValue &
52 {
53  // Return the default if the Postprocessor does not exist and a default does, otherwise
54  // continue as usual
57  else
58  return _pi_feproblem.getPostprocessorValueOlder(_ppi_params.get<PostprocessorName>(name));
59 }
60 
61 const PostprocessorValue &
63 {
65 }
66 
67 const PostprocessorValue &
69 {
71 }
72 
73 const PostprocessorValue &
75 {
77 }
78 
79 bool
80 PostprocessorInterface::hasPostprocessor(const std::string & name) const
81 {
82  return _pi_feproblem.hasPostprocessor(_ppi_params.get<PostprocessorName>(name));
83 }
84 
85 bool
86 PostprocessorInterface::hasPostprocessorByName(const PostprocessorName & name)
87 {
88  return _pi_feproblem.hasPostprocessor(name);
89 }
90 
91 const PostprocessorValue &
93 {
95 }
PostprocessorValue & getPostprocessorValueOld(const std::string &name)
Get the reference to the old value of a post-processor.
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name)
Retrieve the value of the Postprocessor.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.
PostprocessorValue & getPostprocessorValueOlder(const std::string &name)
Get the reference to the older value of a post-processor.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const PostprocessorValue & getPostprocessorValue(const std::string &name)
Retrieve the value of a Postprocessor or one of it&#39;s old or older values.
bool hasPostprocessorByName(const PostprocessorName &name)
Determine if the Postprocessor exists.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
const PostprocessorValue & getPostprocessorValueOldByName(const PostprocessorName &name)
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:73
const PostprocessorValue & getPostprocessorValueOld(const std::string &name)
const PostprocessorValue & getPostprocessorValueOlderByName(const PostprocessorName &name)
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name)
Return the default postprocessor value.
PostprocessorValue & getPostprocessorValue(const PostprocessorName &name)
Get a reference to the value associated with the postprocessor.
PostprocessorInterface(const MooseObject *moose_object)
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & getPostprocessorValueOlder(const std::string &name)