www.mooseframework.org
BilinearInterpolation.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 BILINEARINTERPOLATION_H
16 #define BILINEARINTERPOLATION_H
17 
18 // MOOSE includes
19 #include "ColumnMajorMatrix.h"
20 
21 // C++ includes
22 #include <vector>
23 
43 {
44 public:
51  BilinearInterpolation(const std::vector<Real> & XAXIS,
52  const std::vector<Real> & YAXIS,
53  const ColumnMajorMatrix & ZSURFACE);
54 
55  virtual ~BilinearInterpolation() = default;
56 
61  Real sample(Real xcoord, Real ycoord);
62 
63  void getNeighborIndices(const std::vector<Real> & inArr, Real x, int & lowerX, int & upperX);
64 
65 private:
66  std::vector<Real> _xAxis;
67  std::vector<Real> _yAxis;
69  static int _file_number;
70 };
71 
72 #endif // BILINEARINTERPOLATION_H
void getNeighborIndices(const std::vector< Real > &inArr, Real x, int &lowerX, int &upperX)
std::vector< Real > _xAxis
This class applies the Least Squares algorithm to a set of points to provide a smooth curve for sampl...
BilinearInterpolation(const std::vector< Real > &XAXIS, const std::vector< Real > &YAXIS, const ColumnMajorMatrix &ZSURFACE)
Constructor, Takes two vectors of points for which to apply the fit.
std::vector< Real > _yAxis
static PetscErrorCode Vec x
This class defines a Tensor that can change its shape.
Real sample(Real xcoord, Real ycoord)
This function will take an independent variable input and will return the dependent variable based on...
ColumnMajorMatrix _zSurface
virtual ~BilinearInterpolation()=default