www.mooseframework.org
PostprocessorInterface.C
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 #include "PostprocessorInterface.h"
11 #include "FEProblem.h"
12 #include "Postprocessor.h"
13 #include "MooseTypes.h"
14 #include "MooseObject.h"
15 
17  : _ppi_params(moose_object->parameters()),
18  _pi_feproblem(*_ppi_params.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"))
19 {
20 }
21 
22 const PostprocessorValue &
24 {
25  // Return the default if the Postprocessor does not exist and a default does, otherwise
26  // continue as usual
29  else
30  return _pi_feproblem.getPostprocessorValue(_ppi_params.get<PostprocessorName>(name));
31 }
32 
33 const PostprocessorValue &
35 {
36  // Return the default if the Postprocessor does not exist and a default does, otherwise
37  // continue as usual
40  else
41  return _pi_feproblem.getPostprocessorValueOld(_ppi_params.get<PostprocessorName>(name));
42 }
43 
44 const PostprocessorValue &
46 {
47  // Return the default if the Postprocessor does not exist and a default does, otherwise
48  // continue as usual
51  else
52  return _pi_feproblem.getPostprocessorValueOlder(_ppi_params.get<PostprocessorName>(name));
53 }
54 
55 const PostprocessorValue &
57 {
59 }
60 
61 const PostprocessorValue &
63 {
65 }
66 
67 const PostprocessorValue &
69 {
71 }
72 
73 bool
74 PostprocessorInterface::hasPostprocessor(const std::string & name) const
75 {
76  return _pi_feproblem.hasPostprocessor(_ppi_params.get<PostprocessorName>(name));
77 }
78 
79 bool
80 PostprocessorInterface::hasPostprocessorByName(const PostprocessorName & name)
81 {
82  return _pi_feproblem.hasPostprocessor(name);
83 }
84 
85 const PostprocessorValue &
87 {
89 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
PostprocessorValue & getPostprocessorValueOld(const std::string &name)
Get the reference to the old value of a post-processor.
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:42
const PostprocessorValue & getPostprocessorValueOldByName(const PostprocessorName &name)
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:154
const PostprocessorValue & getPostprocessorValueOld(const std::string &name)
const PostprocessorValue & getPostprocessorValueOlderByName(const PostprocessorName &name)
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)
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.