#include <SimResFile.h>
Public Methods | |
| SimResFile () | |
| SimResFile (const String &filename, const bool append=false) | |
| ~SimResFile () | |
| void | open (const String &filename, const bool append=false) |
| String | getDatasetName () const |
| bool | ok () const |
| void | checkState () const |
| void | setStorageMode (Format_type field_format, Format_type grid_format) |
| void | getStorageMode (Format_type &field_format, Format_type &grid_format) |
| int | getNoFields () |
| int | locateField (const String &fieldname, real &time, int &nsd, String &fieldtype, int &component, int &maxcomponent) |
| int | locateField (const int fieldnum, String &fieldname, real &time, int &nsd, String &fieldtype, int &component, int &maxcomponent) |
| int | write (Field &field, const String &fieldname, const real time, const String &description, const int component=1, const int maxcomponent=1) |
| bool | read (Handle(Field) &field, const String &fieldname, real &time, String &fieldtype, int &component, int &maxcomponent) |
| bool | read (Handle(Field) &field, const int fieldnum, String &fieldname, real &time, String &fieldtype, int &component, int &maxcomponent) |
| int | write (Fields &fields, const String &fieldname, const real time, const String &description) |
| bool | read (Handle(Fields) &fields, const String &fieldname, real &time, String &fieldtype) |
| bool | read (Handle(Fields) &fields, const int fieldnum, String &fieldname, real &time, String &fieldtype) |
Static Public Methods | |
| void | writeField (FieldFV &fv, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeFields (FieldsFV &fvs, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeField (FieldFE &fe, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeFields (FieldsFE &fes, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeField (FieldPiWisConst &fsd, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeFields (FieldsPiWisConst &fsds, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeField (FieldLattice &fd, SimResFile &file, const String &fieldname, const real time, const String &description) |
| void | writeFields (FieldsLattice &fds, SimResFile &file, const String &fieldname, const real time, const String &description) |
| bool | readField (FieldFV &fv, SimResFile &file, const String &fieldname, real &time, bool enable_time_mismatch_warning=false) |
| bool | readFields (FieldsFV &fvs, SimResFile &file, const String &fieldname, real &time, bool enable_time_mismatch_warning=false) |
| bool | readFields (FieldsFV &fes, SimResFile &file, const int fieldnum) |
| bool | readField (FieldFE &fe, SimResFile &file, const String &fieldname, real &time, bool enable_time_mismatch_warning=false) |
| bool | readFields (FieldsFE &fes, SimResFile &file, const String &fieldname, real &time, bool enable_time_mismatch_warning=false) |
| bool | readFields (FieldsFE &fes, SimResFile &file, const int fieldnum) |
| bool | readField (FieldPiWisConst &fsd, SimResFile &file, const String &fieldname, real &time, bool enable_time_mismatch_warning=false) |
| bool | readFields (FieldsPiWisConst &fsds, SimResFile &file, const String &fieldname, real &time, bool enable_time_mismatch_warning=false) |
| bool | readFields (FieldsPiWisConst &fsds, SimResFile &file, const int fieldnum) |
NAME: SimResFile - simplified interface to FieldWriter/Reader
DESCRIPTION:
The class serves as an interface to the more low level classes "FieldWriter" and "FieldReader" for storing and reading general fields. The interface consists mainly of a "read" and "write" function (in class "SimResFile"). Reading and writing through these functions requires a "SimResFile" object, tied to a dataset, and specification of the field name, the time, or alternatively, the field number. Each field that is stored in SimRes format is given a unique number, which serves as an identification of the field. The "read" and "write" work with base class field objects, "Field" or "Fields". If the field type is known (e.g. "FieldFE", "FieldLattice" etc), simpler interfaces to "read" and "write" are offered throught the static functions "readField(s)" and "writeField(s)".
|
|
The default constructor requires "open" to be called, whereas the constructor accepting a "String" argument opens the specified file implicitly.. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
|
|
|
returns the name of the current dataset. The dataset name is set by calling "open". |
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
locates field given by fieldname (and time), or by a specific field number. If more than one field match the given name, the one nearest in time will be returned. All non-const parameters will be returned with the actual values for the field found. The "fieldtype" parameter reflects the class name of the field ("FieldFE", "FieldLattice" etc) in the "Field" hierarchy. The "component" integer reflects the number of a component in a vector with "maxcomponent" components in total. For scalar fields, "component" and "maxcomponent" are always 1. |
|
|
|
|
|
connects the "SimResFile" object to a dataset. No files are opened, the filename is just set. Files are opened only when required and closed again as soon a field is stored. In this way, files are not destroyed if the computer stops during a simulation. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
store and load fields where the field type ("FieldFE", "FieldLattice", "FieldPiWisConst" etc) is unknown or free. If the field type is known, the static functions (listed outside the class) "writeField(s)" and "readField(s)" are easier to use because they have fewer arguments. The "component" integer reflects the number of a component in a vector with "maxcomponent" components in total. See the "locateField" function for documentation on how the fields is located by the "read" function. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
see "writeField". |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
see "writeField". |
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
these are simplified interfaces to "SimResFile read" and "SimResFile write". The simplified functions are typically used if the field type is known (e.g. "FieldFE" or "FieldLattice"). If the field type is unknown, one must use "SimResFile read" and "SimResFile::write". |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
see "writeField". |