21 "Sets scalar variable by using information from a SolutionUserObject.");
22 params.
addRequiredParam<UserObjectName>(
"solution",
"The name of the SolutionUserObject");
23 params.
addParam<std::string>(
"from_variable",
24 "The name of the variable to extract from the file");
28 "Scale factor (a) to be applied to the solution (x): ax+b, where b is the 'add_factor'");
32 "Add this value (b) to the solution (x): ax+b, where a is the 'scale_factor'");
39 _scale_factor(getParam<Real>(
"scale_factor")),
40 _add_factor(getParam<Real>(
"add_factor"))
48 _var_name = getParam<std::string>(
"from_variable");
54 ": The SolutionUserObject contains multiple variables, please specifiy the "
55 "desired variable in the input file using the 'from_variable' parameter.");
registerMooseObject("MooseApp", SolutionScalarAux)
Base class for making kernels that work on auxiliary scalar variables.
static InputParameters validParams()
const std::string & name() const
Get the name of the class.
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...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
AuxScalarKernel for reading a solution from file.
std::string _var_name
The variable name of interest.
SolutionScalarAux(const InputParameters ¶meters)
static InputParameters validParams()
virtual Real computeValue() override
Compute the value of this kernel.
const Real _scale_factor
Multiplier for the solution, the a of ax+b.
const SolutionUserObjectBase & _solution_object
Reference to the SolutionUserObject storing the solution.
const Real _add_factor
Additional factor added to the solution, the b of ax+b.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
User object that reads an existing solution from an input file and uses it in the current simulation.
Real scalarValue(Real t, const std::string &var_name) const
Returns a value of a global variable.
const std::vector< std::string > & variableNames() const