https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ReporterContext.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9#pragma once
10
11#include <iostream>
12#include <typeinfo>
13
14#include "MooseError.h"
15#include "libmesh/id_types.h"
16#include "libmesh/parallel.h"
17#include "libmesh/parallel_object.h"
18
19#include "ReporterName.h"
20#include "ReporterMode.h"
21#include "ReporterState.h"
22#include "JsonIO.h"
23#include "JsonSyntaxTree.h"
24#include "MooseObject.h"
25#include <type_traits>
26
27class ReporterData;
28
58{
59public:
60 ReporterContextBase(const libMesh::ParallelObject & other, const MooseObject & producer);
61 virtual ~ReporterContextBase() = default;
62
64 virtual const ReporterName & name() const = 0;
65
67 // This is a helper for ReporterContext::storeInfo
68 virtual std::string type() const = 0;
69
75 virtual std::string contextType() const = 0;
76
78 virtual void copyValuesBack() = 0;
79
81 virtual bool restoreState() = 0;
82
85 virtual void storeInfo(nlohmann::json & json) const = 0;
86
100 virtual void store(nlohmann::json & json) const = 0;
101
103 virtual void finalize() = 0; // new ReporterContext objects should override
104
113 void init(const ReporterMode & mode);
114
118 const MooseObject & getProducer() const { return _producer; }
119
124
132 virtual void transfer(ReporterData & r_data,
133 const ReporterName & r_name,
134 unsigned int time_index = 0) const = 0;
135
143 virtual void transferToVector(ReporterData & r_data,
144 const ReporterName & r_name,
145 dof_id_type index,
146 unsigned int time_index = 0) const = 0;
147
156 virtual void transferFromVector(ReporterData & r_data,
157 const ReporterName & r_name,
158 dof_id_type index,
159 unsigned int time_index = 0) const = 0;
160
170 virtual void declareClone(ReporterData & r_data,
171 const ReporterName & r_name,
172 const ReporterMode & mode,
173 const MooseObject & producer) const = 0;
174
184 virtual void declareVectorClone(ReporterData & r_data,
185 const ReporterName & r_name,
186 const ReporterMode & mode,
187 const MooseObject & producer) const = 0;
188
194 virtual void resize(dof_id_type local_size) = 0;
195
199 virtual void clear() = 0;
200
204 virtual void vectorSum() = 0;
205
209 virtual void broadcast(processor_id_type root) = 0;
210
211protected:
215 void requiresConsumerModes(const ReporterStateBase & state,
216 const std::set<ReporterMode> & modes) const;
217
220
223};
224
232template <typename T>
234{
235public:
239 enum class AutoOperation
240 {
241 NONE,
243 };
244
246 const MooseObject & producer,
249 const MooseObject & producer,
251 const T & default_value);
252
256 const ReporterName & name() const override final { return _state.getReporterName(); }
257
261 const ReporterState<T> & state() const { return _state; }
262
268 virtual std::string type() const override { return MooseUtils::prettyCppType<T>(); }
269
273 virtual void finalize() override;
274
281 virtual void transfer(ReporterData & r_data,
282 const ReporterName & r_name,
283 unsigned int time_index = 0) const override;
284
291 virtual void transferToVector(ReporterData & r_data,
292 const ReporterName & r_name,
293 dof_id_type index,
294 unsigned int time_index = 0) const override;
295
302 virtual void transferFromVector(ReporterData & r_data,
303 const ReporterName & r_name,
304 dof_id_type index,
305 unsigned int time_index = 0) const override;
306
307 virtual void broadcast([[maybe_unused]] processor_id_type root = 0) override
308 {
309 if constexpr (MooseUtils::canBroadcast<T>::value)
310 this->comm().broadcast(this->_state.value(), root);
311 else
312 mooseError("Cannot broadcast Reporter type '", MooseUtils::prettyCppType<T>(), "'");
313 }
314
315protected:
317 virtual void storeInfo(nlohmann::json & json) const override;
318
320 virtual void store(nlohmann::json & json) const override;
321
322 virtual std::string contextType() const override = 0;
323
324 // The following are called by the ReporterData and are not indented for external use
325 virtual void copyValuesBack() override;
326
328 virtual bool restoreState() override { return _state.restoreState(); }
329
332};
333
334template <typename T>
342
343template <typename T>
345 const MooseObject & producer,
346 ReporterState<T> & state,
347 const T & default_value)
348 : ReporterContext(other, producer, state)
349{
350 _state.value() = default_value;
351}
352
353template <typename T>
354void
356{
357 // Automatic parallel operation to perform
359
360 // Set the default producer mode to ROOT
361 if (!_producer_enum.isValid())
362 _producer_enum.assign(REPORTER_MODE_ROOT);
363
364 // Determine auto parallel operation to perform
365 const auto & producer = _producer_enum; // convenience
366 for (const auto & pair : _state.getConsumers())
367 {
368 const ReporterMode consumer = pair.first;
369 const MooseObject * moose_object = pair.second;
370
371 // The following sets up the automatic operations and performs error checking for the various
372 // modes for the producer and consumer
373 //
374 // The data is correct and requires no operation for the following conditions (PRODUCER ->
375 // CONSUMER)
376 // ROOT -> ROOT
377 // REPLICATED -> REPLICATED
378 // DISTRIBUTED -> DISTRIBUTED
379 // REPLICATED -> ROOT
380
381 // Perform broadcast in the case
382 // ROOT -> REPLICATED
383 if (static_cast<int>(producer) == REPORTER_MODE_ROOT && consumer == REPORTER_MODE_REPLICATED)
385
386 // The following are not support and create an error
387 // ROOT -> DISTRIBUTED
388 // REPLICATED -> DISTRIBUTED
389 // DISTRIBUTED -> ROOT
390 // DISTRIBUTED -> REPLICATED
391 else if ((static_cast<int>(producer) == REPORTER_MODE_ROOT &&
392 consumer == REPORTER_MODE_DISTRIBUTED) ||
393 (static_cast<int>(producer) == REPORTER_MODE_REPLICATED &&
394 consumer == REPORTER_MODE_DISTRIBUTED) ||
395 (static_cast<int>(producer) == REPORTER_MODE_DISTRIBUTED &&
396 consumer == REPORTER_MODE_ROOT) ||
397 (static_cast<int>(producer) == REPORTER_MODE_DISTRIBUTED &&
398 consumer == REPORTER_MODE_REPLICATED))
399 mooseError("The Reporter value \"",
400 name(),
401 "\" is being produced in ",
402 producer,
403 " mode, but the ",
404 moose_object->typeAndName(),
405 " is requesting to consume it in ",
406 consumer,
407 " mode, which is not supported.");
408 }
409
410 // Perform desired auto parallel operation
411 if (auto_operation == ReporterContext::AutoOperation::BROADCAST)
412 this->broadcast();
413}
414
415template <typename T>
416void
418{
419 _state.copyValuesBack();
420}
421
422template <typename T>
423void
424ReporterContext<T>::storeInfo(nlohmann::json & json) const
425{
426 json["type"] = this->type();
427}
428
429template <typename T>
430void
431ReporterContext<T>::store(nlohmann::json & json) const
432{
433 nlohmann::to_json(json, this->_state.value());
434}
435
436template <typename T>
438{
439public:
441 const MooseObject & producer,
443 : ReporterContext<T>(other, producer, state)
444 {
445 }
447 const MooseObject & producer,
449 const T & default_value)
450 : ReporterContext<T>(other, producer, state, default_value)
451 {
452 }
453
460 virtual void declareClone(ReporterData & r_data,
461 const ReporterName & r_name,
462 const ReporterMode & mode,
463 const MooseObject & producer) const override;
470 virtual void declareVectorClone(ReporterData & r_data,
471 const ReporterName & r_name,
472 const ReporterMode & mode,
473 const MooseObject & producer) const override;
474
475 virtual void resize(dof_id_type local_size) final;
476 virtual void clear() final;
477 virtual void vectorSum() final;
478
479 virtual std::string contextType() const override { return MooseUtils::prettyCppType(this); }
480};
481
482// Needed for compile-time checking if T is a vector.
483template <typename>
484struct is_std_vector : std::false_type
485{
486};
487
488template <typename T, typename A>
489struct is_std_vector<std::vector<T, A>> : std::true_type
490{
491};
492
493template <typename T>
494void
496{
497 if constexpr (is_std_vector<T>::value)
498 this->_state.value().resize(size);
499 else
500 {
501 libmesh_ignore(size);
502 mooseError("Cannot resize non vector-type reporter values.");
503 }
504}
505template <typename T>
506void
508{
509 if constexpr (is_std_vector<T>::value)
510 this->_state.value().clear();
511 else
512 mooseError("Cannot clear non vector-type reporter values.");
513}
514
515template <typename T>
516void
518{
519 // Case 1: T is a numeric type that we can sum (excluding bool)
520 if constexpr (std::is_arithmetic<T>::value && !std::is_same<T, bool>::value)
521 {
522 // Perform summation of the scalar value across all processors
523 this->comm().sum(this->_state.value());
524 return;
525 }
526 // Case 2: T is a vector type
527 else if constexpr (is_std_vector<T>::value)
528 {
529 using VectorValueType = typename T::value_type;
530
531 // Check if the vector elements are of a numeric type
532 if constexpr (std::is_arithmetic<VectorValueType>::value &&
533 !std::is_same<VectorValueType, bool>::value)
534 {
535 // Perform summation of the vector elements across all processors
536 this->comm().sum(this->_state.value());
537 return;
538 }
539 // Check if the vector elements are also vectors
540 else if constexpr (is_std_vector<VectorValueType>::value)
541 {
542 using InnerValueType = typename VectorValueType::value_type;
543
544 // Check if the inner vector elements are of a numeric type
545 if constexpr (std::is_arithmetic<InnerValueType>::value &&
546 !std::is_same<InnerValueType, bool>::value)
547 {
548#ifdef DEBUG
549 auto vec_size = this->_state.value().size();
550 this->comm().max(vec_size);
551 // Assert only passes on all ranks if they are all the same size.
552 mooseAssert(this->_state.value().size() == vec_size,
553 "Reporter vector have different sizes on different ranks.");
554#endif
555 // Iterate over each inner vector in the outer vector
556 for (auto & innerVector : this->_state.value())
557 {
558 // Get the maximum size of the inner vector across all processors
559 dof_id_type maxInnerSize = innerVector.size();
560 this->comm().max(maxInnerSize);
561
562 // Resize the inner vector to the maximum size
563 innerVector.resize(maxInnerSize);
564
565 // Perform summation of the inner vector elements across all processors
566 this->comm().sum(innerVector);
567 }
568 return;
569 }
570 }
571 }
572
573 mooseError("Cannot perform sum operation on non-numeric or unsupported vector types.");
574}
575
579template <typename T>
581{
582public:
584 const MooseObject & producer,
587 const MooseObject & producer,
589 const T & default_value);
590 virtual void finalize() override;
591 virtual std::string contextType() const override { return MooseUtils::prettyCppType(this); }
592};
593
594template <typename T>
596 const MooseObject & producer,
597 ReporterState<T> & state)
598 : ReporterGeneralContext<T>(other, producer, state)
599{
600 this->_producer_enum.clear();
602}
603
604template <typename T>
606 const MooseObject & producer,
607 ReporterState<T> & state,
608 const T & default_value)
609 : ReporterGeneralContext<T>(other, producer, state, default_value)
610{
611 this->_producer_enum.clear();
613}
614
615template <typename T>
616void
618{
619 this->requiresConsumerModes(this->_state, {REPORTER_MODE_UNSET, REPORTER_MODE_REPLICATED});
620 this->broadcast();
621}
622
626template <typename T>
628{
629public:
631 const MooseObject & producer,
633 const std::vector<T> & values);
635 const MooseObject & producer,
637 const T & default_value,
638 const std::vector<T> & values);
639
640 virtual void finalize() override;
641 virtual std::string contextType() const override { return MooseUtils::prettyCppType(this); }
642
643private:
645 const std::vector<T> & _values;
646};
647
648template <typename T>
650 const MooseObject & producer,
651 ReporterState<T> & state,
652 const std::vector<T> & values)
653 : ReporterGeneralContext<T>(other, producer, state), _values(values)
654{
655 this->_producer_enum.clear();
657}
658
659template <typename T>
661 const MooseObject & producer,
662 ReporterState<T> & state,
663 const T & default_value,
664 const std::vector<T> & values)
665 : ReporterGeneralContext<T>(other, producer, state, default_value), _values(values)
666{
667 this->_producer_enum.clear();
669}
670
671template <typename T>
672void
674{
675 this->requiresConsumerModes(this->_state, {REPORTER_MODE_UNSET, REPORTER_MODE_REPLICATED});
676
677 mooseAssert(this->processor_id() == 0 ? _values.size() == this->n_processors() : true,
678 "Vector to be scattered must be sized to match the number of processors");
679 mooseAssert(
680 this->processor_id() > 0 ? _values.size() == 0 : true,
681 "Vector to be scattered must be sized to zero on processors except for the root processor");
682 this->comm().scatter(_values, this->_state.value());
683}
684
688template <typename T>
690{
691public:
693 const MooseObject & producer,
696 const MooseObject & producer,
698 const T & default_value);
699
700 virtual void finalize() override;
701 virtual std::string contextType() const override { return MooseUtils::prettyCppType(this); }
702};
703
704template <typename T>
706 const MooseObject & producer,
707 ReporterState<T> & state)
708 : ReporterGeneralContext<T>(other, producer, state)
709{
710 this->_producer_enum.clear();
712}
713
714template <typename T>
716 const MooseObject & producer,
717 ReporterState<T> & state,
718 const T & default_value)
719 : ReporterGeneralContext<T>(other, producer, state, default_value)
720{
721 this->_producer_enum.clear();
723}
724
725template <typename T>
726void
728{
729 this->requiresConsumerModes(this->_state, {REPORTER_MODE_UNSET, REPORTER_MODE_ROOT});
730 this->comm().gather(0, this->_state.value());
731}
732
739template <typename T>
740class ReporterVectorContext : public ReporterContext<std::vector<T>>
741{
742public:
744 const MooseObject & producer,
745 ReporterState<std::vector<T>> & state);
747 const MooseObject & producer,
748 ReporterState<std::vector<T>> & state,
749 const std::vector<T> & default_value);
750
755 virtual void declareClone(ReporterData & r_data,
756 const ReporterName & r_name,
757 const ReporterMode & mode,
758 const MooseObject & producer) const final;
759
764 virtual void declareVectorClone(ReporterData & r_data,
765 const ReporterName & r_name,
766 const ReporterMode & mode,
767 const MooseObject & producer) const final;
768
773 virtual void resize(dof_id_type local_size) override { this->_state.value().resize(local_size); }
774
778 virtual void clear() override { this->_state.value().clear(); }
779
780 virtual void vectorSum() override
781 {
782 // Case 1: T is type that we can sum
783 if constexpr (std::is_arithmetic<T>::value &&
784 !std::is_same<T, bool>::value) // We can't sum bools.
785 {
786 // Resize vector to max size
787 dof_id_type vec_size = this->_state.value().size();
788 this->comm().max(vec_size);
789 this->_state.value().resize(vec_size);
790
791 this->comm().sum(this->_state.value());
792 return;
793 }
794 // Case 2: T is a vector
795 else if constexpr (is_std_vector<T>::value)
796 {
797 // Resize vector to max size
798 dof_id_type vec_size = this->_state.value().size();
799 this->comm().max(vec_size);
800 this->_state.value().resize(vec_size);
801
802 using ValueType = typename T::value_type;
803 // Check if the ValueType is a vector
804 if constexpr (std::is_arithmetic<ValueType>::value && !std::is_same<ValueType, bool>::value)
805 {
806#ifdef DEBUG
807 auto vec_size = this->_state.value().size();
808 this->comm().max(vec_size);
809 // Assert only passes on all ranks if they are all the same size.
810 mooseAssert(this->_state.value().size() == vec_size,
811 "Reporter vector have different sizes on different ranks.");
812#endif
813 for (auto & val_vec : this->_state.value())
814 {
815 // Resize vector to max size
816 dof_id_type val_vec_size = val_vec.size();
817 this->comm().max(val_vec_size);
818 val_vec.resize(val_vec_size);
819
820 this->comm().sum(val_vec);
821 }
822 return;
823 }
824 }
825 // If we don't perform a summing operation, error out.
826 mooseError("Cannot perform sum operation on non-numeric or unsupported vector types.");
827 }
828
829 virtual std::string contextType() const override { return MooseUtils::prettyCppType(this); }
830};
831
832template <typename T>
834 const MooseObject & producer,
835 ReporterState<std::vector<T>> & state)
836 : ReporterContext<std::vector<T>>(other, producer, state)
837{
838}
839
840template <typename T>
842 const MooseObject & producer,
843 ReporterState<std::vector<T>> & state,
844 const std::vector<T> & default_value)
845 : ReporterContext<std::vector<T>>(other, producer, state, default_value)
846{
847}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
std::array< Real, 2 > values
Definition MortarUtils.C:52
const ReporterMode REPORTER_MODE_REPLICATED
const ReporterMode REPORTER_MODE_DISTRIBUTED
const ReporterMode REPORTER_MODE_UNSET
const ReporterMode REPORTER_MODE_ROOT
std::string typeAndName() const
Get the class's combined type and name; useful in error handling.
Definition MooseBase.C:57
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
A context that broadcasts the Reporter value from the root processor.
virtual std::string contextType() const override
ReporterBroadcastContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state)
virtual void finalize() override
Perform automatic parallel communication based on the producer/consumer modes.
This is a helper class to aid with parallel communication of compute Reporter values as well as provi...
virtual void transferToVector(ReporterData &r_data, const ReporterName &r_name, dof_id_type index, unsigned int time_index=0) const =0
Helper for enabling generic transfer of Reporter values to a vector.
virtual const ReporterName & name() const =0
Return the ReporterName that the context is associated.
virtual void resize(dof_id_type local_size)=0
Helper for resizing vector data.
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.
virtual bool restoreState()=0
Called by FEProblemBase::restoreSolutions via ReporterData.
virtual void declareVectorClone(ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const =0
Helper for declaring new vector reporter values based on this context.
virtual void clear()=0
Helper for clearing vector data.
ReporterProducerEnum _producer_enum
Defines how the Reporter value can be produced and how it is being produced.
const MooseObject & getProducer() const
Return the MooseObject that produces this Reporter.
virtual void broadcast(processor_id_type root)=0
Helper for broadcasting reporter value from processor root.
virtual void storeInfo(nlohmann::json &json) const =0
Called by JSONOutput::outputReporters to output meta data independent of calculated values.
virtual std::string contextType() const =0
const ReporterProducerEnum & getProducerModeEnum() const
Return the Reporter value produced mode.
virtual void transferFromVector(ReporterData &r_data, const ReporterName &r_name, dof_id_type index, unsigned int time_index=0) const =0
Helper for enabling generic transfer of a vector Reporter of values to a single value.
const MooseObject & _producer
The MooseObject that is producing this Reporter.
virtual ~ReporterContextBase()=default
virtual void store(nlohmann::json &json) const =0
Called by JSONOutput::outputReporters to invoke storage of values for output.
virtual std::string type() const =0
Return the type of the data stored.
virtual void copyValuesBack()=0
Called by FEProblemBase::advanceState via ReporterData.
virtual void finalize()=0
Called by FEProblemBase::joinAndFinalize via ReporterData.
virtual void vectorSum()=0
Helper for summing reporter value.
void init(const ReporterMode &mode)
Initialize the producer mode.
virtual void transfer(ReporterData &r_data, const ReporterName &r_name, unsigned int time_index=0) const =0
Helper for enabling generic transfer of Reporter values.
virtual void declareClone(ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const =0
Helper for declaring new reporter values based on this context.
General context that is called by all Reporter values to manage the old values.
ReporterContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state)
virtual void storeInfo(nlohmann::json &json) const override
Output meta data to JSON, see JSONOutput.
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.
ReporterContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state, const T &default_value)
virtual void transfer(ReporterData &r_data, const ReporterName &r_name, unsigned int time_index=0) const override
Perform type specific transfer.
AutoOperation
Options for automatic parallel operations to perform by the default context.
virtual void broadcast(processor_id_type root=0) override
Helper for broadcasting reporter value from processor root.
virtual void copyValuesBack() override
Called by FEProblemBase::advanceState via ReporterData.
virtual std::string type() const override
Return the type being stored by the associated ReporterState object.
virtual void store(nlohmann::json &json) const override
Output data to JSON, see JSONOutput.
const ReporterName & name() const override final
Return the name of the Reporter value.
virtual bool restoreState() override
Restore state to its old values.
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.
virtual void finalize() override
Perform automatic parallel communication based on the producer/consumer modes.
const ReporterState< T > & state() const
Return a reference to the ReporterState object that is storing the Reporter value.
ReporterState< T > & _state
The state on which this context object operates.
virtual std::string contextType() const override=0
This is a helper class for managing the storage of declared Reporter object values.
A context that gathers the Reporter value to the root processor.
virtual std::string contextType() const override
ReporterGatherContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state)
virtual void finalize() override
Perform automatic parallel communication based on the producer/consumer modes.
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.
virtual std::string contextType() const override
virtual void resize(dof_id_type local_size) final
Helper for resizing vector data.
virtual void clear() final
Helper for clearing vector data.
virtual void vectorSum() final
Helper for summing reporter value.
ReporterGeneralContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state, const T &default_value)
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.
ReporterGeneralContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state)
MooseEnumItem that automatically creates the ID and doesn't allow the ID to be assigned.
The Reporter system is comprised of objects that can contain any number of data values.
MooseEnum designed for the ReporterContext objects to define how a ReporterValue can and is being pro...
void insert(const ReporterMode &mode, Args... modes)
void clear()
Clear all available items (i.e., create an empty MooseEnum)
A context that scatters the Reporter value from the root processor.
virtual void finalize() override
Perform automatic parallel communication based on the producer/consumer modes.
const std::vector< T > & _values
The values to scatter.
ReporterScatterContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< T > &state, const std::vector< T > &values)
virtual std::string contextType() const override
The base class for storing a Reporter's state.
A special version of RestartableData to aid in storing Reporter values.
T & value(const std::size_t time_index=0)
Return a reference to the current value or one of the old values.
This context is specific for vector types of reporters, mainly for declaring a vector of the type fro...
virtual std::string contextType() const override
virtual void resize(dof_id_type local_size) override
Since we know that the _state value is a vector type, we can resize it based on.
virtual void vectorSum() override
Helper for summing reporter value.
virtual void declareClone(ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const final
This simply throws an error to avoid infinite instantiations.
virtual void declareVectorClone(ReporterData &r_data, const ReporterName &r_name, const ReporterMode &mode, const MooseObject &producer) const final
This simply throws an error to avoid infinite instantiations.
ReporterVectorContext(const libMesh::ParallelObject &other, const MooseObject &producer, ReporterState< std::vector< T > > &state)
virtual void clear() override
Since we know that the _state value is a vector type, we can clear it.
void max(const T &r, T &o, Request &req) const
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
const Parallel::Communicator & comm() const
std::string prettyCppType(const std::string &cpp_type)