www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
VectorPostprocessorInterface Class Reference

#include <VectorPostprocessorInterface.h>

Inheritance diagram for VectorPostprocessorInterface:
[legend]

Public Member Functions

 VectorPostprocessorInterface (const MooseObject *moose_object, bool broadcast_by_default=false)
 Constructor. More...
 
virtual ~VectorPostprocessorInterface ()=default
 This class has virtual methods, so it needs a virtual dtor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name)
 DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the value of a VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the value of the VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the old value of a VectorPostprocessor. More...
 
virtual const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast)
 Retrieve the old value of a VectorPostprocessor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const std::string &name, const std::string &vector_name)
 Return the scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &name, const std::string &vector_name)
 Return the old scatter value for the post processor. More...
 
virtual const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const std::string &name, const std::string &vector_name)
 Return the old scatter value for the post processor. More...
 
bool hasVectorPostprocessor (const std::string &name) const
 Determine if the VectorPostprocessor exists. More...
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 Determine if the VectorPostprocessor exists. More...
 

Private Attributes

bool _broadcast_by_default
 Whether or not to force broadcasting by default. More...
 
const InputParameters_vpi_params
 VectorPostprocessorInterface Parameters. More...
 
FEProblemBase_vpi_feproblem
 Reference the the FEProblemBase class. More...
 
THREAD_ID _vpi_tid
 Thread ID. More...
 

Detailed Description

Definition at line 21 of file VectorPostprocessorInterface.h.

Constructor & Destructor Documentation

◆ VectorPostprocessorInterface()

VectorPostprocessorInterface::VectorPostprocessorInterface ( const MooseObject moose_object,
bool  broadcast_by_default = false 
)

Constructor.

Parameters
broadcast_by_defaultSet to true if the system inheriting from this interface always needs the VPPs to be broadcast

Definition at line 15 of file VectorPostprocessorInterface.C.

17  : _broadcast_by_default(broadcast_by_default),
18  _vpi_params(moose_object->parameters()),
20  _vpi_tid(_vpi_params.have_parameter<THREAD_ID>("_tid") ? _vpi_params.get<THREAD_ID>("_tid") : 0)
21 {
22 }
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
unsigned int THREAD_ID
Definition: MooseTypes.h:97

◆ ~VectorPostprocessorInterface()

virtual VectorPostprocessorInterface::~VectorPostprocessorInterface ( )
virtualdefault

This class has virtual methods, so it needs a virtual dtor.

Member Function Documentation

◆ getScatterVectorPostprocessorValue()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name 
)
virtual

Return the scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
nameThe name of the parameter holding the vpp name
vector_nameThe name of the vector
Returns
The reference to the current scatter value

Reimplemented in AuxKernel.

Definition at line 92 of file VectorPostprocessorInterface.C.

Referenced by AuxKernel::getScatterVectorPostprocessorValue().

94 {
96  _vpi_params.get<VectorPostprocessorName>(name), vector_name);
97 }
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.

◆ getScatterVectorPostprocessorValueByName()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueByName ( const std::string &  name,
const std::string &  vector_name 
)
virtual

Return the scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
vpp_nameThe name of the VectorPostprocessor
vector_nameThe name of the vector
Returns
The reference to the current scatter value

Reimplemented in AuxKernel.

Definition at line 100 of file VectorPostprocessorInterface.C.

Referenced by AuxKernel::getScatterVectorPostprocessorValueByName().

102 {
103  return _vpi_feproblem.getScatterVectorPostprocessorValue(name, vector_name);
104 }
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.

◆ getScatterVectorPostprocessorValueOld()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name 
)
virtual

Return the old scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
nameThe name of the parameter holding the vpp name
vector_nameThe name of the vector
Returns
The reference to the old scatter value

Definition at line 107 of file VectorPostprocessorInterface.C.

109 {
111  _vpi_params.get<VectorPostprocessorName>(name), vector_name);
112 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.

◆ getScatterVectorPostprocessorValueOldByName()

const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueOldByName ( const std::string &  name,
const std::string &  vector_name 
)
virtual

Return the old scatter value for the post processor.

This is only valid when you expec the vector to be of lenghth "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector

