A context that scatters the Reporter value from the root processor. More...
#include <ReporterContext.h>
| Public Types | |
| enum | AutoOperation { AutoOperation::NONE, AutoOperation::BROADCAST } | 
| Options for automatic parallel operations to perform by the default context.  More... | |
| Public Member Functions | |
| ReporterScatterContext (const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state, const std::vector< T > &values) | |
| ReporterScatterContext (const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state, const T &default_value, const std::vector< T > &values) | |
| virtual void | finalize () override | 
| Perform automatic parallel communication based on the producer/consumer modes.  More... | |
| virtual std::string | contextType () const override | 
| virtual void | declareClone (ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const override | 
| Declare a reporter value of same type as this context.  More... | |
| virtual void | declareVectorClone (ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const override | 
| Declare a reporter value that is a vector of the same type as this context.  More... | |
| virtual void | resize (dof_id_type local_size) final | 
| Helper for resizing vector data.  More... | |
| virtual void | clear () final | 
| Helper for clearing vector data.  More... | |
| virtual void | vectorSum () final | 
| Helper for summing reporter value.  More... | |
| const ReporterName & | name () const override final | 
| Return the name of the Reporter value.  More... | |
| const ReporterState< T > & | state () const | 
| Return a reference to the ReporterState object that is storing the Reporter value.  More... | |
| virtual std::string | type () const override | 
| Return the type being stored by the associated ReporterState object.  More... | |
| virtual void | transfer (ReporterData &r_data, const ReporterName &r_name, unsigned int time_index=0) const override | 
| Perform type specific transfer.  More... | |
| virtual void | transferToVector (ReporterData &r_data, const ReporterName &r_name, dof_id_type index, unsigned int time_index=0) const override | 
| Perform type specific transfer to a vector.  More... | |
| virtual void | transferFromVector (ReporterData &r_data, const ReporterName &r_name, dof_id_type index, unsigned int time_index=0) const override | 
| Perform type specific transfer from a vector.  More... | |
| void | init (const ReporterMode &mode) | 
| Initialize the producer mode.  More... | |
| const MooseObject & | getProducer () const | 
| Return the MooseObject that produces this Reporter.  More... | |
| const ReporterProducerEnum & | getProducerModeEnum () const | 
| Return the Reporter value produced mode.  More... | |
| const Parallel::Communicator & | comm () const | 
| processor_id_type | n_processors () const | 
| processor_id_type | processor_id () const | 
| Protected Member Functions | |
| void | broadcast () | 
| virtual void | storeInfo (nlohmann::json &json) const override | 
| Output meta data to JSON, see JSONOutput.  More... | |
| virtual void | store (nlohmann::json &json) const override | 
| Output data to JSON, see JSONOutput.  More... | |
| virtual void | copyValuesBack () override | 
| Called by FEProblemBase::advanceState via ReporterData.  More... | |
| virtual bool | restoreState () override | 
| Restore state to its old values.  More... | |
| void | requiresConsumerModes (const ReporterStateBase &state, const std::set< ReporterMode > &modes) const | 
| Helper for checking whether or not the state statehas only the modesmodes.  More... | |
| Protected Attributes | |
| ReporterState< T > & | _state | 
| The state on which this context object operates.  More... | |
| const MooseObject & | _producer | 
| The MooseObject that is producing this Reporter.  More... | |
| ReporterProducerEnum | _producer_enum | 
| Defines how the Reporter value can be produced and how it is being produced.  More... | |
| const Parallel::Communicator & | _communicator | 
| Private Attributes | |
| const std::vector< T > & | _values | 
| The values to scatter.  More... | |
A context that scatters the Reporter value from the root processor.
Definition at line 618 of file ReporterContext.h.
| 
 | stronginherited | 
Options for automatic parallel operations to perform by the default context.
| Enumerator | |
|---|---|
| NONE | |
| BROADCAST | |
Definition at line 234 of file ReporterContext.h.
| ReporterScatterContext< T >::ReporterScatterContext | ( | const libMesh::ParallelObject & | other, | 
| const MooseObject & | producer, | ||
| ReporterState< T > & | state, | ||
| const std::vector< T > & | values | ||
| ) | 
Definition at line 640 of file ReporterContext.h.
| ReporterScatterContext< T >::ReporterScatterContext | ( | const libMesh::ParallelObject & | other, | 
| const MooseObject & | producer, | ||
| ReporterState< T > & | state, | ||
| const T & | default_value, | ||
| const std::vector< T > & | values | ||
| ) | 
Definition at line 651 of file ReporterContext.h.
| 
 | inlineprotectedinherited | 
Definition at line 303 of file ReporterContext.h.
| 
 | finalvirtualinherited | 
Helper for clearing vector data.
Implements ReporterContextBase.
Definition at line 498 of file ReporterContext.h.
| 
 | inlineoverridevirtual | 
This must be overridden in every class.
Reimplemented from ReporterGeneralContext< T >.
Definition at line 632 of file ReporterContext.h.
| 
 | overrideprotectedvirtualinherited | 
Called by FEProblemBase::advanceState via ReporterData.
Implements ReporterContextBase.
Reimplemented in VectorPostprocessorContext< T >.
Definition at line 408 of file ReporterContext.h.
Referenced by VectorPostprocessorContext< T >::copyValuesBack().
| 
 | overridevirtualinherited | 
Declare a reporter value of same type as this context.
NOTE: This is defined in ReporterData.h to avoid cyclic includes that would arise. I don't know of a better solution, if you have one please implement it.
Implements ReporterContextBase.
Definition at line 559 of file ReporterData.h.
| 
 | overridevirtualinherited | 
Declare a reporter value that is a vector of the same type as this context.
NOTE: This is defined in ReporterData.h to avoid cyclic includes that would arise. I don't know of a better solution, if you have one please implement it.
Implements ReporterContextBase.
Definition at line 570 of file ReporterData.h.
| 
 | overridevirtual | 
Perform automatic parallel communication based on the producer/consumer modes.
Reimplemented from ReporterContext< T >.
Definition at line 664 of file ReporterContext.h.
| 
 | inlineinherited | 
Return the MooseObject that produces this Reporter.
Definition at line 118 of file ReporterContext.h.
Referenced by ReporterData::getReporterInfo().
| 
 | inherited | 
Return the Reporter value produced mode.
Definition at line 28 of file ReporterContext.C.
Referenced by ReporterData::getReporterMode().
| 
 | inherited | 
Initialize the producer mode.
This done after construction to allow the constructor to define the available values in the ReporterProducerEnum.
Definition at line 21 of file ReporterContext.C.
| 
 | inlinefinaloverridevirtualinherited | 
Return the name of the Reporter value.
Implements ReporterContextBase.
Definition at line 251 of file ReporterContext.h.
| 
 | protectedinherited | 
Helper for checking whether or not the state state has only the modes modes. 
Definition at line 34 of file ReporterContext.C.
| 
 | finalvirtualinherited | 
Helper for resizing vector data.
| local_size | Number of elements to resize vector to | 
Implements ReporterContextBase.
Definition at line 486 of file ReporterContext.h.
| 
 | inlineoverrideprotectedvirtualinherited | 
Restore state to its old values.
Implements ReporterContextBase.
Definition at line 323 of file ReporterContext.h.
| 
 | inlineinherited | 
Return a reference to the ReporterState object that is storing the Reporter value.
Definition at line 256 of file ReporterContext.h.
| 
 | overrideprotectedvirtualinherited | 
Output data to JSON, see JSONOutput.
Implements ReporterContextBase.
Definition at line 422 of file ReporterContext.h.
| 
 | overrideprotectedvirtualinherited | 
Output meta data to JSON, see JSONOutput.
Implements ReporterContextBase.
Definition at line 415 of file ReporterContext.h.
| 
 | overridevirtualinherited | 
Perform type specific transfer.
NOTE: This is defined in ReporterData.h to avoid cyclic includes that would arise. I don't know of a better solution, if you have one please implement it.
Implements ReporterContextBase.
Definition at line 502 of file ReporterData.h.
| 
 | overridevirtualinherited | 
Perform type specific transfer from a vector.
NOTE: This is defined in ReporterData.h to avoid cyclic includes that would arise. I don't know of a better solution, if you have one please implement it.
Implements ReporterContextBase.
Definition at line 529 of file ReporterData.h.
| 
 | overridevirtualinherited | 
Perform type specific transfer to a vector.
NOTE: This is defined in ReporterData.h to avoid cyclic includes that would arise. I don't know of a better solution, if you have one please implement it.
Implements ReporterContextBase.
Definition at line 512 of file ReporterData.h.
| 
 | inlineoverridevirtualinherited | 
Return the type being stored by the associated ReporterState object.
Implements ReporterContextBase.
Definition at line 263 of file ReporterContext.h.
| 
 | finalvirtualinherited | 
Helper for summing reporter value.
Implements ReporterContextBase.
Definition at line 508 of file ReporterContext.h.
| 
 | protectedinherited | 
The MooseObject that is producing this Reporter.
Definition at line 214 of file ReporterContext.h.
Referenced by ReporterContextBase::getProducer().
| 
 | protectedinherited | 
Defines how the Reporter value can be produced and how it is being produced.
Definition at line 217 of file ReporterContext.h.
Referenced by ReporterContextBase::getProducerModeEnum(), ReporterContextBase::init(), ReporterBroadcastContext< T >::ReporterBroadcastContext(), ReporterContext< std::vector< T > >::ReporterContext(), ReporterGatherContext< T >::ReporterGatherContext(), ReporterScatterContext< T >::ReporterScatterContext(), and ReporterContextBase::requiresConsumerModes().
| 
 | protectedinherited | 
The state on which this context object operates.
Definition at line 326 of file ReporterContext.h.
Referenced by ReporterContext< std::vector< T > >::broadcast(), ReporterContext< std::vector< T > >::name(), ReporterContext< std::vector< T > >::ReporterContext(), ReporterContext< std::vector< T > >::restoreState(), and ReporterContext< std::vector< T > >::state().
| 
 | private | 
The values to scatter.
Definition at line 636 of file ReporterContext.h.
 1.8.14
 1.8.14