www.mooseframework.org
PiecewiseBilinear.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 
12 #include "Function.h"
13 
14 class PiecewiseBilinear;
15 template <typename>
19 
20 template <>
22 
54 {
55 public:
57 
58  // Necessary for using forward declaration of BilinearInterpolation in std::unique_ptr
59  virtual ~PiecewiseBilinear();
60 
64  virtual Real value(Real t, const Point & pt) override;
65 
66 private:
67  std::unique_ptr<BilinearInterpolation> _bilinear_interp;
68  const std::string _data_file_name;
69  const int _axis;
70  const int _yaxis;
71  const int _xaxis;
72  const bool _axisValid;
73  const bool _yaxisValid;
74  const bool _xaxisValid;
75  const Real _scale_factor;
76  const bool _radial;
77 
78  void parse(std::vector<Real> & x, std::vector<Real> & y, ColumnMajorMatrix & z);
79 };
80 
Base class for function objects.
Definition: Function.h:40
This class defines a Tensor that can change its shape.
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
void parse(std::vector< Real > &x, std::vector< Real > &y, ColumnMajorMatrix &z)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
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
ColumnMajorMatrixTempl< Real > ColumnMajorMatrix
PiecewiseBilinear reads from a file the information necessary to build the vectors x and y and the Co...
const Real _scale_factor
virtual ~PiecewiseBilinear()
const std::string _data_file_name
PiecewiseBilinear(const InputParameters &parameters)