25 #include <queso/UniformOneDGrid.h>
40 m_minPosition(minPosition),
41 m_maxPosition(maxPosition)
74 T ratio = ((T) i)/(((T)m_size)-1.);
75 T position = (1.-ratio)*m_minPosition + ratio*m_maxPosition;
83 queso_require_msg(!((paramValue < m_minPosition) || (m_maxPosition < paramValue)),
"paramValue is out of domain");
85 T ratio = (paramValue - m_minPosition)/(m_maxPosition - m_minPosition);
86 unsigned int i = (
unsigned int) (ratio*(m_size-1.));
88 ((*this)[i] > paramValue)) {
unsigned int displayVerbosity() const
T operator[](unsigned int i) const
Returns the position of the i-th point in the grid.
UniformOneDGrid(const BaseEnvironment &env, const char *prefix, unsigned int size, T minPosition, T maxPosition)
Default constructor.
~UniformOneDGrid()
Destructor.
const BaseEnvironment & m_env
#define queso_require_msg(asserted, msg)
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
#define queso_require_less_msg(expr1, expr2, msg)
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
unsigned int findIntervalId(const T ¶mValue) const
Finds the ID of an interval. See template specialization.
Class for accommodating uniform one-dimensional grids.
Base class for accommodating one-dimensional grids.
unsigned int size() const
Grid size; the amount of points that defines the grid.