17#include "libmesh/node.h"
25 params.
addRequiredParam<VariableName>(
"variable",
"The variable to be monitored");
26 params.
addRequiredParam<
unsigned int>(
"nodeid",
"The ID of the node where we monitor");
27 params.
addParam<Real>(
"scale_factor", 1,
"A scale factor to be applied to the variable");
34 _mesh(_subproblem.
mesh()),
35 _var_name(parameters.get<VariableName>(
"variable")),
37 _scale_factor(getParam<Real>(
"scale_factor")),
44 mooseError(
"NodalVariableValue should only be used when node renumbering is disabled.");
56 getParam<unsigned int>(
"nodeid"),
59 "' not found in the mesh!");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObject("MooseApp", NodalVariableValue)
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
const std::string & name() const
Get the name of the class.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
DofValue getNodalValue(const Node &node) const
Get the value of this variable at given node.
Sums a nodal value across all processors and multiplies the result by a scale factor.
NodalVariableValue(const InputParameters ¶meters)
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void execute() override
Execute method.
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
static InputParameters validParams()
void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name)=0
Returns the variable reference for requested MooseVariable which may be in any system.
void max(const T &r, T &o, Request &req) const
void gatherSum(T &value)
Gather the parallel sum of the variable passed in.
SubProblem & _subproblem
Reference to the Subproblem for this user object.
const THREAD_ID _tid
Thread ID of this postprocessor.
const Parallel::Communicator & _communicator
processor_id_type processor_id() const