16 :
libMesh::ParallelObject(other), _producer(producer)
35 const std::set<ReporterMode> & modes)
const 37 for (
const auto & mode_object_pair : state.
getConsumers())
38 if (!modes.count(mode_object_pair.first))
40 std::stringstream oss;
41 std::copy(modes.begin(), modes.end(), std::ostream_iterator<ReporterMode>(oss,
" "));
45 "' is being produced in ",
48 mode_object_pair.second->typeAndName(),
49 " is requesting to consume it in ",
50 mode_object_pair.first,
51 " mode, which is not supported.\n\nThe mode must be { ",
void init(const ReporterMode &mode)
Initialize the producer mode.
const std::set< std::pair< ReporterMode, const MooseObject * > > & getConsumers() const
Returns the consumers for this state; a pair that consists of the mode that the state is being consum...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
const ReporterMode REPORTER_MODE_UNSET
MooseEnum designed for the ReporterContext objects to define how a ReporterValue can and is being pro...
virtual const ReporterName & name() const =0
Return the ReporterName that the context is associated.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
ReporterContextBase(const libMesh::ParallelObject &other, const MooseObject &producer)
const ReporterProducerEnum & getProducerModeEnum() const
Return the Reporter value produced mode.
Every object that can be built by the factory should be derived from this class.
void requiresConsumerModes(const ReporterStateBase &state, const std::set< ReporterMode > &modes) const
Helper for checking whether or not the state state has only the modes modes.
The base class for storing a Reporter's state.
void assign(const std::string &name, const std::optional< std::string > &context={})
std::string getReporterInfo() const
Gets information about all declared/requested Reporters.
ReporterProducerEnum _producer_enum
Defines how the Reporter value can be produced and how it is being produced.
MooseEnumItem that automatically creates the ID and doesn't allow the ID to be assigned.