Parameters
vpp_nameThe name of the VectorPostprocessor
vector_nameThe name of the vector
Returns
The reference to the old scatter value

Definition at line 115 of file VectorPostprocessorInterface.C.

117 {
118  return _vpi_feproblem.getScatterVectorPostprocessorValueOld(name, vector_name);
119 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld(const VectorPostprocessorName &vpp_name, const std::string &vector_name)
Return the scatter value for the post processor.

◆ getVectorPostprocessorValue() [1/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name 
)
virtual

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

Retrieve the value of a VectorPostprocessor

Parameters
nameThe name of the VectorPostprocessor parameter (see below)
vector_nameThe name of the particular vector you want.
Returns
A reference to the desired value

The name required by this method is the name that is hard-coded into your source code. For example, if you have a Kernel that requires a VectorPostprocessor you may have an input file with "pp = my_pp", this function requires the "pp" name as input (see .../moose_test/functions/VectorPostprocessorFunction.C)

see getVectorPostprocessorValueOld getVectorPostprocessorValueByName getVectorPostprocessorValueOldByName

Reimplemented in AuxKernel, and GeneralUserObject.

Definition at line 25 of file VectorPostprocessorInterface.C.

Referenced by GeneralUserObject::getVectorPostprocessorValue(), and AuxKernel::getVectorPostprocessorValue().

27 {
29  _vpi_params.get<VectorPostprocessorName>(name), vector_name, _broadcast_by_default);
30 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValue() [2/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValue ( const std::string &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
virtual

Retrieve the value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor parameter (see below)
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
Returns
A reference to the desired value

The name required by this method is the name that is hard-coded into your source code. For example, if you have a Kernel that requires a VectorPostprocessor you may have an input file with "pp = my_pp", this function requires the "pp" name as input (see .../moose_test/functions/VectorPostprocessorFunction.C)

see getVectorPostprocessorValueOld getVectorPostprocessorValueByName getVectorPostprocessorValueOldByName

Reimplemented in AuxKernel, and GeneralUserObject.

Definition at line 55 of file VectorPostprocessorInterface.C.

58 {
59  return _vpi_feproblem.getVectorPostprocessorValue(_vpi_params.get<VectorPostprocessorName>(name),
60  vector_name,
61  needs_broadcast || _broadcast_by_default);
62 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueByName() [1/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)
virtual

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

Retrieve the value of the VectorPostprocessor

Parameters
nameVectorPostprocessor name (see below)
vector_nameThe name of the particular vector you want.
Returns
A reference to the desired value

The name required by this method is the name defined in the input file. For example, if you have a Kernel that requires a VectorPostprocessor you may have an input file with "pp = my_pp", this method requires the "my_pp" name as input (see .../moose_test/functions/VectorPostprocessorFunction.C)

see getVectorPostprocessorValue getVectorPostprocessorValueOldByName getVectorPostprocessorValueByName

Reimplemented in AuxKernel, and GeneralUserObject.

Definition at line 33 of file VectorPostprocessorInterface.C.

Referenced by GeneralUserObject::getVectorPostprocessorValueByName(), and AuxKernel::getVectorPostprocessorValueByName().

35 {
37 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueByName() [2/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
virtual

Retrieve the value of the VectorPostprocessor.

Parameters
nameVectorPostprocessor name (see below)
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
Returns
A reference to the desired value

The name required by this method is the name defined in the input file. For example, if you have a Kernel that requires a VectorPostprocessor you may have an input file with "pp = my_pp", this method requires the "my_pp" name as input (see .../moose_test/functions/VectorPostprocessorFunction.C)

see getVectorPostprocessorValue getVectorPostprocessorValueOldByName getVectorPostprocessorValueByName

Reimplemented in AuxKernel, and GeneralUserObject.

Definition at line 65 of file VectorPostprocessorInterface.C.

67 {
69  name, vector_name, needs_broadcast || _broadcast_by_default);
70 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
VectorPostprocessorValue & getVectorPostprocessorValue(const VectorPostprocessorName &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOld() [1/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name 
)

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

Retrieve the old value of a VectorPostprocessor

Parameters
nameThe name of the VectorPostprocessor parameter
vector_nameThe name of the particular vector you want.
Returns
The value of the VectorPostprocessor

see getVectorPostprocessorValue

Definition at line 40 of file VectorPostprocessorInterface.C.

42 {
44  _vpi_params.get<VectorPostprocessorName>(name), vector_name, _broadcast_by_default);
45 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOld() [2/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld ( const std::string &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
virtual

Retrieve the old value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor parameter
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
Returns
The value of the VectorPostprocessor

see getVectorPostprocessorValue

Definition at line 73 of file VectorPostprocessorInterface.C.

76 {
78  _vpi_params.get<VectorPostprocessorName>(name),
79  vector_name,
80  needs_broadcast || _broadcast_by_default);
81 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOldByName() [1/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)

DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.

Retrieve the old value of a VectorPostprocessor

Parameters
nameThe name of the VectorPostprocessor
vector_nameThe name of the particular vector you want.
Returns
The value of the VectorPostprocessor

If within the validParams for the object the addVectorPostprocessorParam was called this method will retun a reference to the default value specified in the call to the addVectorPostprocessorParam function if the postVectorPostprocessor does not exist.

see getVectorPostprocessorValueByName

Definition at line 48 of file VectorPostprocessorInterface.C.

50 {
52 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ getVectorPostprocessorValueOldByName() [2/2]

const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName ( const VectorPostprocessorName &  name,
const std::string &  vector_name,
bool  needs_broadcast 
)
virtual

Retrieve the old value of a VectorPostprocessor.

Parameters
nameThe name of the VectorPostprocessor
vector_nameThe name of the particular vector you want.
need_broadcastWhether or not this object requires the vector to be replicated in parallel
Returns
The value of the VectorPostprocessor

If within the validParams for the object the addVectorPostprocessorParam was called this method will retun a reference to the default value specified in the call to the addVectorPostprocessorParam function if the postVectorPostprocessor does not exist.

see getVectorPostprocessorValueByName

Definition at line 84 of file VectorPostprocessorInterface.C.

86 {
88  name, vector_name, needs_broadcast || _broadcast_by_default);
89 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool _broadcast_by_default
Whether or not to force broadcasting by default.
VectorPostprocessorValue & getVectorPostprocessorValueOld(const std::string &name, const std::string &vector_name)
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast...

◆ hasVectorPostprocessor()

bool VectorPostprocessorInterface::hasVectorPostprocessor ( const std::string &  name) const

Determine if the VectorPostprocessor exists.

Parameters
nameThe name of the VectorPostprocessor parameter
Returns
True if the VectorPostprocessor exists
See also
hasVectorPostprocessorByName getVectorPostprocessorValue

Definition at line 122 of file VectorPostprocessorInterface.C.

123 {
124  return _vpi_feproblem.hasVectorPostprocessor(_vpi_params.get<VectorPostprocessorName>(name));
125 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.
const InputParameters & _vpi_params
VectorPostprocessorInterface Parameters.

◆ hasVectorPostprocessorByName()

bool VectorPostprocessorInterface::hasVectorPostprocessorByName ( const VectorPostprocessorName &  name) const

Determine if the VectorPostprocessor exists.

Parameters
nameThe name of the VectorPostprocessor
Returns
True if the VectorPostprocessor exists
See also
hasVectorPostprocessor getVectorPostprocessorValueByName

Definition at line 128 of file VectorPostprocessorInterface.C.

130 {
132 }
FEProblemBase & _vpi_feproblem
Reference the the FEProblemBase class.
bool hasVectorPostprocessor(const std::string &name)
Check existence of the VectorPostprocessor.

Member Data Documentation

◆ _broadcast_by_default

bool VectorPostprocessorInterface::_broadcast_by_default
private

◆ _vpi_feproblem

FEProblemBase& VectorPostprocessorInterface::_vpi_feproblem
private

◆ _vpi_params

const InputParameters& VectorPostprocessorInterface::_vpi_params
private

◆ _vpi_tid

THREAD_ID VectorPostprocessorInterface::_vpi_tid
private

Thread ID.

Definition at line 268 of file VectorPostprocessorInterface.h.


The documentation for this class was generated from the following files: