Skip to main content

Post-processing tools 2025 R1

dvs_query_interface

Last update: 16.07.2025
Go to the documentation of this file.
1/**************************************************************
2*
3* (C) 2022-2024 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
33#include <map>
34#include <string>
35#include "dynamic_data_interface.h"
40#include "dvs_var_interface.h"
43#include "logger_interface.h"
44
45
46#include "dvs_import_export.h"
47
48namespace DVS
49{
79class IQuery
80{
81public:
82
83 IQuery() = default;
84 virtual ~IQuery() = default;
85 IQuery(IQuery&&) = default;
86 IQuery& operator=(IQuery&&) = default;
87 IQuery(const IQuery&) = default;
88 IQuery& operator=(const IQuery&) = default;
89
97 virtual void release() = 0;
98
109 virtual void set_logger(DVS::ILogger* logger) = 0;
110
129 virtual dvs_ret add_uri(const char* uri) = 0;
130
148 virtual dvs_ret get_num_servers(const char* uri, uint32_t& num_servers) = 0;
149
165 virtual void set_server_mod(uint32_t server_num, uint32_t server_mod) = 0;
166
183 virtual DVS::IQuery* filter(const char* filter) = 0;
184
199 virtual dvs_ret get_num_ranks(uint32_t& num_ranks) = 0;
200
216 virtual dvs_ret get_ranks(uint32_t* ranks) = 0;
217
235 virtual dvs_ret get_num_chunks_per_rank(uint32_t& num_chunks) = 0;
236
256 virtual dvs_ret get_chunks_per_rank(uint32_t* chunks) = 0;
257
273 virtual dvs_ret get_num_datasets(uint32_t& num_datasets) = 0;
274
283 virtual DVS::IDataset* get_dataset(uint32_t index) = 0;
284
299 virtual dvs_ret get_num_parts(uint32_t& num_parts) = 0;
300
309 virtual const DVS::IObject* get_part(uint32_t index) = 0;
310
325 virtual dvs_ret get_num_plots(uint32_t& num_plots) = 0;
326
335 virtual const DVS::IObject* get_plot(uint32_t index) = 0;
336
363 const DVS::IVar* var,
364 float time,
365 float* values) = 0;
366
381 virtual dvs_ret get_num_variables(uint32_t& num_vars) = 0;
382
391 virtual const DVS::IVar* get_variable(uint32_t index) = 0;
392
412 virtual dvs_ret get_num_timesteps(uint32_t& num_timesteps) = 0;
413
432 virtual dvs_ret get_timesteps(float* timesteps) = 0;
433
453 virtual dvs_ret get_num_mesh_chunks(uint32_t& num_mesh_chunks) = 0;
454
463 virtual DVS::IMeshChunk* get_mesh_chunk(uint32_t index) = 0;
464
484 virtual dvs_ret get_num_plot_chunks(uint32_t& num_plot_chunks) = 0;
485
494 virtual DVS::IPlotChunk* get_plot_chunk(uint32_t index) = 0;
495
513 virtual dvs_ret get_hash_available(const char* hash, bool& available) = 0;
514
518 virtual void clear_data() = 0;
519
520};
521
528} //namespace DVS
529
530#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 void clear_data()=0
Clear the current 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