Reads an interpolation table from a file in CSV-format. Entries govern the layout of the CSV file. The indices of the columns of the table that are to be used are given by the columns entry. This is a tuple for which the first part is the index of the column used for the x-axis, and the second part is the column index used for the scalar values, or a list of column indices used for the components of vector, tensor, etc..., values. More...
Public Member Functions | |
TypeName ("csv") | |
Runtime type information. More... | |
Csv (const word &name, const Function1s::unitConversions &units, const dictionary &dict) | |
Construct from name and dictionary. More... | |
virtual autoPtr< TableReader< Type > > | clone () const |
Construct and return a copy. More... | |
virtual | ~Csv () |
Destructor. More... | |
virtual void | write (Ostream &os, const Function1s::unitConversions &units, const List< Tuple2< scalar, Type >> &table) const |
Write settings and values. More... | |
Public Member Functions inherited from TableFileReader< Type > | |
TableFileReader (const Function1s::unitConversions &defaultUnits, const dictionary &dict) | |
Construct from dictionary. More... | |
TableFileReader (const TableFileReader< Type > &) | |
Copy construct. More... | |
virtual | ~TableFileReader () |
Destructor. More... | |
virtual List< Tuple2< scalar, Type > > | read (const Function1s::unitConversions &units, const dictionary &dict) const |
Read values. More... | |
Public Member Functions inherited from TableReader< Type > | |
TypeName ("TableReader") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, TableReader, dictionary,(const word &name, const Function1s::unitConversions &units, const dictionary &dict),(name, units, dict)) | |
TableReader () | |
Default construct. 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 Function1s::unitConversions &units, const dictionary &dict) |
Protected Member Functions inherited from TableFileReader< Type > | |
void | read (const Function1s::unitConversions &defaultUnits, const dictionary &dict, List< Tuple2< scalar, Type >> &) const |
Read a 1D table. More... | |
Protected Member Functions inherited from TableReader< Type > | |
void | convertRead (const Function1s::unitConversions &units, List< Tuple2< scalar, Type >> &table) const |
Do unit conversions on input data. More... | |
List< Tuple2< scalar, Type > > | convertRead (const Function1s::unitConversions &units, const List< Tuple2< scalar, Type >> &table) const |
Do unit conversions on input data. More... | |
List< Tuple2< scalar, Type > > | convertWrite (const Function1s::unitConversions &units, const List< Tuple2< scalar, Type >> &table) const |
Do unit conversions in order to output data. More... | |
Reads an interpolation table from a file in CSV-format. Entries govern the layout of the CSV file. The indices of the columns of the table that are to be used are given by the columns entry. This is a tuple for which the first part is the index of the column used for the x-axis, and the second part is the column index used for the scalar values, or a list of column indices used for the components of vector, tensor, etc..., values.
nHeaderLine 4; // number of header lines columns (0 (1 2 3)); // column indices for vector values separator ","; // optional (defaults to ",") mergeSeparators no; // merge multiple separators
Definition at line 110 of file CsvTableReader.H.
Csv | ( | const word & | name, |
const Function1s::unitConversions & | units, | ||
const dictionary & | dict | ||
) |
Construct from name and dictionary.
Definition at line 204 of file CsvTableReader.C.
|
virtual |
Destructor.
Definition at line 237 of file CsvTableReader.C.
TypeName | ( | "csv" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a copy.
Implements TableReader< Type >.
Definition at line 161 of file CsvTableReader.H.
|
virtual |
Write settings and values.
Reimplemented from TableFileReader< Type >.
Definition at line 244 of file CsvTableReader.C.
References Foam::units(), TableFileReader< Type >::write(), and Foam::writeEntry().