www.mooseframework.org
PiecewiseBilinear.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef PIECEWISEBILINEAR_H
16 #define PIECEWISEBILINEAR_H
17 
18 #include "Function.h"
19 
20 class PiecewiseBilinear;
21 class ColumnMajorMatrix;
23 
24 template <>
26 
58 {
59 public:
61 
62  // Necessary for using forward declaration of BilinearInterpolation in std::unique_ptr
63  virtual ~PiecewiseBilinear();
64 
68  virtual Real value(Real t, const Point & pt) override;
69 
70 private:
71  std::unique_ptr<BilinearInterpolation> _bilinear_interp;
72  const std::string _data_file_name;
73  const int _axis;
74  const int _yaxis;
75  const int _xaxis;
76  const bool _axisValid;
77  const bool _yaxisValid;
78  const bool _xaxisValid;
79  const Real _scale_factor;
80  const bool _radial;
81 
82  void parse(std::vector<Real> & x, std::vector<Real> & y, ColumnMajorMatrix & z);
83 };
84 
85 #endif // PIECEWISEBILINEAR_H
Base class for function objects.
Definition: Function.h:46
This class applies the Least Squares algorithm to a set of points to provide a smooth curve for sampl...
InputParameters validParams< PiecewiseBilinear >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static PetscErrorCode Vec x
This class defines a Tensor that can change its shape.
void parse(std::vector< Real > &x, std::vector< Real > &y, ColumnMajorMatrix &z)
virtual Real value(Real t, const Point &pt) override
This function will return a value based on the first input argument only.
std::unique_ptr< BilinearInterpolation > _bilinear_interp
PiecewiseBilinear reads from a file the information necessary to build the vectors x and y and the Co...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
const Real _scale_factor
virtual ~PiecewiseBilinear()
const std::string _data_file_name
PiecewiseBilinear(const InputParameters &parameters)