www.mooseframework.org
BilinearInterpolation.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 // MOOSE includes
13 #include "ColumnMajorMatrix.h"
14 
15 // C++ includes
16 #include <vector>
17 
37 {
38 public:
45  BilinearInterpolation(const std::vector<Real> & XAXIS,
46  const std::vector<Real> & YAXIS,
47  const ColumnMajorMatrix & ZSURFACE);
48 
49  virtual ~BilinearInterpolation() = default;
50 
55  Real sample(Real xcoord, Real ycoord);
56 
57  void getNeighborIndices(const std::vector<Real> & inArr, Real x, int & lowerX, int & upperX);
58 
59 private:
60  std::vector<Real> _xAxis;
61  std::vector<Real> _yAxis;
63  static int _file_number;
64 };
65 
BilinearInterpolation::_zSurface
ColumnMajorMatrix _zSurface
Definition: BilinearInterpolation.h:62
BilinearInterpolation::sample
Real sample(Real xcoord, Real ycoord)
This function will take an independent variable input and will return the dependent variable based on...
Definition: BilinearInterpolation.C:59
BilinearInterpolation::_file_number
static int _file_number
Definition: BilinearInterpolation.h:63
BilinearInterpolation
This class applies the Least Squares algorithm to a set of points to provide a smooth curve for sampl...
Definition: BilinearInterpolation.h:36
BilinearInterpolation::_xAxis
std::vector< Real > _xAxis
Definition: BilinearInterpolation.h:60
BilinearInterpolation::BilinearInterpolation
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.
Definition: BilinearInterpolation.C:14
BilinearInterpolation::_yAxis
std::vector< Real > _yAxis
Definition: BilinearInterpolation.h:61
x
static PetscErrorCode Vec x
Definition: PetscDMMoose.C:1263
BilinearInterpolation::getNeighborIndices
void getNeighborIndices(const std::vector< Real > &inArr, Real x, int &lowerX, int &upperX)
Definition: BilinearInterpolation.C:22
ColumnMajorMatrixTempl< Real >
ColumnMajorMatrix.h
BilinearInterpolation::~BilinearInterpolation
virtual ~BilinearInterpolation()=default