Reads an interpolation table from a file in CSV-format. Entries govern the layout of the CSV file. The index of the first (x) column of the table is given by the refColumn entry, and is always scalar. The indices of the components of the second (y) column are given by the componentColumns entry. More...
Public Member Functions | |
TypeName ("csv") | |
Runtime type information. More... | |
Csv (const word &name, const dictionary &dict, List< Tuple2< scalar, Type >> &table) | |
Construct from dictionary. More... | |
virtual autoPtr< TableReader< Type > > | clone () const |
Construct and return a copy. More... | |
virtual | ~Csv () |
Destructor. More... | |
virtual void | write (Ostream &os, const List< Tuple2< scalar, Type >> &table) const |
Write the CSV parameters. More... | |
Public Member Functions inherited from TableFileReader< Type > | |
TableFileReader (const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~TableFileReader () |
Destructor. More... | |
Public Member Functions inherited from TableReader< Type > | |
TypeName ("TableReader") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, TableReader, dictionary,(const word &name, const dictionary &dict, List< Tuple2< scalar, Type >> &table),(name, dict, table)) | |
TableReader (const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~TableReader () |
Destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from TableReader< Type > | |
static autoPtr< TableReader< Type > > | New (const word &name, const dictionary &dict, List< Tuple2< scalar, Type >> &table) |
Protected Member Functions inherited from TableFileReader< Type > | |
void | read (const dictionary &dict, List< Tuple2< scalar, Type >> &) const |
Read a 1D table. More... | |
Reads an interpolation table from a file in CSV-format. Entries govern the layout of the CSV file. The index of the first (x) column of the table is given by the refColumn entry, and is always scalar. The indices of the components of the second (y) column are given by the componentColumns entry.
nHeaderLine 4; // number of header lines refColumn 0; // reference column index componentColumns (1 2 3); // component column indices separator ","; // optional (defaults to ",") mergeSeparators no; // merge multiple separators
Definition at line 65 of file CsvTableReader.H.
Csv | ( | const word & | name, |
const dictionary & | dict, | ||
List< Tuple2< scalar, Type >> & | table | ||
) |
Construct from dictionary.
Definition at line 205 of file CsvTableReader.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
|
virtual |
Destructor.
Definition at line 233 of file CsvTableReader.C.
References Csv< Type >::write().
Referenced by Csv< Type >::clone().
TypeName | ( | "csv" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a copy.
Implements TableReader< Type >.
Definition at line 113 of file CsvTableReader.H.
References Csv< Type >::write(), and Csv< Type >::~Csv().
Write the CSV parameters.
Reimplemented from TableFileReader< Type >.
Definition at line 241 of file CsvTableReader.C.
References TableFileReader< Type >::write(), and Foam::writeEntry().
Referenced by Csv< Type >::clone(), and Csv< Type >::~Csv().