74 if (nodal_solution.size() > 0)
87 unsigned int num_values =
98 else if (num_values != 0 && num_values <
_has_values.size())
99 mooseError(
"You must use separate NodalValueSampler objects for variables with different " Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
virtual void initialize()
Initialize the datastructures.
const Node *const & _current_node
Reference to current node pointer.
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 void initialize() override
Initialize the datastructures.
Samples values of nodal variable(s).
virtual const std::string & name() const
Get the name of the class.
std::vector< MooseVariable * > _coupled_standard_moose_vars
Vector of standard coupled variables.
NodalValueSampler(const InputParameters ¶meters)
virtual void threadJoin(const UserObject &y) override
Must override.
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 threadJoin(const SamplerBase &y)
Join the values.
static InputParameters validParams()
std::vector< unsigned int > _has_values
Vector of 0 and 1 values which records whether values are present at the current node.
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 unsigned int _qp
Quadrature point index.
static InputParameters validParams()
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
OutputTools< Real >::VariableValue VariableValue
virtual void finalize()
Finalize the values.
virtual void finalize() override
Finalize the values.
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.
Base class VectorPostprocessors operating on nodal variables.
static InputParameters validParams()
registerMooseObject("MooseApp", NodalValueSampler)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Base class for user-specific data.