Template Function GridKit::setLookupTable

Function Documentation

template<typename ScalarT>
void GridKit::setLookupTable(std::vector<std::vector<ScalarT>> &table, std::istream &idata, ScalarT &ti, ScalarT &tf)

Reads in an input stream of tabulated data.

Todo:

needs to return int for file error codes

Template Parameters:

ScalarT

Parameters:
  • table[out] object in memory where the data from the input stream is

  • filename[in] input stream to space and newline separated data

  • ti[out] initial time returned

  • tf[out] final time returned

Pre:

Input stream should read space separated data. Rows are separated by new line. Each row od data must have the same number of entries. The first column of the data represents time and other columns time dependent variables.