cee::ug::DataSourceVTFx

class DataSourceVTFx : public DataSourceInterface

Data source interface for VTFx 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 DataSourceVTFx is a subclass of DataSource. See DataSource on general functionality such as how to get states and metadata directory.

The VTF and VTFx file formats are Ceetron’s own formats tailored specifically to carry structural mechanics and fluid dynamics data in a very compact form.

By utilizing XML and zip compression, the VTFx format expands the functionality and usefulness of the well established VTF format by adding features for security, adaptability and the ability to carry multiple cases in one file - without compromising on the file size. VTFx files can be viewed in several products from Ceetron. For instance the free viewers, Ceetron 3D Viewer and Ceetron 3D Plugin for Microsoft Office. For a thorough description of the VTFx file format, see

the reference guide.

Use open() to open a VTFx file.

The VTFx file format supports multiple cases within the same file. Id the file has many cases, specify the case index when opening.

See also

VTFxFileBrowser

Public Functions

DataSourceVTFx(int dataSourceId)

Creates a data source with specified unique id.

bool isOpen() const

Returns true if file already open.

bool openCase(const Str &fileName, size_t caseIndex, Error *error = NULL)

Opens the VTFx file model given by fileName and a case index.

The VTFx file format supports multiple cases within the same file. If the file has many cases, specify the case index when opening. A caseIndex of 0 is always legal.

Returns true if file was read successfully.

bool openCase(const VTFxMemoryFile *vtfxMemFile, size_t caseIndex, Error *error = NULL)

Opens the VTFx file model given by fileName and a case index.

The VTFx file format supports multiple cases within the same file. If the file has many cases, specify the case index when opening. A caseIndex of 0 is always legal.

Returns true if file was read successfully.

bool openCaseById(const Str &fileName, int caseId, Error *error = NULL)

Opens the VTFx file model given by fileName and case id.

Returns true if file was read successfully.

bool caseProperties(PropertySetCollection *propSetCollection, ImageResources *resources)

Gets the properties.

bool isDisplayModelOnly()

Returns true if this model contains display model only and not the full model.

int caseId() const

Returns the id of the current VTFx case.

Str caseName() const

Returns the name of the current VTFx case.

Str caseDescription() const

Returns the html description of the current VTFx case.

void setReadShellsOnly(bool readSurfaceElementOnly)

Configurse the data source to only read shell elements.

Under this configuration sets are not supported

void setPassword(const Str &password)

Sets the password for this data source.

size_t plotDataCount() const

Returns the number of plot data objects found for this database.

Str plotDataName(size_t plotIndex)

Returns the name of the plot data.

size_t plotDataVariableCount(size_t plotIndex)

Returns the number of available plot data variables for this plot data index.

Str plotDataVariableName(size_t plotIndex, size_t plotVariableIndex)

Returns the name of the plot data variable.

std::vector<double> plotDataVariableValues(size_t plotIndex, size_t plotVariableIndex)

Returns the values of the specified plot data variable.

virtual bool open(const Str &filename, Error *error = NULL)

Opens the first case in the VTFx file model given by fileName.

Equivalent to openCase(filename, 0, error)

virtual void close()

Closes data source.

Public Static Functions

static bool isVTFxFile(const Str &filename)

Returns true if the given file is a VTFx file.