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")
35 #ifdef MOOSE_KOKKOS_ENABLED 38 : _broadcast_by_default(object._broadcast_by_default),
39 _vpi_moose_object(object._vpi_moose_object),
40 _vpi_feproblem(object._vpi_feproblem),
41 _vpi_tid(object._vpi_tid)
48 const std::string & vector_name)
const 56 const VectorPostprocessorName & name,
const std::string & vector_name)
const 63 const std::string & vector_name)
const 71 const VectorPostprocessorName & name,
const std::string & vector_name)
const 78 const std::string & vector_name,
79 bool needs_broadcast)
const 88 const VectorPostprocessorName & name,
89 const std::string & vector_name,
90 bool needs_broadcast)
const 98 const std::string & vector_name,
99 bool needs_broadcast)
const 108 const VectorPostprocessorName & name,
109 const std::string & vector_name,
110 bool needs_broadcast)
const 118 const std::string & param_name,
const std::string & vector_name)
const 127 const VectorPostprocessorName & name,
const std::string & vector_name)
const 134 const std::string & param_name,
const std::string & vector_name)
const 143 const VectorPostprocessorName & name,
const std::string & vector_name)
const 150 const std::string & vector_name)
const 154 "have been constructed.");
161 const std::string & vector_name)
const 165 "VectorPostprocessors have been constructed.");
173 "Has reporter VectorPostprocessor Reporter value but not VectorPostprocessor UO");
183 "VectorPostprocessors have been constructed.");
190 const VectorPostprocessorName & name)
const 194 "VectorPostprocessors have been constructed.");
208 const VectorPostprocessorName & name)
const 213 const VectorPostprocessorName &
218 if (!params.isParamValid(param_name))
220 "When getting a VectorPostprocessor, failed to get a parameter with the name \"",
223 "\n\nKnown parameters:\n",
226 if (!params.isType<VectorPostprocessorName>(param_name))
228 "Supplied parameter with name \"",
231 params.type(param_name),
232 "\" is not an expected type for getting a VectorPostprocessor.\n\n",
233 "The allowed type is \"VectorPostprocessorName\".");
235 return params.get<VectorPostprocessorName>(param_name);
240 const std::string & param_name,
const std::string & vector_name)
const 248 "A VectorPostprocessor with the name \"",
250 "\" was not found.");
253 "The VectorPostprocessor \"",
255 "\" does not have a vector named \"",
262 const VectorPostprocessorName & name,
const std::string & vector_name)
const 270 "A VectorPostprocessor with the name \"",
name,
"\" was not found.");
274 "\" does not have a vector named \"",
281 const VectorPostprocessorName & name,
282 const std::string & vector_name,
284 std::size_t t_index)
const 296 const VectorPostprocessorName & name,
const std::string & vector_name)
const 310 auto vpp_context_ptr =
312 mooseAssert(vpp_context_ptr,
"Failed to get the VectorPostprocessorContext");
313 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.
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 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.
const InputParameters & parameters() const
Get the parameters of the object.
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.
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 and optionally a file path to the top-level block p...
bool isDistributed() const
Return true if the VPP is operating in distributed mode.
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