19 #include "libmesh/mesh_base.h"    27   params.
addClassDescription(
"Count number of DOFs of a non-linear variable that are greater than "    28                              "or less than a given threshold");
    30                                         "The name of the variable to conduct a comparison for");
    31   params.
addParam<SubdomainName>(
"subdomain", 
"The subdomain that the variable lives on");
    32   params.
addParam<
Real>(
"value", 0, 
"The value to compare against");
    33   MooseEnum comparator(
"greater less", 
"greater");
    37       "The comparison to perform between the variable and the provided value");
    44     _var(_fe_problem.getVariable(_tid,
    45                                  getParam<VariableName>(
"variable"),
    48     _mesh(_fe_problem.
mesh().getMesh()),
    49     _subdomain_restricted(isParamValid(
"subdomain")),
    50     _subdomain_id(_subdomain_restricted
    53     _value(getParam<
Real>(
"value")),
    54     _comparator(getParam<
MooseEnum>(
"comparator"))
    74     Threads::parallel_reduce(range, aldit);
    80     Threads::parallel_reduce(range, aldit);
    87     for (
auto dof : aldit.getDofIndices())
    88       if (solution(dof) > 
_value)
    93     for (
auto dof : aldit.getDofIndices())
    94       if (solution(dof) < 
_value)
 
const SubdomainID _subdomain_id
An optional subdomain over which to query degrees of freedom. 
virtual void initialize() override
Called before execute() is ever called so that data can be cleared. 
unsigned int _count
Represents the number of values in contact. 
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
SubdomainID getSubdomainID(const SubdomainName &subdomain_name, const MeshBase &mesh)
Gets the subdomain ID associated with the given SubdomainName. 
const MeshBase & _mesh
The libmesh mesh. 
const Real _value
The tolerance used to decide whether the variable indicates contact. 
const SubdomainID INVALID_BLOCK_ID
Grab all the (possibly semi)local dof indices for the variables passed in, in the system passed in...
static InputParameters validParams()
const std::string & name() const
Get the name of the class. 
void gatherSum(T &value)
Gather the parallel sum of the variable passed in. 
VarKindType
Framework-wide stuff. 
Real PostprocessorValue
various MOOSE typedefs 
const bool _subdomain_restricted
Whether we are subdomain restricting the active set search. 
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
SystemBase & _sys
Reference to the system object for this user object. 
unsigned int number() const
Gets the number of this system. 
const MooseVariableFEBase & _var
MOOSE variable we compute the contact set from. 
virtual void execute() override
Execute method. 
registerMooseObject("MooseApp", GreaterThanLessThanPostprocessor)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
GreaterThanLessThanPostprocessor(const InputParameters ¶meters)
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object. 
const MooseEnum _comparator
The comparison to perform. 
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.