#include <FieldReader.h>
Public Methods | |
| FieldReader () | |
| FieldReader (const String &dataset_name) | |
| ~FieldReader () | |
| void | setDatasetName (const String &dataset_name) |
| int | getNoFields () |
| int | getNoGrids () |
| void | getFieldInfo (int fieldnum, String *header, real *time=NULL, int *dimensions=NULL, String *description=NULL, int *component=NULL, int *maxcomponent=NULL, String *fieldtype=NULL, String *gridtype=NULL) |
| void | getFieldInfo (const String header, int *fieldnum, real *time=NULL, int *dimensions=NULL, String *description=NULL, int *component=NULL, int *maxcomponent=NULL, String *fieldtype=NULL, String *gridtype=NULL) |
| void | getGridInfo (int gridnum, int *checknum=NULL, int *dimensions=NULL, String *gridtype=NULL) |
| void | readField (Handle(Field) &field, int fieldnum=1, String *header=NULL, real *time=NULL, String *description=NULL, int *component=NULL, int *maxcomponent=NULL) |
NAME: FieldReader - reading of fields from SimRes 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. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
returns information about the field with the specified field number. The information includes the name of the field, the registered time, the number of dimensions, the number of field components (if the field is part of a vector field), the component number and the field type and grid type. An overloaded version of the function accepts a header and a time instead of a field number. It will try to locate a matching field, and will set the field number to the field number of the field found. Note that an exact match of the time is not necessary; the closest match will be used. If no match is found, the field number will be set to zero. |
|
|
returns information about a grid specified by its grid number. The information includes the number of dimensions and the grid type. |
|
|
returns the number of fields in the dataset. This is the number of scalar fields, counting each component of vector fields. |
|
|
returns the number of grids in the dataset. This number will be less than or equal to the number of fields in the dataset, Because more than one field can use the same grid. |
|
|
reads a field with the specified field number. All information for the field is returned. A handle to a field which is to receive the information is given as a parameter. If the existing field is based on the same grid as the field to be read, the existing grid will be used. Otherwise, the grid will be read from the dataset and will replace the existing. |
|
|
sets the name of the dataset. When a dataset is already open, it will be closed and the "FieldReader" object will connect to the new dataset instead. |