Skip to main content

Post-processing tools 2025 R1

dvs_client_interface.h File Reference

Last update: 16.07.2025
#include <string>
#include "dvs_server_interface.h"
#include "dynamic_visualization_store_api.h"
#include "logger_interface.h"
#include "include/dvs_import_export.h"

Go to the source code of this file.

Classes

class  DVS::IClient
 

Functions

DVS_DLL_EXPORT DVS::IClientDVS::CREATE_CLIENT_INSTANCE (DVS::IServer *server, dvs_client_flags flags, const char *secret)
 
DVS_DLL_EXPORT void DVS::DESTROY_CLIENT_INSTANCE (DVS::IClient *destroy)
 

Detailed Description

Setup the initial connection and needed information

1.) Instantiate DVS::IServer using DVS::CREATE_SERVER_INSTANCE() method 1a.) If running a server within this process call setup options (DVS::IServer::set_options()), see documentation for available options 1b.) If running a server within this process call startup (DVS::IServer::startup()) to begin running server 2.) Instantiate DVS::IClient using DVS::CREATE_CLIENT_INSTANCE() method and DVS::IServer created in step 1 3.) Provide a logging method (DVS::IClient::set_logger()) (optional) 4.) Begin initialization (DVS::IClient::begin_init()) 5.) Set unit system (DVS::IClient::set_unit_system()) (optional) 6.) Add information about all parts if applicable (DVS::IClient::add_part_info()) 7.) Add information about all variables if applicable (DVS::IClient::add_var_info()) (optional) 8.) Add information about all plots if applicable (DVS::IClient::add_plot_info()) (optional) 9.) End initialization (DVS::IClient::end_init())

Now at the end of each timestep we can push data to the ensight server

1.) Begin the update (DVS::IClient::begin_update()) 2.) For Each Part Update mesh/nodes (DVS::IClient::update_nodes()) 3.) For Each Element Type Update Element (DVS::IClient::update_elements(), DVS::IClient::update_elements_polygon(), DVS::IClient::update_elements_polyhedral()) 4.) For Each Variable If location on case or part use corresponding update methods i.e. DVS::IClient::update_var_case(), DVS::IClient::update_var_case()

    If location element or node use corresponding update methods i.e. <a class="el" href="class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f" title="Update elemental scalar variable values.">DVS::IClient::update_var_element()</a>,
    <a class="el" href="class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3" title="Update nodal variable values.">DVS::IClient::update_var_node()</a>, <a class="el" href="class_d_v_s_1_1_i_client.xhtml#a3834c25cf5ed35a17f08ecefa4b73417" title="Update var field values (nodal or elemental)">DVS::IClient::update_var_field()</a>

4.) For Each Plot Update plot values (DVS::IClient::update_plot()) 5.) End update (DVS::IClient::end_update())

On application shutdown let the API shut itself down

1.) Destroy instance of DVS::IClient using DVS::DESTROY_CLIENT_INSTANCE() method

Definition in file dvs_client_interface.h.

Function Documentation

◆ CREATE_CLIENT_INSTANCE()

DVS_DLL_EXPORT DVS::IClient * DVS::CREATE_CLIENT_INSTANCE ( DVS::IServer * server,
dvs_client_flags flags,
const char * secret )

Factory method to create a dynamic data client interface instance.

Parameters
serverServer instance to connect to
flagsconfig flags for client setup see dvs_client_flags (dynamic_visualization_store_enums.h)
[in]secretsecret shared secret to use to connect to server, can be empty
Returns
DVS::IClient* instance of a dvs client, (nullptr if failure), must be destroyed with DESTROY_CLIENT_INSTANCE

◆ DESTROY_CLIENT_INSTANCE()

DVS_DLL_EXPORT void DVS::DESTROY_CLIENT_INSTANCE ( DVS::IClient * destroy)

Destruction method for a client created with CREATE_CLIENT_INSTANCE.

Parameters
destroyInstance of a client to destroy

Connect with Ansys