Cantera
3.0.0
|
Various templated functions that carry out common vector and polynomial operations (see Templated Array and Polynomial Operations). More...
Various templated functions that carry out common vector and polynomial operations (see Templated Array and Polynomial Operations).
Definition in file utilities.h.
Go to the source code of this file.
Namespaces | |
namespace | Cantera |
Namespace for the Cantera kernel. | |
Macros | |
#define | CT_DEFINE_HAS_MEMBER(detector_name, func_name) |
A macro for generating member function detectors, which can then be used in combination with if constexpr to condition behavior on the availability of that member function. | |
Functions | |
template<class V > | |
double | dot4 (const V &x, const V &y) |
Templated Inner product of two vectors of length 4. | |
template<class V > | |
double | dot5 (const V &x, const V &y) |
Templated Inner product of two vectors of length 5. | |
template<class InputIter , class InputIter2 > | |
double | dot (InputIter x_begin, InputIter x_end, InputIter2 y_begin) |
Function that calculates a templated inner product. | |
template<class InputIter , class OutputIter , class S > | |
void | scale (InputIter begin, InputIter end, OutputIter out, S scale_factor) |
Multiply elements of an array by a scale factor. | |
template<class D , class R > | |
R | poly6 (D x, R *c) |
Templated evaluation of a polynomial of order 6. | |
template<class D , class R > | |
R | poly8 (D x, R *c) |
Templated evaluation of a polynomial of order 8. | |
template<class D , class R > | |
R | poly5 (D x, R *c) |
Templated evaluation of a polynomial of order 5. | |
template<class D , class R > | |
R | poly4 (D x, R *c) |
Evaluates a polynomial of order 4. | |
template<class D , class R > | |
R | poly3 (D x, R *c) |
Templated evaluation of a polynomial of order 3. | |
void | checkFinite (const double tmp) |
Check to see that a number is finite (not NaN, +Inf or -Inf) | |
void | checkFinite (const string &name, double *values, size_t N) |
Check to see that all elements in an array are finite. | |
template<class T , class U > | |
const U & | getValue (const map< T, U > &m, const T &key, const U &default_val) |
Const accessor for a value in a map. | |
template<class T , class U = int> | |
U | len (const T &container) |
Get the size of a container, cast to a signed integer type. | |
#define CT_DEFINE_HAS_MEMBER | ( | detector_name, | |
func_name | |||
) |
A macro for generating member function detectors, which can then be used in combination with if constexpr
to condition behavior on the availability of that member function.
See MultiRate for examples of use.
Definition at line 205 of file utilities.h.