15#include "libmesh/quadrature.h"
26 "The first variable to evaluate the difference with, performed as \"compare_a - compare_b\"");
28 "The second variable to evaluate the difference with, "
29 "performed as \"compare_a - compare_b\"");
32 "furthest_from_zero",
false,
"Find the difference with the highest absolute value");
36 params.
set<
bool>(
"_auto_broadcast") =
false;
54 _a(coupledValue(
"compare_a")),
55 _b(coupledValue(
"compare_b")),
56 _a_value(declareVector(coupledName(
"compare_a"))),
57 _b_value(declareVector(coupledName(
"compare_b"))),
58 _max_difference(declareVector(
"Difference")),
59 _position_x(declareVector(
"X")),
60 _position_y(declareVector(
"Y")),
61 _position_z(declareVector(
"Z")),
62 _furthest_from_zero(getParam<bool>(
"furthest_from_zero"))
78 for (
unsigned int qp = 0; qp <
_qrule->n_points(); ++qp)
CollectionOfAllValuesIntoAVector
@ MAXIMUM_DIFFERENCE_B_VALUE
@ MAXIMUM_DIFFERENCE_A_VALUE
registerMooseObject("MooseApp", ElementVariablesDifferenceMax)
const QBase *const & _qrule
const MooseArray< Point > & _q_point
Finds the largest difference between two variable fields.
std::vector< Real > _all
Collection of all the items so only one MPI call is required, these will be spread to the actual Vect...
VectorPostprocessorValue & _a_value
The value of _a that produced the maximum difference.
const bool _furthest_from_zero
Internal flag to indicate we are seeking the largest absolute value.
VectorPostprocessorValue & _position_y
The y position of the associated quadrature point.
VectorPostprocessorValue & _position_z
The z position of the associated quadrature point.
VectorPostprocessorValue & _max_difference
The actual maximum difference.
ElementVariablesDifferenceMax(const InputParameters ¶meters)
virtual void threadJoin(const UserObject &s) override
Must override.
static InputParameters validParams()
const VariableValue & _b
The second variable, operated to produce a difference as: _a - _b.
virtual void execute() override
Execute method.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const VariableValue & _a
The first variable, operated to produce a difference as: _a - _b.
virtual void finalize() override
Finalize.
VectorPostprocessorValue & _b_value
The value of _b that produced the maximum difference.
VectorPostprocessorValue & _position_x
The x position of the associated quadrature point.
static InputParameters validParams()
void gatherProxyValueMax(T1 &proxy, T2 &value)
Deteremine the value of a variable according to the parallel maximum of the provided proxy.
Base class for user-specific data.