Data source interface for VTF model files. More...
Public Member Functions | |
DataSourceVTF (int dataSourceId) | |
Constructs a data source with specified unique id. More... | |
bool | isOpen () const |
Returns true if file already open. More... | |
virtual bool | open (const Str &fileName, Error *error=NULL) |
Opens the VTF file given by filename. More... | |
virtual void | close () |
Closes the data source. More... | |
bool | fileProperties (PropertySetCollection *propSetCollection, ImageResources *resources) |
Gets the property set collection and image resources for this VTF file. More... | |
int | vendorId () const |
Returns the vendor id from the VTF file. More... | |
![]() | |
DataSourceInterface (int dataSourceId) | |
Constructs an empty data source with the given id. More... | |
virtual bool | loadState (int stateId, const DataStateSpec &stateSpec, Error *error) |
Loads the state at the given stateId. Only loads the state if not already present in the DataSource. More... | |
virtual void | discardState (int stateId) |
Deletes the state with the given id from the data source. More... | |
virtual bool | loadCustomResultBaseDependencies (int stateId, const DataStateSpec &stateSpec) |
Loads custom result bare dependencies. Returns true if success. More... | |
bool | createResultCalculator (const Str &calculatorId, const Str &resultIdString, const Str &initString, Str *errorMessage) |
Creates a new result with the given 'resultIdString' by using the result calculator 'calculatorId' configured with the given 'initString'. More... | |
bool | recreateResultCalculator (const Str &calculatorId, const Str &resultIdString, const Str &initString, Str *errorMessage) |
Recreates a result calculator with a modified initString. More... | |
bool | deleteResultCalculator (const Str &calculatorId, const Str &resultIdString) |
Deletes the result calculator with the given calculatorId and resultIdString. More... | |
bool | setResultCalculatorParams (const Str &calculatorId, const Str &resultIdString, const ResultCalculatorParams &calcParams) |
Sets the parameters for the given result calculator instance. More... | |
void | getResultCalculatorParams (const Str &calculatorId, const Str &resultIdString, ResultCalculatorParams *calcParams) const |
Gets the current parameters exposed by the given result calculator instance. More... | |
Str | primaryFilename () const |
Returns the primary filename for this data source. More... | |
Str | description () const |
Returns the description for this data source. More... | |
virtual bool | scalarRange (int stateId, int resultId, double *min, double *max) |
Gets the range of the given scalar result for the given state. More... | |
virtual bool | vectorRange (int stateId, int resultId, double *min, double *max) |
Gets the range of the given vector result for the given state. More... | |
virtual bool | displacementRange (int stateId, int resultId, double *min, double *max) |
Gets the range of the given displacement result for the given state. More... | |
![]() | |
int | id () const |
Returns the id of the data source. More... | |
size_t | stateCount () const |
Returns number of states for the data source. More... | |
size_t | stateIndex (int stateId) const |
Returns the index of the state with id stateId. More... | |
size_t | geometryCountPerState () const |
Returns the number of geometries (per state) in the Datasource. More... | |
const DataState * | state (size_t stateIndex) const |
Returns the state at the given state index. More... | |
DataState * | state (size_t stateIndex) |
Returns the state at the given state index. More... | |
const DataState * | currentState (const UnstructGridModel *model) const |
Returns the current state (the state in the current frame) in the given model. More... | |
DataState * | currentState (const UnstructGridModel *model) |
Returns the current state (the state in the current frame) in the given model. More... | |
const DataSourceDirectory * | directory () const |
Returns the data directory of the data source. More... | |
DataSourceDirectory * | directory () |
Returns the data directory of the data source. More... | |
const DataElementSet * | elementSet (size_t setIndex) const |
Returns a const ptr to the element set at the given index. More... | |
DataElementSet * | elementSet (size_t setIndex) |
Returns the element set at the given index. More... | |
size_t | elementSetCount () const |
Returns the number of DataElementSets in this data source. More... | |
size_t | elementSetIndex (int setId) const |
Returns the index of the element set with the given id. More... | |
void | addElementSet (DataElementSet *elementSet) |
Adds an element set to this data source. More... | |
void | removeElementSet (const DataElementSet *elementSet) |
Removes an element set from this data source. More... | |
void | removeAllElementSets () |
Removes all element sets from the data source. More... | |
bool | isDataSourceValid (Str *failReason) const |
Validates that the data source contents matches the metadata. More... | |
int | defaultDispacementResultId () const |
Returns the current state (the state in the current frame) in the given model. More... | |
bool | computeCustomResults (int stateId, const DataStateSpec &stateSpec) |
Computes custom results. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Static Public Member Functions | |
static bool | isVTFFile (const Str &filename) |
Returns true if the given file is a VTF file (with the correct header information) More... | |
static bool | snapshotImage (const Str &filename, Image *image) |
Gets the snapshot image from the VTF file. More... | |
static bool | isExpressFile (const Str &filename) |
Returns true if the file is a properly formatted VTF Express file (proprietary (closed) format) More... | |
static size_t | plotDataCount (const Str &filename) |
Returns the number of 2D plots defined in the VTF file. More... | |
static bool | read2dPlotData (const Str &filename, size_t plotDataIndex, std::vector< Str > *variableNames, std::vector< Str > *variableUnits, std::vector< std::vector< double > > *variableData) |
Returns the data in the given plot in the VTF file. More... | |
static Str | fileContentsInfo (const Str &filename) |
Returns information about the blocks in the VTF file. More... | |
![]() | |
static bool | supportsResultCalculatorPlugins () |
Gets if result calculator plugins are supported or not. More... | |
static bool | loadResultCalculatorPlugin (const Str &baseFileName) |
Loads the specified result calculator plugin. More... | |
Additional Inherited Members | |
![]() | |
void | updateDirectoryFromDatabase () |
Updates the directory with synthetic metadata from all states, parts and results in the geometries. More... | |
Data source interface for VTF model files.
The data source contains a collection of all states for one analysis. Each state groups together geometries and results for one time step, load case, frequency etc.
Each unstructured grid model owns one data source.
The DataSourceVTF is a subclass of DataSource. See DataSource on general functionality such as how to get states and metadata directory.
The VTF file format is Ceetron's own format tailored specifically to carry structural mechanics and fluid dynamics data in a very compact form. For a thorough description of the VTF file format, see the reference guide.
Use open() to open a VTF file.
cee::ug::DataSourceVTF::DataSourceVTF | ( | int | dataSourceId | ) |
Constructs a data source with specified unique id.
|
virtual |
Closes the data source.
Implements cee::ug::DataSourceInterface.
Returns information about the blocks in the VTF file.
bool cee::ug::DataSourceVTF::fileProperties | ( | PropertySetCollection * | propSetCollection, |
ImageResources * | resources | ||
) |
Gets the property set collection and image resources for this VTF file.
|
static |
Returns true if the file is a properly formatted VTF Express file (proprietary (closed) format)
bool cee::ug::DataSourceVTF::isOpen | ( | ) | const |
Returns true if file already open.
|
static |
Returns true if the given file is a VTF file (with the correct header information)
Opens the VTF file given by filename.
Returns true if file was read successfully.
Implements cee::ug::DataSourceInterface.
|
static |
Returns the number of 2D plots defined in the VTF file.
|
static |
Returns the data in the given plot in the VTF file.
Gets the snapshot image from the VTF file.
The method returns true if a snapshot was found.
int cee::ug::DataSourceVTF::vendorId | ( | ) | const |
Returns the vendor id from the VTF file.