www.mooseframework.org
Classes | Functions
LeastSquaresFit.h File Reference

Go to the source code of this file.

Classes

class  LeastSquaresFit
 LeastSquaresFit is a VectorPostprocessor that performs a least squares fit on data calculated in another VectorPostprocessor. More...
 

Functions

template<>
InputParameters validParams< LeastSquaresFit > ()
 

Function Documentation

Definition at line 21 of file LeastSquaresFit.C.

22 {
24 
25  params.addRequiredParam<VectorPostprocessorName>(
26  "vectorpostprocessor",
27  "The vectorpostprocessor on whose values we perform a least squares fit");
28  params.addRequiredParam<std::string>("x_name", "The name of the independent variable");
29  params.addRequiredParam<std::string>("y_name", "The name of the dependent variable");
30  params.addRequiredParam<unsigned int>("order", "The order of the polynomial fit");
31  params.addParam<unsigned int>("num_samples", "The number of samples to be output");
32  params.addParam<Real>(
33  "x_scale", 1.0, "Value used to scale x values (scaling is done after shifting)");
34  params.addParam<Real>(
35  "x_shift", 0.0, "Value used to shift x values (shifting is done before scaling)");
36  params.addParam<Real>(
37  "y_scale", 1.0, "Value used to scale y values (scaling is done after shifting)");
38  params.addParam<Real>(
39  "y_shift", 0.0, "Value used to shift y values (shifting is done before scaling)");
40  params.addParam<Real>("sample_x_min", "The minimum x value of the of samples to be output");
41  params.addParam<Real>("sample_x_max", "The maximum x value of the of samples to be output");
42  MooseEnum output_type("Coefficients Samples", "Coefficients");
43  params.addParam<MooseEnum>(
44  "output", output_type, "The quantity to output. Options are: " + output_type.getRawNames());
45  params.addClassDescription("Performs a polynomial least squares fit on the data contained in "
46  "another VectorPostprocessor");
47 
48  return params;
49 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
InputParameters validParams< GeneralVectorPostprocessor >()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
std::string getRawNames() const
Method for returning the raw name strings for this instance.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
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...