Skip to main content

Post-processing tools 2024 R1

dvs_query_interface

Last update: 16.07.2025
Go to the documentation of this file.
1/**************************************************************
2*
3* (C) 2022 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
4*
5* Restricted Rights Legend
6*
7* Use, duplication, or disclosure of this
8* software and its documentation by the
9* Government is subject to restrictions as
10* set forth in subdivision [(b)(3)(ii)] of
11* the Rights in Technical Data and Computer
12* Software clause at 52.227-7013.
13*
14**************************************************************
15*/
16
30#ifndef ___DVS_QUERY_INTERFACE_H___
31#define ___DVS_QUERY_INTERFACE_H___
32
35
38#include "dvs_var_interface.h"
41#include "logger_interface.h"
42
43#include "dvs_import_export.h"
44
45namespace DVS
46{
76class IQuery
77{
78public:
79
80 IQuery() = default;
81 virtual ~IQuery() = default;
82 IQuery(IQuery&&) = default;
83 IQuery& operator=(IQuery&&) = default;
84 IQuery(const IQuery&) = default;
85 IQuery& operator=(const IQuery&) = default;
86
94 virtual void release() = 0;
95
106 virtual void set_logger(DVS::ILogger* logger) = 0;
107
126 virtual dvs_ret add_uri(const char* uri) = 0;
127
145 virtual dvs_ret get_num_servers(const char* uri, uint32_t& num_servers) = 0;
146
162 virtual void set_server_mod(uint32_t server_num, uint32_t server_mod) = 0;
163
180 virtual DVS::IQuery* filter(const char* filter) = 0;
181
196 virtual dvs_ret get_num_ranks(uint32_t& num_ranks) = 0;
197
213 virtual dvs_ret get_ranks(uint32_t* ranks) = 0;
214
232 virtual dvs_ret get_num_chunks_per_rank(uint32_t& num_chunks) = 0;
233
253 virtual dvs_ret get_chunks_per_rank(uint32_t* chunks) = 0;
254
270 virtual dvs_ret get_num_datasets(uint32_t& num_datasets) = 0;
271
280 virtual DVS::IDataset* get_dataset(uint32_t index) = 0;
281
296 virtual dvs_ret get_num_parts(uint32_t& num_parts) = 0;
297
306 virtual const DVS::IObject* get_part(uint32_t index) = 0;
307
322 virtual dvs_ret get_num_plots(uint32_t& num_plots) = 0;
323
332 virtual const DVS::IObject* get_plot(uint32_t index) = 0;
333
360 const DVS::IVar* var,
361 float time,
362 float* values) = 0;
363
378 virtual dvs_ret get_num_variables(uint32_t& num_vars) = 0;
379
388 virtual const DVS::IVar* get_variable(uint32_t index) = 0;
389
409 virtual dvs_ret get_num_timesteps(uint32_t& num_timesteps) = 0;
410
429 virtual dvs_ret get_timesteps(float* timesteps) = 0;
430
450 virtual dvs_ret get_num_mesh_chunks(uint32_t& num_mesh_chunks) = 0;
451
460 virtual DVS::IMeshChunk* get_mesh_chunk(uint32_t index) = 0;
461
481 virtual dvs_ret get_num_plot_chunks(uint32_t& num_plot_chunks) = 0;
482
491 virtual DVS::IPlotChunk* get_plot_chunk(uint32_t index) = 0;
492
510 virtual dvs_ret get_hash_available(const char* hash, bool& available) = 0;
511};
512
519} //namespace DVS
520
521#endif //___DVS_QUERY_INTERFACE_H___
Interface for datasets for the DVS Reader API.
Interface for a logger to be used by DVS::IClient.
Mesh Chunk Interface for DVS Reader API.
Interface for part/plot objects for DVS Reader API.
Plot Chunk Interface for DVS Reader API.
The query interface for the DVS Reader API.
virtual DVS::IMeshChunk * get_mesh_chunk(uint32_t index)=0
Get the mesh chunk based on the index.
virtual dvs_ret get_num_servers(const char *uri, uint32_t &num_servers)=0
Get the num servers object.
virtual DVS::IPlotChunk * get_plot_chunk(uint32_t index)=0
Get the plot chunk based on the index.
virtual dvs_ret get_num_mesh_chunks(uint32_t &num_mesh_chunks)=0
Get the number of mesh chunks for this query.
IQuery()=default
default
IQuery & operator=(const IQuery &)=default
default
virtual void release()=0
Release the memory of the query.
virtual dvs_ret get_num_parts(uint32_t &num_parts)=0
Get the number of parts for this query.
virtual dvs_ret get_num_variables(uint32_t &num_vars)=0
Get the number of variables for this query.
IQuery(IQuery &&)=default
default
virtual dvs_ret get_num_timesteps(uint32_t &num_timesteps)=0
Get the number of timesteps.
virtual dvs_ret get_ranks(uint32_t *ranks)=0
Get the unique ranks for this filtered query.
virtual dvs_ret get_num_datasets(uint32_t &num_datasets)=0
Get the number of datasets objects.
virtual dvs_ret get_chunks_per_rank(uint32_t *chunks)=0
Get an array of the number of chunks for every rank for this query.
virtual const DVS::IObject * get_part(uint32_t index)=0
Get the part based on the index.
virtual ~IQuery()=default
default
IQuery & operator=(IQuery &&)=default
default
virtual DVS::IDataset * get_dataset(uint32_t index)=0
Get the dataset object.
virtual const DVS::IObject * get_plot(uint32_t index)=0
Get the plot object based on the index.
virtual dvs_ret get_hash_available(const char *hash, bool &available)=0
Get if the hash is available in the blobstore.
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.
virtual dvs_ret get_variable_data(const DVS::IObject *object, const DVS::IVar *var, float time, float *values)=0
Get variable values for dataset and part objects.
virtual dvs_ret get_num_plot_chunks(uint32_t &num_plot_chunks)=0
Get the number of plot chunks for this query.
virtual dvs_ret get_num_chunks_per_rank(uint32_t &num_chunks)=0
Get the number of chunks for each rank.
virtual dvs_ret get_num_ranks(uint32_t &num_ranks)=0
Get the number of ranks for this filtered query.
virtual dvs_ret get_num_plots(uint32_t &num_plots)=0
Get the number of plots for this query.
virtual void set_logger(DVS::ILogger *logger)=0
Set the logger object.
virtual const DVS::IVar * get_variable(uint32_t index)=0
Get the variable object based on the index.
virtual void set_server_mod(uint32_t server_num, uint32_t server_mod)=0
Set a filter based on the server number and a modulus.
virtual dvs_ret get_timesteps(float *timesteps)=0
Get the timesteps object.
virtual dvs_ret add_uri(const char *uri)=0
Add a URI for the reader API to iterate over.
IQuery(const IQuery &)=default
support copying
Interface for variables for the DVS Reader API.
DVS Reader API Dataset Interface.
DVS Reader API Mesh Chunk Interface.
DVS Reader API Object Interface.
DVS Reader API Plot Chunk Interface.
DVS_DLL_EXPORT IQuery * CREATE_QUERY_INSTANCE()
Create a query interface object.
DVS Reader API Variable Interface.
Contains enums used in C/C++ API.
Contains errors used in the DVS C/C++ API.
int32_t dvs_ret
Return value of methods, TODO.
Logger Interface Class.

Connect with Ansys