29 "The number of points to sample along the line");
32 "The Functions to sample along the line");
40 _start_point(getParam<Point>(
"start_point")),
41 _end_point(getParam<Point>(
"end_point")),
42 _num_points(getParam<unsigned
int>(
"num_points")),
43 _function_names(getParam<
std::vector<FunctionName>>(
"functions")),
44 _num_funcs(_function_names.size()),
45 _functions(_num_funcs),
53 std::vector<std::string> function_name_strings(
_num_funcs);
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
virtual void initialize()
Initialize the datastructures.
std::vector< const Function * > _functions
Pointers to the Functions.
Point _start_point
Beginning of the line.
registerMooseObject("MooseApp", LineFunctionSampler)
LineFunctionSampler(const InputParameters ¶meters)
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
virtual void finalize() override
Finalize.
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...
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
static InputParameters validParams()
std::vector< Point > _points
The points to evaluate at.
static InputParameters validParams()
Point _end_point
End of the line.
virtual void finalize()
Finalize the values.
virtual void execute() override
Execute method.
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.
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
static void generatePointsAndIDs(const Point &start_point, const Point &end_point, unsigned int num_points, std::vector< Point > &points, std::vector< Real > &ids)
Helper function to generate the list of points along a line and a unique ID for each point...
unsigned int _num_funcs
Number of Functions we're sampling.
std::vector< Real > _ids
The ID to use for each point (yes, this is Real on purpose)
const std::vector< FunctionName > & _function_names
Names of the Functions.
static InputParameters validParams()
unsigned int _num_points
Number of points along the line.
processor_id_type processor_id() const
virtual void initialize() override
Initialize the datastructures.
void ErrorVector unsigned int
std::vector< Real > _values
So we don't have to create and destroy this vector over and over again.