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)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Real PostprocessorValue
various MOOSE typedefs
registerMooseObject("MooseApp", VectorPostprocessorComparison)
Base class for comparing quantities and producing a boolean value.
bool comparisonIsTrue(const Real &a, const Real &b) const
Performs the selected comparison on the two values.
static InputParameters validParams()
Compares two vector post-processors of equal size and produces a boolean value.
virtual void execute() override
Execute method.
const VectorPostprocessorValue & _values_a
Values of the first vector post-processor to compare.
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
PostprocessorValue _comparison_value
The comparison value; 1 for all true and 0 for at least one false.
static InputParameters validParams()
const VectorPostprocessorValue & _values_b
Values of the second vector post-processor to compare.
VectorPostprocessorComparison(const InputParameters ¶meters)