#include <VectorPostprocessorInterface.h>
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... | |
const VectorPostprocessorValue & | getVectorPostprocessorValue (const std::string ¶m_name, const std::string &vector_name) const |
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const |
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValueOld (const std::string ¶m_name, const std::string &vector_name) const |
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const |
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValue (const std::string ¶m_name, const std::string &vector_name, bool needs_broadcast) const |
Retrieve the value of a VectorPostprocessor. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const |
Retrieve the value of the VectorPostprocessor. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValueOld (const std::string ¶m_name, const std::string &vector_name, bool needs_broadcast) const |
Retrieve the old value of a VectorPostprocessor. More... | |
const VectorPostprocessorValue & | getVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const |
Retrieve the old value of a VectorPostprocessor. More... | |
const ScatterVectorPostprocessorValue & | getScatterVectorPostprocessorValue (const std::string ¶m_name, const std::string &vector_name) const |
Return the scatter value for the post processor. More... | |
const ScatterVectorPostprocessorValue & | getScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const |
Return the scatter value for the post processor. More... | |
const ScatterVectorPostprocessorValue & | getScatterVectorPostprocessorValueOld (const std::string ¶m_name, const std::string &vector_name) const |
Return the old scatter value for the post processor. More... | |
const ScatterVectorPostprocessorValue & | getScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const |
Return the old scatter value for the post processor. More... | |
bool | hasVectorPostprocessor (const std::string ¶m_name, const std::string &vector_name) const |
Determine if the VectorPostprocessor data exists by parameter. More... | |
bool | hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const |
Determine if the VectorPostprocessor data exists by name. More... | |
bool | hasVectorPostprocessor (const std::string ¶m_name) const |
Determine if the VectorPostprocessor exists by parameter. More... | |
bool | hasVectorPostprocessorByName (const VectorPostprocessorName &name) const |
Determine if the VectorPostprocessor exists by name. More... | |
const VectorPostprocessorName & | getVectorPostprocessorName (const std::string ¶m_name) const |
Get the name of a VectorPostprocessor associated with a parameter. More... | |
bool | isVectorPostprocessorDistributed (const std::string ¶m_name) const |
Return true if the VectorPostprocessor is marked with parallel_type as DISTRIBUTED. More... | |
bool | isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Member Functions | |
virtual void | addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &) const |
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested. More... | |
Private Member Functions | |
const VectorPostprocessorValue & | getVectorPostprocessorByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name, bool broadcast, std::size_t t_index) const |
Helper function for extracting VPP data from ReporterData object. More... | |
const VectorPostprocessorContext< VectorPostprocessorValue > & | getVectorPostprocessorContextByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name) const |
Helper for getting the VPP context that handles scatter values. More... | |
bool | vectorPostprocessorsAdded () const |
void | possiblyCheckHasVectorPostprocessor (const std::string ¶m_name, const std::string &vector_name) const |
Helpers for "possibly" checking if a vpp exists. More... | |
void | possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const |
Private Attributes | |
const bool | _broadcast_by_default |
Whether or not to force broadcasting by default. More... | |
const MooseObject & | _vpi_moose_object |
The MooseObject that uses this interface. More... | |
const FEProblemBase & | _vpi_feproblem |
Reference the FEProblemBase class. More... | |
const THREAD_ID | _vpi_tid |
Thread ID. More... | |
Definition at line 22 of file VectorPostprocessorInterface.h.
VectorPostprocessorInterface::VectorPostprocessorInterface | ( | const MooseObject * | moose_object, |
bool | broadcast_by_default = false |
||
) |
Constructor.
broadcast_by_default | Set to true if the system inheriting from this interface always needs the VPPs to be broadcast |
Definition at line 23 of file VectorPostprocessorInterface.C.
|
virtualdefault |
This class has virtual methods, so it needs a virtual dtor.
|
inlineprotectedvirtual |
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested.
Reimplemented in AuxKernelTempl< ComputeValueType >, AuxKernelTempl< RT >, AuxKernelTempl< RealVectorValue >, AuxKernelTempl< Real >, and UserObject.
Definition at line 311 of file VectorPostprocessorInterface.h.
Referenced by getVectorPostprocessorByNameHelper(), and getVectorPostprocessorContextByNameHelper().
const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValue | ( | const std::string & | param_name, |
const std::string & | vector_name | ||
) | const |
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
param_name | The name of the parameter holding the vpp name |
vector_name | The name of the vector |
Definition at line 106 of file VectorPostprocessorInterface.C.
const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name | ||
) | const |
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
name | The name of the VectorPostprocessor |
vector_name | The name of the vector |
Definition at line 115 of file VectorPostprocessorInterface.C.
Referenced by getScatterVectorPostprocessorValue().
const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueOld | ( | const std::string & | param_name, |
const std::string & | vector_name | ||
) | const |
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
param_name | The name of the parameter holding the vpp name |
vector_name | The name of the vector |
Definition at line 122 of file VectorPostprocessorInterface.C.
const ScatterVectorPostprocessorValue & VectorPostprocessorInterface::getScatterVectorPostprocessorValueOldByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name | ||
) | const |
Return the old scatter value for the post processor.
This is only valid when you expect the vector to be of length "num_procs" In that case - this will return a reference to a value that will be this processor's value from that vector
name | The name of the VectorPostprocessor |
vector_name | The name of the vector |
Definition at line 131 of file VectorPostprocessorInterface.C.
Referenced by getScatterVectorPostprocessorValueOld().
|
private |
Helper function for extracting VPP data from ReporterData object.
Definition at line 269 of file VectorPostprocessorInterface.C.
Referenced by getVectorPostprocessorValueByName(), and getVectorPostprocessorValueOldByName().
|
private |
Helper for getting the VPP context that handles scatter values.
Definition at line 284 of file VectorPostprocessorInterface.C.
Referenced by getScatterVectorPostprocessorValueByName(), and getScatterVectorPostprocessorValueOldByName().
const VectorPostprocessorName & VectorPostprocessorInterface::getVectorPostprocessorName | ( | const std::string & | param_name | ) | const |
Get the name of a VectorPostprocessor associated with a parameter.
param_name | The name of the VectorPostprocessor parameter |
Definition at line 203 of file VectorPostprocessorInterface.C.
Referenced by getScatterVectorPostprocessorValue(), getScatterVectorPostprocessorValueOld(), getVectorPostprocessorValue(), getVectorPostprocessorValueOld(), hasVectorPostprocessor(), isVectorPostprocessorDistributed(), and possiblyCheckHasVectorPostprocessor().
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValue | ( | const std::string & | param_name, |
const std::string & | vector_name | ||
) | const |
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.
Retrieve the value of a VectorPostprocessor
param_name | The name of the VectorPostprocessor parameter (see below) |
vector_name | The name of the particular vector you want. |
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
Definition at line 36 of file VectorPostprocessorInterface.C.
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValue | ( | const std::string & | param_name, |
const std::string & | vector_name, | ||
bool | needs_broadcast | ||
) | const |
Retrieve the value of a VectorPostprocessor.
param_name | The name of the VectorPostprocessor parameter (see below) |
vector_name | The name of the particular vector you want. |
need_broadcast | Whether or not this object requires the vector to be replicated in parallel |
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
Definition at line 66 of file VectorPostprocessorInterface.C.
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name | ||
) | const |
DEPRECATED: Use the new version where you need to specify whether or not the vector must be broadcast.
Retrieve the value of the VectorPostprocessor
name | VectorPostprocessor name (see below) |
vector_name | The name of the particular vector you want. |
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
Definition at line 44 of file VectorPostprocessorInterface.C.
Referenced by getVectorPostprocessorValue().
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name, | ||
bool | needs_broadcast | ||
) | const |
Retrieve the value of the VectorPostprocessor.
name | VectorPostprocessor name (see below) |
vector_name | The name of the particular vector you want. |
need_broadcast | Whether or not this object requires the vector to be replicated in parallel |
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
Definition at line 76 of file VectorPostprocessorInterface.C.
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld | ( | const std::string & | param_name, |
const std::string & | vector_name | ||
) | const |
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
param_name | The name of the VectorPostprocessor parameter |
vector_name | The name of the particular vector you want. |
see getVectorPostprocessorValue
Definition at line 51 of file VectorPostprocessorInterface.C.
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOld | ( | const std::string & | param_name, |
const std::string & | vector_name, | ||
bool | needs_broadcast | ||
) | const |
Retrieve the old value of a VectorPostprocessor.
param_name | The name of the VectorPostprocessor parameter |
vector_name | The name of the particular vector you want. |
need_broadcast | Whether or not this object requires the vector to be replicated in parallel |
see getVectorPostprocessorValue
Definition at line 86 of file VectorPostprocessorInterface.C.
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name | ||
) | const |
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
name | The name of the VectorPostprocessor |
vector_name | The name of the particular vector you want. |
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 59 of file VectorPostprocessorInterface.C.
Referenced by getVectorPostprocessorValueOld().
const VectorPostprocessorValue & VectorPostprocessorInterface::getVectorPostprocessorValueOldByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name, | ||
bool | needs_broadcast | ||
) | const |
Retrieve the old value of a VectorPostprocessor.
name | The name of the VectorPostprocessor |
vector_name | The name of the particular vector you want. |
need_broadcast | Whether or not this object requires the vector to be replicated in parallel |
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 96 of file VectorPostprocessorInterface.C.
bool VectorPostprocessorInterface::hasVectorPostprocessor | ( | const std::string & | param_name, |
const std::string & | vector_name | ||
) | const |
Determine if the VectorPostprocessor data exists by parameter.
param_name | The name of the VectorPostprocessor parameter |
vector_name | The vector name within the VectorPostprocessor |
Definition at line 138 of file VectorPostprocessorInterface.C.
Referenced by possiblyCheckHasVectorPostprocessor().
bool VectorPostprocessorInterface::hasVectorPostprocessor | ( | const std::string & | param_name | ) | const |
Determine if the VectorPostprocessor exists by parameter.
name | The name of the VectorPostprocessor parameter |
Definition at line 168 of file VectorPostprocessorInterface.C.
bool VectorPostprocessorInterface::hasVectorPostprocessorByName | ( | const VectorPostprocessorName & | name, |
const std::string & | vector_name | ||
) | const |
Determine if the VectorPostprocessor data exists by name.
name | The name of the VectorPostprocessor |
vector_name | The vector name within the VectorPostprocessor |
Definition at line 149 of file VectorPostprocessorInterface.C.
Referenced by hasVectorPostprocessor(), AdvancedOutput::initShowHideLists(), CSV::output(), and possiblyCheckHasVectorPostprocessorByName().
bool VectorPostprocessorInterface::hasVectorPostprocessorByName | ( | const VectorPostprocessorName & | name | ) | const |
Determine if the VectorPostprocessor exists by name.
name | The name of the VectorPostprocessor |
Definition at line 178 of file VectorPostprocessorInterface.C.
bool VectorPostprocessorInterface::isVectorPostprocessorDistributed | ( | const std::string & | param_name | ) | const |
Return true if the VectorPostprocessor is marked with parallel_type as DISTRIBUTED.
Definition at line 190 of file VectorPostprocessorInterface.C.
bool VectorPostprocessorInterface::isVectorPostprocessorDistributedByName | ( | const VectorPostprocessorName & | name | ) | const |
Definition at line 196 of file VectorPostprocessorInterface.C.
Referenced by isVectorPostprocessorDistributed().
|
private |
Helpers for "possibly" checking if a vpp exists.
This is only able to check for existance after all vpps have been added (after the task creating them has been called). If called before said task, this will do nothing, hence the "possibly". This allows us to have errors reported directly by the object requesting the vpp instead of through a system with less context.
Definition at line 228 of file VectorPostprocessorInterface.C.
Referenced by getScatterVectorPostprocessorValue(), getScatterVectorPostprocessorValueOld(), getVectorPostprocessorValue(), and getVectorPostprocessorValueOld().
|
private |
Definition at line 250 of file VectorPostprocessorInterface.C.
Referenced by getVectorPostprocessorByNameHelper(), and getVectorPostprocessorContextByNameHelper().
|
static |
Definition at line 18 of file VectorPostprocessorInterface.C.
Referenced by FVInterfaceKernel::validParams().
|
private |
Definition at line 306 of file VectorPostprocessorInterface.C.
Referenced by hasVectorPostprocessor(), hasVectorPostprocessorByName(), possiblyCheckHasVectorPostprocessor(), and possiblyCheckHasVectorPostprocessorByName().
|
private |
Whether or not to force broadcasting by default.
Definition at line 352 of file VectorPostprocessorInterface.h.
Referenced by getVectorPostprocessorValueByName(), and getVectorPostprocessorValueOldByName().
|
private |
Reference the FEProblemBase class.
Definition at line 358 of file VectorPostprocessorInterface.h.
Referenced by getVectorPostprocessorByNameHelper(), getVectorPostprocessorContextByNameHelper(), hasVectorPostprocessor(), hasVectorPostprocessorByName(), isVectorPostprocessorDistributedByName(), and vectorPostprocessorsAdded().
|
private |
The MooseObject that uses this interface.
Definition at line 355 of file VectorPostprocessorInterface.h.
Referenced by getVectorPostprocessorByNameHelper(), getVectorPostprocessorContextByNameHelper(), getVectorPostprocessorName(), possiblyCheckHasVectorPostprocessor(), and possiblyCheckHasVectorPostprocessorByName().
|
private |
Thread ID.
Definition at line 361 of file VectorPostprocessorInterface.h.