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")
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 215 const 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;
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.
const ScatterVectorPostprocessorValue & getScatterVectorPostprocessorValueOldByName(const VectorPostprocessorName &name, const std::string &vector_name) const
Return the old scatter value for the post processor.
bool vectorPostprocessorsAdded() const
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
TheWarehouse & theWarehouse() 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.
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.
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.
QueryCache & condition(Args &&... args)
Adds a new condition to the query.
const ReporterMode REPORTER_MODE_REPLICATED
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...
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 Elem & get(const ElemType type_in)
const ReporterContextBase & getReporterContextBase(const ReporterName &reporter_name) const