26 bool broadcast_by_default)
27 : _broadcast_by_default(broadcast_by_default),
28 _vpi_moose_object(*moose_object),
29 _vpi_feproblem(*_vpi_moose_object.parameters().getCheckedPointerParam<
FEProblemBase *>(
31 _vpi_tid(_vpi_moose_object.parameters().have_parameter<
THREAD_ID>(
"_tid")
32 ? _vpi_moose_object.parameters().get<
THREAD_ID>(
"_tid")
37#ifdef MOOSE_KOKKOS_ENABLED
40 : _broadcast_by_default(object._broadcast_by_default),
41 _vpi_moose_object(object._vpi_moose_object),
42 _vpi_feproblem(object._vpi_feproblem),
43 _vpi_tid(object._vpi_tid)
50 const std::string & vector_name)
const
58 const VectorPostprocessorName & name,
const std::string & vector_name)
const
65 const std::string & vector_name)
const
73 const VectorPostprocessorName & name,
const std::string & vector_name)
const
80 const std::string & vector_name,
81 bool needs_broadcast)
const
90 const VectorPostprocessorName & name,
91 const std::string & vector_name,
92 bool needs_broadcast)
const
100 const std::string & vector_name,
101 bool needs_broadcast)
const
110 const VectorPostprocessorName & name,
111 const std::string & vector_name,
112 bool needs_broadcast)
const
120 const std::string & param_name,
const std::string & vector_name)
const
129 const VectorPostprocessorName & name,
const std::string & vector_name)
const
136 const std::string & param_name,
const std::string & vector_name)
const
145 const VectorPostprocessorName & name,
const std::string & vector_name)
const
152 const std::string & vector_name)
const
156 "have been constructed.");
163 const std::string & vector_name)
const
167 "VectorPostprocessors have been constructed.");
179 "VectorPostprocessors have been constructed.");
186 const VectorPostprocessorName & name)
const
190 "VectorPostprocessors have been constructed.");
192 std::vector<VectorPostprocessor *> objs;
196 .condition<AttribThread>(0)
199 return !objs.empty();
210 const VectorPostprocessorName & name)
const
215const VectorPostprocessorName &
220 if (!params.isParamValid(param_name))
222 "When getting a VectorPostprocessor, failed to get a parameter with the name \"",
225 "\n\nKnown parameters:\n",
228 if (!params.isType<VectorPostprocessorName>(param_name))
230 "Supplied parameter with name \"",
233 params.type(param_name),
234 "\" is not an expected type for getting a VectorPostprocessor.\n\n",
235 "The allowed type is \"VectorPostprocessorName\".");
237 return params.get<VectorPostprocessorName>(param_name);
242 const std::string & param_name,
const std::string & vector_name)
const
250 "A VectorPostprocessor with the name \"",
252 "\" was not found.");
255 "The VectorPostprocessor \"",
257 "\" does not have a vector named \"",
264 const VectorPostprocessorName & name,
const std::string & vector_name)
const
272 "A VectorPostprocessor with the name \"", name,
"\" was not found.");
276 "\" does not have a vector named \"",
283 const VectorPostprocessorName & name,
284 const std::string & vector_name,
286 std::size_t t_index)
const
298 const VectorPostprocessorName & name,
const std::string & vector_name)
const
312 auto vpp_context_ptr =
314 mooseAssert(vpp_context_ptr,
"Failed to get the VectorPostprocessorContext");
315 return *vpp_context_ptr;
Real ScatterVectorPostprocessorValue
std::vector< Real > VectorPostprocessorValue
const ReporterMode REPORTER_MODE_REPLICATED
const ReporterMode REPORTER_MODE_ROOT
const ReporterMode REPORTER_MODE_VPP_SCATTER
bool isTaskComplete(const std::string &task) const
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
Return the VPP object given the name.
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
TheWarehouse & theWarehouse() const
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
const InputParameters & parameters() const
Get the parameters of the object.
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 ...
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...
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Every object that can be built by the factory should be derived from this class.
const ReporterContextBase & getReporterContextBase(const ReporterName &reporter_name) const
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
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.
MooseEnumItem that automatically creates the ID and doesn't allow the ID to be assigned.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse.
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Return the scatter value for the post processor.
bool hasVectorPostprocessor(const std::string ¶m_name, const std::string &vector_name) const
Determine if the VectorPostprocessor data exists by parameter.
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...
static InputParameters validParams()
bool isVectorPostprocessorDistributed(const std::string ¶m_name) const
Return true if the VectorPostprocessor is marked with parallel_type as DISTRIBUTED.
bool hasVectorPostprocessorByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Determine if the VectorPostprocessor data exists by name.
const FEProblemBase & _vpi_feproblem
Reference the FEProblemBase class.
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.
void possiblyCheckHasVectorPostprocessorByName(const VectorPostprocessorName &name, const std::string &vector_name) const
bool vectorPostprocessorsAdded() const
virtual void addVectorPostprocessorDependencyHelper(const VectorPostprocessorName &) const
Helper for deriving classes to override to add dependencies when a VectorPostprocessor is requested.
void possiblyCheckHasVectorPostprocessor(const std::string ¶m_name, const std::string &vector_name) const
Helpers for "possibly" checking if a vpp exists.
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOldByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Return the old scatter value for the post processor.
const VectorPostprocessorName & getVectorPostprocessorName(const std::string ¶m_name) const
Get the name of a VectorPostprocessor associated with a parameter.
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...
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 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.
const VectorPostprocessorContext< VectorPostprocessorValue > & getVectorPostprocessorContextByNameHelper(const VectorPostprocessorName &name, const std::string &vector_name) const
Helper for getting the VPP context that handles scatter values.
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...
bool isVectorPostprocessorDistributedByName(const VectorPostprocessorName &name) const
VectorPostprocessorInterface(const MooseObject *moose_object, bool broadcast_by_default=false)
Constructor.
const bool _broadcast_by_default
Whether or not to force broadcasting by default.
const MooseObject & _vpi_moose_object
The MooseObject that uses this interface.
A ReporterName that represents a VectorPostprocessor.
bool isDistributed() const
Return true if the VPP is operating in distributed mode.