www.mooseframework.org
LeastSquaresFitHistory.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 
21 {
22 public:
24 
30 
34  virtual void initialize() override;
35 
39  virtual void execute() override;
40 
41 protected:
43  VectorPostprocessorName _vpp_name;
44 
46  const unsigned int _order;
47 
49  const bool _truncate_order;
50 
52  const std::string _x_name;
53  const std::string _y_name;
54 
59 
61  const Real _x_scale;
62  const Real _x_shift;
63  const Real _y_scale;
64  const Real _y_shift;
66 
69 
73  std::vector<VectorPostprocessorValue *> _coeffs;
74 };
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
VectorPostprocessorName _vpp_name
The name of the VectorPostprocessor on which to perform the fit.
LeastSquaresFitHistory(const InputParameters &parameters)
Class constructor.
std::vector< VectorPostprocessorValue * > _coeffs
Vector of vectors with the individual coefficients.
const VectorPostprocessorValue & _x_values
The variables with the x, y data to be fit.
const Real _x_scale
Values used to scale and or shift x and y data.
const VectorPostprocessorValue & _y_values
const bool _truncate_order
Whether to truncate the polynomial order if an insufficient number of points is provided.
const std::string _x_name
The name of the variables storing the x, y data.
virtual void execute() override
Perform the least squares fit.
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:192
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LeastSquaresFitHistory is a VectorPostprocessor that performs a least squares fit on data calculated ...
const unsigned int _order
The order of the polynomial fit to be performed.
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
VectorPostprocessorValue * _times
Vector of times.
virtual void initialize() override
Initialize, clears old results.