Reads an interpolation table from a file - CSV-format. More...
Public Member Functions | |
TypeName ("csv") | |
Runtime type information. More... | |
csvTableReader (const dictionary &dict) | |
Construct from dictionary. More... | |
virtual autoPtr< tableReader< Type > > | clone () const |
Construct and return a copy. More... | |
virtual | ~csvTableReader () |
Destructor. More... | |
virtual void | operator() (const fileName &, List< Tuple2< scalar, Type > > &) |
Read the table. More... | |
virtual void | operator() (const fileName &, List< Tuple2< scalar, List< Tuple2< scalar, Type > > > > &) |
Read 2D table. More... | |
virtual void | write (Ostream &os) const |
Write the remaining parameters. More... | |
![]() | |
TypeName ("tableReader") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, tableReader, dictionary,(const dictionary &dict),(dict)) | |
tableReader (const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~tableReader () |
Destructor. More... | |
Private Member Functions | |
Type | readValue (const List< string > &) |
Read the next value from the splitted string. More... | |
scalar | readValue (const List< string > &splitted) |
Private Attributes | |
const bool | headerLine_ |
Does the file have a header line? More... | |
const label | timeColumn_ |
Column of the time. More... | |
const labelList | componentColumns_ |
Labels of the components. More... | |
const char | separator_ |
Separator character. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< tableReader > | New (const dictionary &spec) |
Return a reference to the selected tableReader. More... | |
Reads an interpolation table from a file - CSV-format.
Definition at line 50 of file csvTableReader.H.
csvTableReader | ( | const dictionary & | dict | ) |
Construct from dictionary.
Definition at line 33 of file csvTableReader.C.
References csvTableReader< Type >::componentColumns_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and List::size().
|
virtual |
Destructor.
Definition at line 54 of file csvTableReader.C.
Read the next value from the splitted string.
Definition at line 79 of file csvTableReader.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::readScalar(), and List::size().
TypeName | ( | "csv" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a copy.
Implements tableReader< Type >.
Definition at line 84 of file csvTableReader.H.
Read the table.
Implements tableReader< Type >.
Definition at line 106 of file csvTableReader.C.
References DynamicList::append(), ISstream::getLine(), IOstream::good(), Foam::pos(), Foam::readScalar(), and dictionary::transfer().
|
virtual |
Read 2D table.
Implements tableReader< Type >.
Definition at line 163 of file csvTableReader.C.
References NotImplemented.
|
virtual |
Write the remaining parameters.
Reimplemented from tableReader< Type >.
Definition at line 173 of file csvTableReader.C.
References IOstream::ASCII, IOstream::BINARY, token::END_STATEMENT, IOstream::format(), Foam::nl, tableReader< Type >::write(), and Ostream::writeKeyword().
Definition at line 64 of file csvTableReader.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::readScalar(), and List::size().
|
private |
Does the file have a header line?
Definition at line 57 of file csvTableReader.H.
|
private |
Column of the time.
Definition at line 60 of file csvTableReader.H.
|
private |
Labels of the components.
Definition at line 63 of file csvTableReader.H.
Referenced by csvTableReader< Type >::csvTableReader().
|
private |
Separator character.
Definition at line 69 of file csvTableReader.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.