77 if (dof_indices.size() > 0)
80 mooseAssert(nodal_solution.size() == dof_indices.size(),
"These must be the same length");
92 unsigned int num_values =
103 else if (num_values != 0 && num_values <
_has_values.size())
104 mooseError(
"You must use separate NodalValueSampler objects for variables with different "
122std::set<MooseVariableFieldBase *>
125 const std::set<MooseVariableFieldBase *> & libmesh_dbg_var(vars_to_check))
127 mooseAssert(vars_to_check ==
130 "The constructor should have caught any non-standard MOOSE variables");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
OutputTools< Real >::VariableValue VariableValue
registerMooseObject("MooseApp", NodalValueSampler)
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
const std::string & name() const
Get the name of the class.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
const Node *const & _current_node
Reference to current node pointer.
const unsigned int _qp
Quadrature point index.
Samples values of nodal variable(s).
virtual void execute() override
Execute method.
std::vector< Real > _values
So we don't have to create and destroy this vector over and over again.
virtual std::set< MooseVariableFieldBase * > checkVariables(const libMesh::Node &node, const std::set< MooseVariableFieldBase * > &vars_to_check) override
Check whether all of the supplied variables have degree of freedom indices on the supplied node.
static InputParameters validParams()
virtual void threadJoin(const UserObject &y) override
Must override.
std::vector< unsigned int > _has_values
Vector of 0 and 1 values which records whether values are present at the current node.
virtual void finalize() override
Finalize.
NodalValueSampler(const InputParameters ¶meters)
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Base class VectorPostprocessors operating on nodal variables.
static InputParameters validParams()
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
virtual void addSample(const Point &p, const Real &id, const std::vector< Real > &values)
Call this with the value of every variable at each point you want to sample at.
void setupVariables(const std::vector< std::string > &variable_names)
You MUST call this in the constructor of the child class and pass down the name of the variables.
virtual void initialize()
Initialize the datastructures.
virtual void threadJoin(const SamplerBase &y)
Join the values.
virtual void finalize()
Finalize the values.
void checkForStandardFieldVariableType(const MooseVariableFieldBase *const var_ptr, const std::string &var_param_name="variable") const
Checks whether the passed variable pointer corresponds to a regular single-valued field variable.
static InputParameters validParams()
Base class for user-specific data.