    

 ## On this page

  

 

 # DVS::IQuery Class Reference

 Last update: 16.07.2025 

The query interface for the DVS Reader API. [More...](#details)

`#include <<a class="el" href="dvs__query__interface_8h_source.html">dvs_query_interface.h</a>>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

<a id="a1d09babef55223dfb491ee9294c6e4c8" name="a1d09babef55223dfb491ee9294c6e4c8"></a> **IQuery** ()=default default   
 <a id="a5427e50031b1599477846464cb025283" name="a5427e50031b1599477846464cb025283"></a>virtual **~IQuery** ()=default default   
 <a id="a3ed55ea32809b9f41a7d8b870e7e6f2e" name="a3ed55ea32809b9f41a7d8b870e7e6f2e"></a> **IQuery** ([IQuery](class_d_v_s_1_1_i_query.html) &amp;&amp;)=default default   
 <a id="a54ec70d8a25eca733cc353625b446a19" name="a54ec70d8a25eca733cc353625b446a19"></a>[IQuery](class_d_v_s_1_1_i_query.html) &amp; **operator=** ([IQuery](class_d_v_s_1_1_i_query.html) &amp;&amp;)=default default   
 <a id="af5d66aa7947f611ff10ed32cfcccfe43" name="af5d66aa7947f611ff10ed32cfcccfe43"></a> **IQuery** (const [IQuery](class_d_v_s_1_1_i_query.html) &amp;)=default support copying   
 <a id="a214fdde5a18f2eb2853bf56eb7354280" name="a214fdde5a18f2eb2853bf56eb7354280"></a>[IQuery](class_d_v_s_1_1_i_query.html) &amp; **operator=** (const [IQuery](class_d_v_s_1_1_i_query.html) &amp;)=default default   
 virtual void [release](#a257f79d7de21658c07dc602dfa6bbf34) ()=0 Release the memory of the query.   
 virtual void [set\_logger](#ab6ce54c68281ea1676af650ebc5716a0) ([DVS::ILogger](class_d_v_s_1_1_i_logger.html) \*logger)=0 Set the logger object.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [add\_uri](#ae1b22e6a7c4f0c76ade9105f30d1bc2d) (const char \*uri)=0 Add a URI for the reader API to iterate over.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_servers](#a05dc766c5d6789ca3dcbab72cf4ca4e9) (const char \*uri, uint32\_t &amp;num\_servers)=0 Get the num servers object.   
 virtual void [set\_server\_mod](#acfefd0ed3856da6599599f15109ece9a) (uint32\_t server\_num, uint32\_t server\_mod)=0 Set a filter based on the server number and a modulus.   
 virtual [DVS::IQuery](class_d_v_s_1_1_i_query.html) \* [filter](#a8a810da09342690eb371b324079f206e) (const char \*filter)=0 The filter method will allocate a new chained query with the passed in filter appended to it.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_ranks](#ab09b8c2d9204f66e88b1ac56b3e0e40d) (uint32\_t &amp;num\_ranks)=0 Get the number of ranks for this filtered query.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_ranks](#a469f214b6c9976e81d93510410c00b70) (uint32\_t \*ranks)=0 Get the unique ranks for this filtered query.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_chunks\_per\_rank](#aaae39d1931433b35162c3b37dc82c4f1) (uint32\_t &amp;num\_chunks)=0 Get the number of chunks for each rank.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_chunks\_per\_rank](#a4d1a83603bec00bdebc8430a5c48e742) (uint32\_t \*chunks)=0 Get an array of the number of chunks for every rank for this query.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_datasets](#a48165c3147ae5d084577b9b8acb05638) (uint32\_t &amp;num\_datasets)=0 Get the number of datasets objects.   
 virtual [DVS::IDataset](class_d_v_s_1_1_i_dataset.html) \* [get\_dataset](#a574de84a9a4d7a5e3e777a35b1b6c2bc) (uint32\_t index)=0 Get the dataset object.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_parts](#a2dab5f63a6c619a1ee6d3138679c9eac) (uint32\_t &amp;num\_parts)=0 Get the number of parts for this query.   
 virtual const [DVS::IObject](class_d_v_s_1_1_i_object.html) \* [get\_part](#a53ec579c40465ee2aebf87ac60dc90fb) (uint32\_t index)=0 Get the part based on the index.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_plots](#ab2f64cb2c3a336c0d86fb0b3799c13e5) (uint32\_t &amp;num\_plots)=0 Get the number of plots for this query.   
 virtual const [DVS::IObject](class_d_v_s_1_1_i_object.html) \* [get\_plot](#a590a1eff5cb7906028f736810e079ed6) (uint32\_t index)=0 Get the plot object based on the index.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_variable\_data](#a8ec063e869d5ef051a276b0b0fab0f42) (const [DVS::IObject](class_d_v_s_1_1_i_object.html) \*object, const [DVS::IVar](class_d_v_s_1_1_i_var.html) \*var, float time, float \*values)=0 Get variable values for dataset and part objects.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_variables](#a336a2553eb96266550f737539e85b2a8) (uint32\_t &amp;num\_vars)=0 Get the number of variables for this query.   
 virtual const [DVS::IVar](class_d_v_s_1_1_i_var.html) \* [get\_variable](#ac1ca725d3c7e7354ab38b4b3e971e2b3) (uint32\_t index)=0 Get the variable object based on the index.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_timesteps](#a43880c6392208deb0a4685fb05cd55e0) (uint32\_t &amp;num\_timesteps)=0 Get the number of timesteps.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_timesteps](#ad1d56e910ffc40d8f432152a1028d53b) (float \*timesteps)=0 Get the timesteps object.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_mesh\_chunks](#a0e4ef2e5ffb8a6e3cfe1d1841ef4007b) (uint32\_t &amp;num\_mesh\_chunks)=0 Get the number of mesh chunks for this query.   
 virtual [DVS::IMeshChunk](class_d_v_s_1_1_i_mesh_chunk.html) \* [get\_mesh\_chunk](#a00a3a6962690c69ea8cef8815a72c011) (uint32\_t index)=0 Get the mesh chunk based on the index.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_num\_plot\_chunks](#a955bed02a8706e13c972f45c9263f84e) (uint32\_t &amp;num\_plot\_chunks)=0 Get the number of plot chunks for this query.   
 virtual [DVS::IPlotChunk](class_d_v_s_1_1_i_plot_chunk.html) \* [get\_plot\_chunk](#a074055c68ba05d544d653095683405c7) (uint32\_t index)=0 Get the plot chunk based on the index.   
 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_hash\_available](#a818f3065fbaa299112d3efa4257bbfec) (const char \*hash, bool &amp;available)=0 Get if the hash is available in the blobstore.   
 <a id="a2d3edc4b63b016009ef81553ab4e8b06" name="a2d3edc4b63b016009ef81553ab4e8b06"></a>virtual void **clear\_data** ()=0 Clear the current query.   
 <a id="details" name="details"></a>## Detailed Description

The query interface for the DVS Reader API.

An instance of this object can be initially created by calling [DVS::CREATE\_QUERY\_INSTANCE()](dvs__query__interface_8h.html#ac614cf475eca0727cdb5b42faabcca7d "Create a query interface object."). A URI must then be added via [DVS::IQuery::add\_uri()](#ae1b22e6a7c4f0c76ade9105f30d1bc2d "Add a URI for the reader API to iterate over."). Then you can either start querying the dataset or you can add filters by chaining queries via [DVS::IQuery::filter()](#a8a810da09342690eb371b324079f206e "The filter method will allocate a new chained query with the passed in filter appended to it."). When finished to clean up memory call [DVS::IQuery::release()](#a257f79d7de21658c07dc602dfa6bbf34 "Release the memory of the query.").

**IMPORTANT**: Calling [DVS::IQuery::release()](#a257f79d7de21658c07dc602dfa6bbf34 "Release the memory of the query.") destroys all chained queries as well and any object references retrieved from the query from calls such as [DVS::IQuery::get\_part()](#a53ec579c40465ee2aebf87ac60dc90fb "Get the part based on the index.")

The overall intended usage would be something like:

[DVS::IQuery](class_d_v_s_1_1_i_query.html)* my_query = [DVS::CREATE\_QUERY\_INSTANCE](dvs__query__interface_8h.html#ac614cf475eca0727cdb5b42faabcca7d)(); //Create an instance of a query

my_query-&gt;[add\_uri](#ae1b22e6a7c4f0c76ade9105f30d1bc2d)("hdf5://localhost/D:/my/cache/location"); //Add a cache URI for the query to open

[DVS::IQuery](class_d_v_s_1_1_i_query.html)* dataset_query = my_query-&gt;[filter](#a8a810da09342690eb371b324079f206e)("/dataset.id/eq/my+dataset+name"); // Create chained query filtering on a specific dataset name

[DVS::IQuery](class_d_v_s_1_1_i_query.html)* part_query = dataset_query-&gt;[filter](#a8a810da09342690eb371b324079f206e)("/part.id/eq/my+part+name"); // Create chained query filtering on a specific part name

//Loop over all th mesh chunks for part: my part name in dataset: my dataset name

for (uint32_t i = 0; i &lt; part_query-&gt;[get\_num\_mesh\_chunks](#a0e4ef2e5ffb8a6e3cfe1d1841ef4007b)(); i++ )

{

 [DVS::IMeshChunk](class_d_v_s_1_1_i_mesh_chunk.html)* mesh_chunk = part_query-&gt;[get\_mesh\_chunk](#a00a3a6962690c69ea8cef8815a72c011)(i);

 //Do important things

}

my_query-&gt;[release](#a257f79d7de21658c07dc602dfa6bbf34)(); // Release top level query and all child queries and their objects

[DVS::IMeshChunk](class_d_v_s_1_1_i_mesh_chunk.html)

Mesh Chunk Interface for DVS Reader API.

**Definition** [dvs\_mesh\_chunk\_interface.h:49](dvs__mesh__chunk__interface_8h_source.html#l00048)



[DVS::IQuery](class_d_v_s_1_1_i_query.html)

The query interface for the DVS Reader API.

**Definition** [dvs\_query\_interface.h:79](dvs__query__interface_8h_source.html#l00078)



[DVS::IQuery::get\_mesh\_chunk](#a00a3a6962690c69ea8cef8815a72c011)

virtual DVS::IMeshChunk * get_mesh_chunk(uint32_t index)=0

Get the mesh chunk based on the index.



[DVS::IQuery::get\_num\_mesh\_chunks](#a0e4ef2e5ffb8a6e3cfe1d1841ef4007b)

virtual dvs_ret get_num_mesh_chunks(uint32_t &amp;num_mesh_chunks)=0

Get the number of mesh chunks for this query.



[DVS::IQuery::release](#a257f79d7de21658c07dc602dfa6bbf34)

virtual void release()=0

Release the memory of the query.



[DVS::IQuery::filter](#a8a810da09342690eb371b324079f206e)

virtual DVS::IQuery * filter(const char *filter)=0

The filter method will allocate a new chained query with the passed in filter appended to it.



[DVS::IQuery::add\_uri](#ae1b22e6a7c4f0c76ade9105f30d1bc2d)

virtual dvs_ret add_uri(const char *uri)=0

Add a URI for the reader API to iterate over.



[DVS::CREATE\_QUERY\_INSTANCE](dvs__query__interface_8h.html#ac614cf475eca0727cdb5b42faabcca7d)

DVS_DLL_EXPORT IQuery * CREATE_QUERY_INSTANCE()

Create a query interface object.





 See [Cache URIs](group__group__dvs__uri.html#dvs_cache_uri) and [Query Stanzas](group__group__dvs__filtering.html#dvs_query_stanzas) for more information on cache URIs and queries.

Definition at line [78](dvs__query__interface_8h_source.html#l00078) of file [dvs\_query\_interface.h](dvs__query__interface_8h_source.html).



## Member Function Documentation

<a id="ae1b22e6a7c4f0c76ade9105f30d1bc2d" name="ae1b22e6a7c4f0c76ade9105f30d1bc2d"></a>## [◆ ](#ae1b22e6a7c4f0c76ade9105f30d1bc2d)add\_uri()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::add\_uri  ( const char \* *uri*)   pure virtual 

Add a URI for the reader API to iterate over.

This method will only "set" the current URI. In the future we will support multiple URIs queried at once.

**IMPORTANT**: Calling this will invalidate any objects returned from the query and any chained queries.

Errors:

- DVS\_NONE: Success
- DVS\_PARAM\_NULL: uri passed in was nullptr
- DVS\_QUERY\_HAS\_CHILDREN: Cannot add a uri to a query which already has children
- DVS\_QUERY\_INVALID\_URI: URI passed in did not parse, invalid uri
- DVS\_QUERY\_INVALID\_FILTER: Filter in URI did not parse, invalid filter

Parameters \[in\]uriURI of a cache. See [Cache URIs](group__group__dvs__uri.html#dvs_cache_uri) Returnsdvs\_ret DVS\_NONE on success, otherwise see method description 



<a id="a8a810da09342690eb371b324079f206e" name="a8a810da09342690eb371b324079f206e"></a>## [◆ ](#a8a810da09342690eb371b324079f206e)filter()

 virtual [DVS::IQuery](class_d_v_s_1_1_i_query.html) \* DVS::IQuery::filter  ( const char \* *filter*)   pure virtual 

The filter method will allocate a new chained query with the passed in filter appended to it.

The filter method allocates a new chained query with the passed in filter appended to it. The current query is not modified. This query however is a chained child of the current query meaning that any changes to the parent will invalidate the objects of the child. [IQuery::release()](#a257f79d7de21658c07dc602dfa6bbf34 "Release the memory of the query.") will release any child chained queries created from the it.

This lets a user create a top level query, say for a specific dataset name. Then have multiple chained queries that filter for specific parts etc which can be iterated over in parallel.

**IMPORTANT**: Chained queries will have all of their objects destroyed when a parent query changes.

Parameters \[in\]filterthe filter to append to the new chained child query. See [Query Stanzas](group__group__dvs__filtering.html#dvs_query_stanzas). Returns[DVS::IQuery](class_d_v_s_1_1_i_query.html "The query interface for the DVS Reader API.")\* a pointer to a newly allocated chained child query 



<a id="a4d1a83603bec00bdebc8430a5c48e742" name="a4d1a83603bec00bdebc8430a5c48e742"></a>## [◆ ](#a4d1a83603bec00bdebc8430a5c48e742)get\_chunks\_per\_rank()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_chunks\_per\_rank  ( uint32\_t \* *chunks*)   pure virtual 

Get an array of the number of chunks for every rank for this query.

This method will return an array of max number of chunks for every rank. The size of the buffer needed can be retrieved from [IQuery::get\_num\_chunks\_per\_rank()](#aaae39d1931433b35162c3b37dc82c4f1 "Get the number of chunks for each rank."). These values correspond to the ranks returned from [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70 "Get the unique ranks for this filtered query."). Since there might be multiple datasets in the query this will return the max for each rank across the datasets and parts.

This call will return all of the chunk information for every rank returned from [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70 "Get the unique ranks for this filtered query.").

Errors:

- DVS\_NONE: Success
- DVS\_PARAM\_NULL: chunks passed in is nullptr
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]chunksbuffer to save chunk information in, an array of the chunks for each rank Returnsdvs\_ret DVS\_NONE if success, otherwise see method description 



<a id="a574de84a9a4d7a5e3e777a35b1b6c2bc" name="a574de84a9a4d7a5e3e777a35b1b6c2bc"></a>## [◆ ](#a574de84a9a4d7a5e3e777a35b1b6c2bc)get\_dataset()

 virtual [DVS::IDataset](class_d_v_s_1_1_i_dataset.html) \* DVS::IQuery::get\_dataset  ( uint32\_t *index*)   pure virtual 

Get the dataset object.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

Parameters \[in\]indexindex of the dataset to retrieve Returns[DVS::IDataset](class_d_v_s_1_1_i_dataset.html "Interface for datasets for the DVS Reader API.")\* dataset for the index, or nullptr if not found 



<a id="a818f3065fbaa299112d3efa4257bbfec" name="a818f3065fbaa299112d3efa4257bbfec"></a>## [◆ ](#a818f3065fbaa299112d3efa4257bbfec)get\_hash\_available()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_hash\_available  ( const char \* *hash*,    bool &amp; *available* )  pure virtual 

Get if the hash is available in the blobstore.

Checks the blobstore to see if the hash is available or not. This is mainly used for validation purposes.

Errors:

- DVS\_NONE: Success
- DVS\_PARAM\_NULL: hash passed in nullptr
- DVS\_INVALID\_CACHE: Invalid cache, bad data
- DVS\_INVALID\_HASH: Hash passed in invalid

Parameters \[in\]hashhash to check availability of, retrieved via [DVS::IHash::get\_hash()](class_d_v_s_1_1_i_hash.html#a51eaee86a6e2db4dda7f4326daa33874 "Get the hash of the data.") or [DVS::IVarHash::get\_var\_hash()](class_d_v_s_1_1_i_var_hash.html#a17fff1548eb276edd326a0af08f6a7c4 "Get the hash of the variable data.") \[out\]availableif success, returns true if found in blobstore, else false Returnsdvs\_ret DVS\_NONE on success, else see method description 



<a id="a00a3a6962690c69ea8cef8815a72c011" name="a00a3a6962690c69ea8cef8815a72c011"></a>## [◆ ](#a00a3a6962690c69ea8cef8815a72c011)get\_mesh\_chunk()

 virtual [DVS::IMeshChunk](class_d_v_s_1_1_i_mesh_chunk.html) \* DVS::IQuery::get\_mesh\_chunk  ( uint32\_t *index*)   pure virtual 

Get the mesh chunk based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

Parameters \[in\]indexthe index of the mesh chunk to retrieve Returns[DVS::IMeshChunk](class_d_v_s_1_1_i_mesh_chunk.html "Mesh Chunk Interface for DVS Reader API.")\* the mesh chunk for the index, or nullptr if not found 



<a id="aaae39d1931433b35162c3b37dc82c4f1" name="aaae39d1931433b35162c3b37dc82c4f1"></a>## [◆ ](#aaae39d1931433b35162c3b37dc82c4f1)get\_num\_chunks\_per\_rank()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_chunks\_per\_rank  ( uint32\_t &amp; *num\_chunks*)   pure virtual 

Get the number of chunks for each rank.

This method returns the size of the buffer needed to pass in for get\_chunks\_per\_rank. This will be of the same size as [IQuery::get\_num\_ranks()](#ab09b8c2d9204f66e88b1ac56b3e0e40d "Get the number of ranks for this filtered query.").

This call will return all of the chunk information for every rank returned from [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70 "Get the unique ranks for this filtered query.").

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]num\_chunksif success returns the size of the buffer to allocate for [IQuery::get\_chunks\_per\_rank()](#a4d1a83603bec00bdebc8430a5c48e742 "Get an array of the number of chunks for every rank for this query.") Returnsdvs\_ret DVS\_NONE on success, otherwise see method description 



<a id="a48165c3147ae5d084577b9b8acb05638" name="a48165c3147ae5d084577b9b8acb05638"></a>## [◆ ](#a48165c3147ae5d084577b9b8acb05638)get\_num\_datasets()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_datasets  ( uint32\_t &amp; *num\_datasets*)   pure virtual 

Get the number of datasets objects.

**IMPORTANT**: The number of datasets will be invalid if this query or any parent queries' filters are modified.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]num\_datasetsif success, returns the number of datasets for this query ReturnsDVS\_NONE on success, else see method description 



<a id="a0e4ef2e5ffb8a6e3cfe1d1841ef4007b" name="a0e4ef2e5ffb8a6e3cfe1d1841ef4007b"></a>## [◆ ](#a0e4ef2e5ffb8a6e3cfe1d1841ef4007b)get\_num\_mesh\_chunks()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_mesh\_chunks  ( uint32\_t &amp; *num\_mesh\_chunks*)   pure virtual 

Get the number of mesh chunks for this query.

NOT YET IMPLEMENTED

**IMPORTANT**: The number of mesh chunks will be invalid if this query or any parent queries' filters are modified.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
- DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
- DVS\_METADATA\_ERROR: Error loading metadata

Parameters \[out\]num\_mesh\_chunksif success, returns the number of mesh chunks for this query Returnsdvs\_ret dvs\_ret DVS\_NONE on success, else see method description 



<a id="a2dab5f63a6c619a1ee6d3138679c9eac" name="a2dab5f63a6c619a1ee6d3138679c9eac"></a>## [◆ ](#a2dab5f63a6c619a1ee6d3138679c9eac)get\_num\_parts()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_parts  ( uint32\_t &amp; *num\_parts*)   pure virtual 

Get the number of parts for this query.

**IMPORTANT**: The number of parts will be invalid if this query or any parent queries' filters are modifed.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]num\_partsif success, returns the number of parts for this query Returnsdvs\_ret DVS\_NONE on success, else see method description 



<a id="a955bed02a8706e13c972f45c9263f84e" name="a955bed02a8706e13c972f45c9263f84e"></a>## [◆ ](#a955bed02a8706e13c972f45c9263f84e)get\_num\_plot\_chunks()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_plot\_chunks  ( uint32\_t &amp; *num\_plot\_chunks*)   pure virtual 

Get the number of plot chunks for this query.

NOT YET IMPLEMENTED

**IMPORTANT**: The number of plot chunks will be invalid if this query or any parent queries' filters are modified.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
- DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
- DVS\_METADATA\_ERROR: Error loading metadata

Parameters \[out\]num\_plot\_chunksif success, returns the number of plot chunks for this query Returnsdvs\_ret dvs\_ret DVS\_NONE on success, else see method description 



<a id="ab2f64cb2c3a336c0d86fb0b3799c13e5" name="ab2f64cb2c3a336c0d86fb0b3799c13e5"></a>## [◆ ](#ab2f64cb2c3a336c0d86fb0b3799c13e5)get\_num\_plots()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_plots  ( uint32\_t &amp; *num\_plots*)   pure virtual 

Get the number of plots for this query.

**IMPORTANT**: The number of plots will be invalid if this query or any parent queries' filters are modifed.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]num\_plotsif success, returns the number of plots for this query Returnsdvs\_ret dvs\_ret DVS\_NONE on success, else see method description 



<a id="ab09b8c2d9204f66e88b1ac56b3e0e40d" name="ab09b8c2d9204f66e88b1ac56b3e0e40d"></a>## [◆ ](#ab09b8c2d9204f66e88b1ac56b3e0e40d)get\_num\_ranks()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_ranks  ( uint32\_t &amp; *num\_ranks*)   pure virtual 

Get the number of ranks for this filtered query.

This call will return all of the unique ranks across all datasets. I.E. if you are loading 2 datasets one with ranks: 0, 1, 2 and one with 0, 1, 2, 3, 4, this will return 5 representing 0,1,2,3,4.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]num\_ranksthe size of the buffer to allocate for [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70 "Get the unique ranks for this filtered query.") Returnsdvs\_ret DVS\_NONE on success, otherwise see method description 



<a id="a05dc766c5d6789ca3dcbab72cf4ca4e9" name="a05dc766c5d6789ca3dcbab72cf4ca4e9"></a>## [◆ ](#a05dc766c5d6789ca3dcbab72cf4ca4e9)get\_num\_servers()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_servers  ( const char \* *uri*,    uint32\_t &amp; *num\_servers* )  pure virtual 

Get the num servers object.

Get the number of servers the cache in the uri was written with.

Errors:

- DVS\_NONE: Success
- DVS\_PARAM\_NULL: uri passed in was nullptr
- DVS\_INVALID\_CACHE: uri passed in was invalid or cache isn't accessible
- DVS\_CACHE\_MISSING\_SERVERS: Cache has a gap in the number of servers, bad cache?
- DVS\_CACHE\_EMPTY: No server folders in cache
- DVS\_UNKNOWN: Internal unhandled case

Parameters \[in\]uriURI of a cache. See [Cache URIs](group__group__dvs__uri.html#dvs_cache_uri) \[out\]num\_serversnumber of servers this cache was written with Returnsdvs\_ret DVS\_NONE on success, otherwise see method description 



<a id="a43880c6392208deb0a4685fb05cd55e0" name="a43880c6392208deb0a4685fb05cd55e0"></a>## [◆ ](#a43880c6392208deb0a4685fb05cd55e0)get\_num\_timesteps()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_timesteps  ( uint32\_t &amp; *num\_timesteps*)   pure virtual 

Get the number of timesteps.

NOT YET IMPLEMENTED

**IMPORTANT**: The number of timesteps will be invalid if this query or any parent queries' filters are modified.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
- DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
- DVS\_METADATA\_ERROR: Error loading metadata

Parameters \[out\]num\_timestepsif success, returns the number of timesteps to allocate for [IQuery::get\_timesteps()](#ad1d56e910ffc40d8f432152a1028d53b "Get the timesteps object.") Returnsdvs\_ret dvs\_ret DVS\_NONE on success, else see method description 



<a id="a336a2553eb96266550f737539e85b2a8" name="a336a2553eb96266550f737539e85b2a8"></a>## [◆ ](#a336a2553eb96266550f737539e85b2a8)get\_num\_variables()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_num\_variables  ( uint32\_t &amp; *num\_vars*)   pure virtual 

Get the number of variables for this query.

**IMPORTANT**: The number of variables will be invalid if this query or any parent queries' filters are modifed.

Errors:

- DVS\_NONE: Success
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]num\_varsif success, returns the number of variables for this query Returnsdvs\_ret dvs\_ret DVS\_NONE on success, else see method description 



<a id="a53ec579c40465ee2aebf87ac60dc90fb" name="a53ec579c40465ee2aebf87ac60dc90fb"></a>## [◆ ](#a53ec579c40465ee2aebf87ac60dc90fb)get\_part()

 virtual const [DVS::IObject](class_d_v_s_1_1_i_object.html) \* DVS::IQuery::get\_part  ( uint32\_t *index*)   pure virtual 

Get the part based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

Parameters \[in\]indexindex of the part to retrieve Returns[DVS::IObject](class_d_v_s_1_1_i_object.html "Interface for part/plot objects for DVS Reader API.")\* part based on the index, or nullptr if not found 



<a id="a590a1eff5cb7906028f736810e079ed6" name="a590a1eff5cb7906028f736810e079ed6"></a>## [◆ ](#a590a1eff5cb7906028f736810e079ed6)get\_plot()

 virtual const [DVS::IObject](class_d_v_s_1_1_i_object.html) \* DVS::IQuery::get\_plot  ( uint32\_t *index*)   pure virtual 

Get the plot object based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

Parameters indexindex of the plot to retrieve Returns[DVS::IObject](class_d_v_s_1_1_i_object.html "Interface for part/plot objects for DVS Reader API.")\* plot based on the index, or nullptr if not found 



<a id="a074055c68ba05d544d653095683405c7" name="a074055c68ba05d544d653095683405c7"></a>## [◆ ](#a074055c68ba05d544d653095683405c7)get\_plot\_chunk()

 virtual [DVS::IPlotChunk](class_d_v_s_1_1_i_plot_chunk.html) \* DVS::IQuery::get\_plot\_chunk  ( uint32\_t *index*)   pure virtual 

Get the plot chunk based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

Parameters \[in\]indexindex of the plot chunk to retrieve Returns[DVS::IPlotChunk](class_d_v_s_1_1_i_plot_chunk.html "Plot Chunk Interface for DVS Reader API.")\* the plot chunk based on the index, or nullptr if not found 



<a id="a469f214b6c9976e81d93510410c00b70" name="a469f214b6c9976e81d93510410c00b70"></a>## [◆ ](#a469f214b6c9976e81d93510410c00b70)get\_ranks()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_ranks  ( uint32\_t \* *ranks*)   pure virtual 

Get the unique ranks for this filtered query.

This call will return all of the unique ranks across all datasets. I.E. if you are loading 2 datasets one with ranks: 0, 1, 2 and one with 0, 1, 2, 3, 4, this will return 5 representing 0,1,2,3,4.

Errors:

- DVS\_NONE: Success
- DVS\_PARAM\_NULL: ranks passed in is nullptr
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

Parameters \[out\]ranksan array of the unique ranks for this query, call [IQuery::get\_num\_ranks()](#ab09b8c2d9204f66e88b1ac56b3e0e40d "Get the number of ranks for this filtered query.") for buffer size to allocate Returnsdvs\_ret DVS\_NONE on success, otherwise see method description 



<a id="ad1d56e910ffc40d8f432152a1028d53b" name="ad1d56e910ffc40d8f432152a1028d53b"></a>## [◆ ](#ad1d56e910ffc40d8f432152a1028d53b)get\_timesteps()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_timesteps  ( float \* *timesteps*)   pure virtual 

Get the timesteps object.

NOT YET IMPLEMENTED

**IMPORTANT**: The timesteps will be invalid if this query or any parent queries' filters are modified.

Errors:

- DVS\_NONE: Success
- DVS\_PARAM\_NULL: timesteps param is nullptr
- DVS\_INVALID\_CACHE: Problem accessing cache
- DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
- DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
- DVS\_METADATA\_ERROR: Error loading metadata

Parameters \[out\]timestepsbuffer for timesteps to be saved in, call [IQuery::get\_num\_timesteps()](#a43880c6392208deb0a4685fb05cd55e0 "Get the number of timesteps.") to determine size Returnsdvs\_ret DVS\_NONE on success, else see method description 



<a id="ac1ca725d3c7e7354ab38b4b3e971e2b3" name="ac1ca725d3c7e7354ab38b4b3e971e2b3"></a>## [◆ ](#ac1ca725d3c7e7354ab38b4b3e971e2b3)get\_variable()

 virtual const [DVS::IVar](class_d_v_s_1_1_i_var.html) \* DVS::IQuery::get\_variable  ( uint32\_t *index*)   pure virtual 

Get the variable object based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

Parameters \[in\]indexindex of the variable to retrieve Returns[DVS::IVar](class_d_v_s_1_1_i_var.html "Interface for variables for the DVS Reader API.")\* variable based on the index, or nullptr if not found 



<a id="a8ec063e869d5ef051a276b0b0fab0f42" name="a8ec063e869d5ef051a276b0b0fab0f42"></a>## [◆ ](#a8ec063e869d5ef051a276b0b0fab0f42)get\_variable\_data()

 virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.html#a1d7466ae72e89fe36cbf2408b4f7d9c1) DVS::IQuery::get\_variable\_data  ( const [DVS::IObject](class_d_v_s_1_1_i_object.html) \* *object*,    const [DVS::IVar](class_d_v_s_1_1_i_var.html) \* *var*,    float *time*,    float \* *values* )  pure virtual 

Get variable values for dataset and part objects.

Dataset (Case) or part objects can have variable values per timestep. This method retrieves those values or returns if they do not exist. There does not need to be a value set for every part variable on every part. DVS\_NO\_DATA will be returned in this case.

Error Codes:

- DVS\_NONE: No error
- DVS\_PARAM\_NULL: Null param passed in
- DVS\_PARAM\_INVALID\_VAR: Invalid variable passed in, should not be possible
- DVS\_PARAM\_INVALID\_VAR\_LOC: Variable passed in not a case or part variable
- DVS\_PARAM\_INVALID\_OBJECT\_TYPE: Object passed in not a case or part object
- DVS\_PARAM\_INVALID\_OBJECT: Invalid object passed in, should not be possible
- DVS\_PARAM\_INVALID\_TIME: Timestep does not exist for the dataset the object belongs to
- DVS\_PARAM\_OBJECT\_DATASET\_MISMATCH: Object and variable are from different datasets

Parameters \[in\]objectThe case/dataset or part object to find values for \[in\]varthe variable to retrieve the data for \[in\]timethe time value to retrieve the variable data for \[out\]valuesthe array of data to return, should be of size [DVS::IVar::get\_float\_count\_per\_value()](class_d_v_s_1_1_i_var.html#a9dbdd84e6f6342deae82ede6dcf2156e "Get the number of floats per value.") Returnsdvs\_ret DVS\_NONE if no errors, DVS\_NO\_DATA if no data found, otherwise see method description 



<a id="a257f79d7de21658c07dc602dfa6bbf34" name="a257f79d7de21658c07dc602dfa6bbf34"></a>## [◆ ](#a257f79d7de21658c07dc602dfa6bbf34)release()

 virtual void DVS::IQuery::release  ( )   pure virtual 

Release the memory of the query.

This will release the memory of the query, any objects returned from it (i.e. parts/plots/variables) and release the memory of any chained queries.





<a id="ab6ce54c68281ea1676af650ebc5716a0" name="ab6ce54c68281ea1676af650ebc5716a0"></a>## [◆ ](#ab6ce54c68281ea1676af650ebc5716a0)set\_logger()

 virtual void DVS::IQuery::set\_logger  ( [DVS::ILogger](class_d_v_s_1_1_i_logger.html) \* *logger*)   pure virtual 

Set the logger object.

Set a logger interface for the client to use. This object will have [DVS::ILogger::release()](class_d_v_s_1_1_i_logger.html#a753d496b0ca488a74e6209f330b13458 "Release the memory of the object.") invoked on it. If [release()](#a257f79d7de21658c07dc602dfa6bbf34 "Release the memory of the query.") is not implemented the memory should be destroyed by the caller after the query is released.

Parameters \[in\]loggerlogger to use, will be released if [DVS::ILogger::release()](class_d_v_s_1_1_i_logger.html#a753d496b0ca488a74e6209f330b13458 "Release the memory of the object.") is implemented 



<a id="acfefd0ed3856da6599599f15109ece9a" name="acfefd0ed3856da6599599f15109ece9a"></a>## [◆ ](#acfefd0ed3856da6599599f15109ece9a)set\_server\_mod()

 virtual void DVS::IQuery::set\_server\_mod  ( uint32\_t *server\_num*,    uint32\_t *server\_mod* )  pure virtual 

Set a filter based on the server number and a modulus.

Data in DVS is normally splitup between multiple servers. This method lets you setup the parallelism paradigm for reading in the server data. I.E. if the data was written with 4 servers but you want to read it back in with 2 servers you should have one reader use set\_server\_mod(0, 2) and the other use set\_server\_mod(1, 2). This will round robin the data so reader "0" will reader the data from 0 and 2 and server "1" will read the data from 1 and 3. To set it so that a server will read only its data set server\_mod=0.

Use [get\_num\_servers()](#a05dc766c5d6789ca3dcbab72cf4ca4e9 "Get the num servers object.") to determine the number of servers to use

Parameters \[in\]server\_numthe base server number to read from the cache \[in\]server\_modthe modulus for round-robining server data between queries/readers 



---

The documentation for this class was generated from the following file:- D:/ANSYSDev/Product-src/ensight/user\_defined\_src/readers/dvs/include/[dvs\_query\_interface.h](dvs__query__interface_8h_source.html)