DVS Reader
Last update: 17.04.2023DVS Reader API to read cache data.
DVS Reader API to read cache data.
DVS Reader
Table of Contents
DVS Reader API Overview
The DVS Reader API is an external API to allow applications to read data from a DVS Cache
The API is built around using chained queries and filtering (DVS Filtering Overview) to select what data you are interested in and then iterate over that data. You start with a high level DVS::IQuery, add filters based on what you are interesting in looking at and then make calls to iterate over the data. The filtering mechanism is used to let you iterate over the data in different axis. Eg. A single part over all of time or all parts over a specific timestep. The filtering also allows for letting you set your parallelism model. I.E. if the data was written with 3 DVS servers you can easily tell it if you want to process all data at once (eg. 1 post processing processes) or possibly round robin them (eg. 2 post processing processes). This should be clearer in the examples DVS Reader Examples.
DVS Reader Data Model
A conceptual view of the DVS Reader data model is below.
For a high level view of the overall DVS Data model see DVS Data Model. A high level summary is that you start with a DVS::IQuery object, point it towards a DVS URI, interrogate the data model, set filters, and then begin iterating over DVS::IPlotChunk, DVS::IMeshChunk, and DVS::IElementBlock objects. The DVS::IPlotChunk and DVS::IMeshChunk objects each refer to a unique tuple of {Time,Object,Rank,Chunk} where Object is based on the Part or Plot they refer to.
DVS::IPlotChunk objects shouldn't need to be split into rank/chunks. Currently EnSight expects to only see one DVS::IPlotChunk per time over all ranks/chunks.
DVS::IMeshChunk is a subportion of the mesh and contains methods to get coordinates of the mesh for this chunk and nodal variable data. The elemental connectivity data for the current DVS::IMeshChunk is stored on an DVS::IElementBlock for each element type.
DVS::IElementBlock contains the connectivity for unstructured meshes (Structured mesh connectivity is implied) and elemental variable data.
All coordinates, connectivity, and variables also contain a hash which can be used for comparison so see if the internal data is different.
Getting started with the DVS Reader API
The latest stable code and binaries and can be found in Artifactory. They can also be found in the EnSight install under: CEI/ensightXXX/src/readers/dvs if pulling from artifactory make sure to grab the version which matches your EnSight install if using them together.
The binaries to statically link against can be found under either linux_2.6_64 for Linux and win64 for Windows. For the DVS Reader API you will need the libdvsreader.lib/dll or libdvsreader.so depending on the platform.
All the headers needed for the DVS Reader API are under the include directory. The top level header being the dvs_query_interface.h which includes the DVS::IQuery interface.
For examples of using the API refer to DVS Reader Examples.
DVS Reader Examples
Hello World Example
Simple application to open a cache and iterate over all of the high level information it contains (datasets, timesteps, objects etc.)
Using Filters Example
This is a simple example of filtering down to a specific dataset and part and then iterating over the mesh chunks. Note that since we didn't filter based on time we will find mesh chunks across all of time and will want to look at the time of each mesh chunk returned.
Setting up for parallel reads of cache
This is an example of querying a cache for how many servers it was written with and round robining the cache across parallel readers.
Server 1 of 2
Server 2 of 2