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... | |
![]() | |
TableFileReader (const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~TableFileReader () |
Destructor. More... | |
![]() | |
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 autoPtr< TableReader< Type > > | New (const word &name, const dictionary &dict, List< Tuple2< scalar, Type >> &table) |
![]() | |
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 204 of file CsvTableReader.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and List< T >::size().
|
virtual |
Destructor.
Definition at line 233 of file CsvTableReader.C.
TypeName | ( | "csv" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a copy.
Implements TableReader< Type >.
Definition at line 113 of file CsvTableReader.H.
Write the CSV parameters.
Reimplemented from TableFileReader< Type >.
Definition at line 240 of file CsvTableReader.C.
References TableFileReader< Type >::write(), and Foam::writeEntry().