www.mooseframework.org
VectorPostprocessorInterface.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 
16 #include "FEProblem.h"
17 #include "VectorPostprocessor.h"
18 #include "MooseTypes.h"
19 
21  : _vpi_params(moose_object->parameters()),
22  // TODO: Retrieve using checked pointer method
23  _vpi_feproblem(*_vpi_params.get<FEProblemBase *>("_fe_problem_base")),
24  _vpi_tid(_vpi_params.have_parameter<THREAD_ID>("_tid") ? _vpi_params.get<THREAD_ID>("_tid") : 0)
25 {
26 }
27 
30  const std::string & vector_name)
31 {
32  return _vpi_feproblem.getVectorPostprocessorValue(_vpi_params.get<VectorPostprocessorName>(name),
33  vector_name);
34 }
35 
38  const VectorPostprocessorName & name, const std::string & vector_name)
39 {
40  return _vpi_feproblem.getVectorPostprocessorValue(name, vector_name);
41 }
42 
45  const std::string & vector_name)
46 {
48  _vpi_params.get<VectorPostprocessorName>(name), vector_name);
49 }
50 
53  const VectorPostprocessorName & name, const std::string & vector_name)
54 {
55  return _vpi_feproblem.getVectorPostprocessorValueOld(name, vector_name);
56 }
57 
58 bool
60 {
61  return _vpi_feproblem.hasVectorPostprocessor(_vpi_params.get<VectorPostprocessorName>(name));
62 }
63 
64 bool
66  const VectorPostprocessorName & name) const
67 {
69 }
virtual const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name)
Retrieve the value of the VectorPostprocessor.
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VectorPostprocessorInterface(const MooseObject *moose_object)
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
const VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
Retrieve the old value of a VectorPostprocessor.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
Get the reference to the old value of a post-processor.
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:74
VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName &name, const std::string &vector_name)
Get a reference to the value associated with the VectorPostprocessor.
virtual const VectorPostprocessorValue & getVectorPostprocessorValue(const std::string &name, const std::string &vector_name)
Retrieve the value of a VectorPostprocessor.
bool hasVectorPostprocessor(const std::string &name) const
Determine if the VectorPostprocessor exists.
bool hasVectorPostprocessorByName(const VectorPostprocessorName &name) const
Determine if the VectorPostprocessor exists.
unsigned int THREAD_ID
Definition: MooseTypes.h:79
const VectorPostprocessorValue & getVectorPostprocessorValueOldByName(const VectorPostprocessorName &name, const std::string &vector_name)
Retrieve the old value of a VectorPostprocessor.