21 "vectorpostprocessor_a",
"The first vector post-processor in the comparison");
23 "vectorpostprocessor_b",
"The second vector post-processor in the comparison");
25 "vector_name_a",
"The name of the vector in the first vector post-processor to compare");
27 "vector_name_b",
"The name of the vector in the second vector post-processor to compare");
30 "Compares two vector post-processors of equal size and produces a boolean value");
38 _values_a(getVectorPostprocessorValue(
"vectorpostprocessor_a",
39 getParam<
std::string>(
"vector_name_a"))),
40 _values_b(getVectorPostprocessorValue(
"vectorpostprocessor_b",
41 getParam<
std::string>(
"vector_name_b"))),
43 _comparison_value(0.0)
57 mooseError(
"The compared vector post-processors must have the same size");
60 bool comparison_bool =
true;
61 for (
unsigned int i = 0; i <
_values_a.size(); ++i)
PostprocessorValue _comparison_value
The comparison value; 1 for all true and 0 for at least one false.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const VectorPostprocessorValue & _values_b
Values of the second vector post-processor to compare.
static InputParameters validParams()
virtual void execute() override
Execute method.
VectorPostprocessorComparison(const InputParameters ¶meters)
bool comparisonIsTrue(const Real &a, const Real &b) const
Performs the selected comparison on the two values.
static InputParameters validParams()
Real PostprocessorValue
various MOOSE typedefs
Base class for comparing quantities and producing a boolean value.
Compares two vector post-processors of equal size and produces a boolean value.
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const VectorPostprocessorValue & _values_a
Values of the first vector post-processor to compare.
registerMooseObject("MooseApp", VectorPostprocessorComparison)