25 #include <queso/UniformOneDGrid.h>
40 m_minPosition(minPosition),
41 m_maxPosition(maxPosition)
72 queso_require_less_msg(i, m_size,
"too large i");
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)) {
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
~UniformOneDGrid()
Destructor.
Base class for accommodating one-dimensional grids.
const BaseEnvironment & m_env
unsigned int size() const
Grid size; the amount of points that defines the grid.
unsigned int findIntervalId(const T ¶mValue) const
Finds the ID of an interval. See template specialization.
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.
Class for accommodating uniform one-dimensional grids.
unsigned int displayVerbosity() const
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).