24 bool broadcast_by_default)
25 : _broadcast_by_default(broadcast_by_default),
26 _vpi_moose_object(*moose_object),
27 _vpi_feproblem(*_vpi_moose_object.parameters().getCheckedPointerParam<
FEProblemBase *>(
29 _vpi_tid(_vpi_moose_object.parameters().have_parameter<
THREAD_ID>(
"_tid")
37 const std::string & vector_name)
const 45 const VectorPostprocessorName & name,
const std::string & vector_name)
const 52 const std::string & vector_name)
const 60 const VectorPostprocessorName & name,
const std::string & vector_name)
const 67 const std::string & vector_name,
68 bool needs_broadcast)
const 77 const VectorPostprocessorName & name,
78 const std::string & vector_name,
79 bool needs_broadcast)
const 87 const std::string & vector_name,
88 bool needs_broadcast)
const 97 const VectorPostprocessorName & name,
98 const std::string & vector_name,
99 bool needs_broadcast)
const 107 const std::string & param_name,
const std::string & vector_name)
const 116 const VectorPostprocessorName & name,
const std::string & vector_name)
const 123 const std::string & param_name,
const std::string & vector_name)
const 132 const VectorPostprocessorName & name,
const std::string & vector_name)
const 139 const std::string & vector_name)
const 143 "have been constructed.");
150 const std::string & vector_name)
const 154 "VectorPostprocessors have been constructed.");
162 "Has reporter VectorPostprocessor Reporter value but not VectorPostprocessor UO");
172 "VectorPostprocessors have been constructed.");
179 const VectorPostprocessorName & name)
const 183 "VectorPostprocessors have been constructed.");
197 const VectorPostprocessorName & name)
const 202 const VectorPostprocessorName &
207 if (!params.isParamValid(param_name))
209 "When getting a VectorPostprocessor, failed to get a parameter with the name \"",
212 "\n\nKnown parameters:\n",
215 if (!params.isType<VectorPostprocessorName>(param_name))
217 "Supplied parameter with name \"",
220 params.type(param_name),
221 "\" is not an expected type for getting a VectorPostprocessor.\n\n",
222 "The allowed type is \"VectorPostprocessorName\".");
224 return params.get<VectorPostprocessorName>(param_name);
229 const std::string & param_name,
const std::string & vector_name)
const 237 "A VectorPostprocessor with the name \"",
239 "\" was not found.");
242 "The VectorPostprocessor \"",
244 "\" does not have a vector named \"",
251 const VectorPostprocessorName & name,
const std::string & vector_name)
const 259 "A VectorPostprocessor with the name \"",
name,
"\" was not found.");
263 "\" does not have a vector named \"",
270 const VectorPostprocessorName & name,
271 const std::string & vector_name,
273 std::size_t t_index)
const 285 const VectorPostprocessorName & name,
const std::string & vector_name)
const 299 auto vpp_context_ptr =
301 mooseAssert(vpp_context_ptr,
"Failed to get the VectorPostprocessorContext");
302 return *vpp_context_ptr;
std::string name(const ElemQuality q)
const VectorPostprocessorContext< VectorPostprocessorValue > & getVectorPostprocessorContextByNameHelper(const VectorPostprocessorName &name, const std::string &vector_name) const
Helper for getting the VPP context that handles scatter values.
const ReporterMode REPORTER_MODE_ROOT
bool hasVectorPostprocessor(const std::string ¶m_name, const std::string &vector_name) const
Determine if the VectorPostprocessor data exists by parameter.
bool isTaskComplete(const std::string &task) const
void possiblyCheckHasVectorPostprocessor(const std::string ¶m_name, const std::string &vector_name) const
Helpers for "possibly" checking if a vpp exists.
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOldByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Return the old scatter value for the post processor.
bool vectorPostprocessorsAdded() const
bool hasUserObject(const std::string &name) const
Check if there if a user object of given name.
VectorPostprocessorInterface(const MooseObject *moose_object, bool broadcast_by_default=false)
Constructor.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const VectorPostprocessorName & getVectorPostprocessorName(const std::string ¶m_name) const
Get the name of a VectorPostprocessor associated with a parameter.
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
bool isVectorPostprocessorDistributedByName(const VectorPostprocessorName &name) const
A ReporterName that represents a VectorPostprocessor.
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...
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...
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
void possiblyCheckHasVectorPostprocessorByName(const VectorPostprocessorName &name, const std::string &vector_name) const
const ReporterMode REPORTER_MODE_VPP_SCATTER
Every object that can be built by the factory should be derived from this class.
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
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.
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
Return the VPP object given the name.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOld(const std::string ¶m_name, const std::string &vector_name) const
Return the old scatter value for the post processor.
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValue(const std::string ¶m_name, const std::string &vector_name) const
Return the scatter value for the post processor.
virtual void addVectorPostprocessorDependencyHelper(const VectorPostprocessorName &) const
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested...
static InputParameters validParams()
bool isVectorPostprocessorDistributed(const std::string ¶m_name) const
Return true if the VectorPostprocessor is marked with parallel_type as DISTRIBUTED.
std::vector< Real > VectorPostprocessorValue
Real ScatterVectorPostprocessorValue
bool hasVectorPostprocessorByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Determine if the VectorPostprocessor data exists by name.
const MooseObject & _vpi_moose_object
The MooseObject that uses this interface.
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Return the scatter value for the post processor.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool isDistributed() const
Return true if the VPP is operating in distributed mode.
const InputParameters & parameters() const
Get the parameters of the object.
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
const ReporterMode REPORTER_MODE_REPLICATED
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.
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...
Base class for Postprocessors that produce a vector of values.
MooseEnumItem that automatically creates the ID and doesn't allow the ID to be assigned.
const bool _broadcast_by_default
Whether or not to force broadcasting by default.
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...
const FEProblemBase & _vpi_feproblem
Reference the FEProblemBase class.
const ReporterContextBase & getReporterContextBase(const ReporterName &reporter_name) const