#include <VectorPostprocessor.h>
Public Types | |
enum | AutoOperation { AutoOperation::NONE, AutoOperation::BROADCAST } |
Options for automatic parallel operations to perform by the default context. More... | |
Public Member Functions | |
VectorPostprocessorContext (const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state) | |
virtual void | finalize () override |
Perform automatic parallel communication based on the producer/consumer modes. More... | |
virtual void | copyValuesBack () override |
Called by FEProblemBase::advanceState via ReporterData. More... | |
const ScatterVectorPostprocessorValue & | getScatterValue () const |
const ScatterVectorPostprocessorValue & | getScatterValueOld () const |
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... | |
virtual std::string | contextType () const override |
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 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 state has only the modes modes . 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 | |
ScatterVectorPostprocessorValue | _scatter_value |
ScatterVectorPostprocessorValue | _scatter_value_old |
Definition at line 110 of file VectorPostprocessor.h.
|
stronginherited |
Options for automatic parallel operations to perform by the default context.
Enumerator | |
---|---|
NONE | |
BROADCAST |
Definition at line 234 of file ReporterContext.h.
VectorPostprocessorContext< T >::VectorPostprocessorContext | ( | const libMesh::ParallelObject & | other, |
const MooseObject & | producer, | ||
ReporterState< T > & | state | ||
) |
Definition at line 97 of file VectorPostprocessor.C.
|
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.
|
inlineoverridevirtualinherited |
This must be overridden in every class.
Implements ReporterContext< T >.
Reimplemented in ReporterGatherContext< T >, ReporterScatterContext< T >, and ReporterBroadcastContext< T >.
Definition at line 470 of file ReporterContext.h.
|
overridevirtual |
Called by FEProblemBase::advanceState via ReporterData.
Reimplemented from ReporterContext< T >.
Definition at line 129 of file VectorPostprocessor.C.
|
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 106 of file VectorPostprocessor.C.
|
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().
const ScatterVectorPostprocessorValue & VectorPostprocessorContext< T >::getScatterValue | ( | ) | const |
Definition at line 137 of file VectorPostprocessor.C.
const ScatterVectorPostprocessorValue & VectorPostprocessorContext< T >::getScatterValueOld | ( | ) | const |
Definition at line 144 of file VectorPostprocessor.C.
|
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().
|
private |
Definition at line 123 of file VectorPostprocessor.h.
|
private |
Definition at line 124 of file VectorPostprocessor.h.
|
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().