#include <FieldWriter.h>
Public Methods | |
| FieldWriter () | |
| FieldWriter (const String &dataset_name, bool append=false) | |
| ~FieldWriter () | |
| void | setDatasetName (const String &dataset_name, bool append=false) |
| void | setStorageMode (Format_type field_format, Format_type grid_format) |
| int | writeField (Field &field, const String &header, real time, const String &description, int component=1, int maxcomponent=1) |
| int | writeField (Field &field, const String &header, real time=DUMMY, int component=1, int maxcomponent=1) |
| int | writeField (Field &field, real time=DUMMY, int component=1, int maxcomponent=1) |
NAME: FieldWriter - storage of fields on files
DESCRIPTION:
This class is a low-level tool mainly used from classes "SimResFile" or "SaveSimRes".
The storage format is binary or ASCII. In binary mode we try to use the hardware-independent xdr format if possible (on some systems, problems might arise with xdr and then the "FieldReader" and "FieldWriter" classes can be compiled using a straight (binary) C file).
|
|
The default constructor requires "setDatasetName" to be called, whereas the constructor accepting a "String" argument sets the data set name on its own. The secong argument decides whehter a new SimRes file is started (by overwriting the named file), or whether the data is appended to an existing file. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
sets the name of the dataset. When a dataset is already open, it will be closed and the FieldWriter object will connect to the new dataset instead. If the new dataset is already existing, the append flag determines whether is will be overwritten or appended to. |
|
|
sets the storage mode for the grids and fields. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
stores a specified field to the dataset. A header and a time stamp must be specified. An optional description can also be given. The component number and the total number of components (maxcomponent) must be specified when storing components of a vector field, otherwise the default values can be used. |