Cantera
2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
include
cantera
numerics
funcs.h
Go to the documentation of this file.
1
/**
2
* @file funcs.h Header for a file containing miscellaneous
3
* numerical functions.
4
*/
5
/*
6
* Copyright 2001-2003 California Institute of Technology
7
* See file License.txt for licensing information
8
*/
9
#ifndef CT_FUNCS_H
10
#define CT_FUNCS_H
11
12
#include "
cantera/base/ct_defs.h
"
13
14
namespace
Cantera
15
{
16
17
//! Linearly interpolate a function defined on a discrete grid.
18
/*!
19
* Vector xpts contains a monotonic sequence of grid points, and
20
* vector fpts contains function values defined at these points.
21
* The value returned is the linear interpolate at point x.
22
* If x is outside the range of xpts, the value of fpts at the
23
* nearest end is returned.
24
*
25
* @param x value of the x coordinate
26
* @param xpts value of the grid points
27
* @param fpts value of the interpolant at the grid points
28
*
29
* @return Returned value is the value of of the interpolated
30
* function at x.
31
*/
32
doublereal
linearInterp
(doublereal x,
const
vector_fp
& xpts,
33
const
vector_fp
& fpts);
34
}
35
36
#endif
Generated by
1.8.2