functions to build and evaluate the curves read in files, used internally by the TFELCheck library
More...
#include <string>
#include <vector>
|
| namespace | tfel |
| | the namespace tfel encloses all the TFEL project. This namespace is empty.
|
functions to build and evaluate the curves read in files, used internally by the TFELCheck library
- Date
- 20/10/2026
- Copyright
- Copyright (C) 2006-2025 CEA/DEN, EDF R&D. All rights reserved. This project is publicly released under either the GNU GPL Licence with linking exception or the CECILL-A licence. A copy of thoses licences are delivered with the sources of TFEL. CEA or EDF may also distribute this project under specific licensing conditions.
◆ buildCurve()
| Curve tfel::check::buildCurve |
( |
const std::string & | , |
|
|
const std::vector< double > & | , |
|
|
const std::vector< double > & | ) |
- Returns
- the curve defined by the given abscissas and values
- Parameters
-
| [in] | f | file from which the abscissas and values were read, used in error messages |
| [in] | x | abscissas |
| [in] | y | values |
The points are sorted by increasing abscissa. If an abscissa appears more than once, only the first point is kept, as in the Linearization class. An exception is thrown if no point is given.
◆ covers()
| bool tfel::check::covers |
( |
const Curve & | , |
|
|
const std::vector< double > & | ) |
- Returns
- true if the given abscissas are in the range of the curve
- Parameters
-
| [in] | c | curve |
| [in] | x | abscissas |
A small tolerance, relative to the magnitude of the abscissas of the curve, absorbs the rounding errors on the bounds of the range.
◆ evaluateCurve()
| std::vector< double > tfel::check::evaluateCurve |
( |
Interpolation & | , |
|
|
const Curve & | , |
|
|
const std::vector< double > & | ) |
- Returns
- the values of a curve at the given abscissas
- Parameters
-
| [in] | i | interpolation |
| [in] | c | curve |
| [in] | x | abscissas |
The values of the curve are used at its own abscissas. Between them, the given interpolation is used. Outside the range of the curve, the first or last value is used. The interpolation is only built if needed.