Classes | Functions
Piecewise.h File Reference

Go to the source code of this file.


class  Piecewise
 Function which provides a piecewise approximation to a provided (x,y) point data set. More...


InputParameters validParams< Piecewise > ()

Function Documentation

Definition at line 22 of file Piecewise.C.

Referenced by validParams< PiecewiseConstant >(), and validParams< PiecewiseLinear >().

23 {
25  params.addParam<std::vector<Real>>("xy_data",
26  "All function data, supplied in abscissa, ordinate pairs");
27  params.addParam<std::vector<Real>>("x", "The abscissa values");
28  params.addParam<std::vector<Real>>("y", "The ordinate values");
29  params.addParam<FileName>("data_file", "File holding csv data for use with Piecewise");
30  params.addParam<unsigned int>("x_index_in_file", 0, "The abscissa index in the data file");
31  params.addParam<unsigned int>("y_index_in_file", 1, "The ordinate index in the data file");
32  params.addParam<bool>(
33  "xy_in_file_only", true, "If the data file only contains abscissa and ordinate data");
35  MooseEnum format("columns=0 rows=1", "rows");
36  params.addParam<MooseEnum>(
37  "format", format, "Format of csv data file that is in either in columns or rows");
38  params.addParam<Real>("scale_factor", 1.0, "Scale factor to be applied to the ordinate values");
40  MooseEnum axis("x=0 y=1 z=2 0=3 1=4 2=5");
41  axis.deprecate("0", "x");
42  axis.deprecate("1", "y");
43  axis.deprecate("2", "z");
44  params.addParam<MooseEnum>(
45  "axis", axis, "The axis used (x, y, or z) if this is to be a function of position");
46  return params;
47 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
InputParameters validParams< Function >()
Definition: Function.C:19