    

 ## On this page

  

 

 # dvs\_client\_interface.h File Reference

 Last update: 16.07.2025 

`#include <string>`  
`#include "<a class="el" href="dvs__server__interface_8h_source.xhtml">dvs_server_interface.h</a>"`  
`#include "<a class="el" href="dynamic__visualization__store__api_8h_source.xhtml">dynamic_visualization_store_api.h</a>"`  
`#include "<a class="el" href="logger__interface_8h_source.xhtml">logger_interface.h</a>"`  
`#include "include/dvs_import_export.h"`  


[Go to the source code of this file.](dvs__client__interface_8h_source.xhtml)

## <a id="nested-classes" name="nested-classes"></a>Classes

class [DVS::IClient](class_d_v_s_1_1_i_client.xhtml) ## <a id="func-members" name="func-members"></a>Functions

DVS\_DLL\_EXPORT [DVS::IClient](class_d_v_s_1_1_i_client.xhtml) \* [DVS::CREATE\_CLIENT\_INSTANCE](#a2475075c9ab4c2e57a8f0b4ab5bc5df4) ([DVS::IServer](class_d_v_s_1_1_i_server.xhtml) \*server, [dvs\_client\_flags](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9f) flags, const char \*secret) DVS\_DLL\_EXPORT void [DVS::DESTROY\_CLIENT\_INSTANCE](#a3f13d009a9a07278cbca3449113d78fc) ([DVS::IClient](class_d_v_s_1_1_i_client.xhtml) \*destroy) <a id="details" name="details"></a>## Detailed Description

```

Setup the initial connection and needed information
<p>1.) Instantiate <a class="el" href="class_d_v_s_1_1_i_server.xhtml" title="Interface class used to run a dynamic data server in a thread accepting incoming client connections.">DVS::IServer</a> using <a class="el" href="dvs__server__interface_8h.xhtml#a852580b9a49ac305e4ae26ca637bcc75" title="Create a DVS::IServer instance for clients to connect to.">DVS::CREATE_SERVER_INSTANCE()</a> method
1a.) If running a server within this process call setup options (<a class="el" href="class_d_v_s_1_1_i_server.xhtml#a964b0420773ec5f47dbcea04334ba0d3" title="Set a collection of options on the server. Overwrites previous options See. See Server Options.">DVS::IServer::set_options()</a>), see documentation for available options
1b.) If running a server within this process call startup (<a class="el" href="class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c" title="Start the server.">DVS::IServer::startup()</a>) to begin running server
2.) Instantiate <a class="el" href="class_d_v_s_1_1_i_client.xhtml" title="API for solvers to use to send data to EnSight servers.">DVS::IClient</a> using <a class="el" href="#a2475075c9ab4c2e57a8f0b4ab5bc5df4" title="Factory method to create a dynamic data client interface instance.">DVS::CREATE_CLIENT_INSTANCE()</a> method and <a class="el" href="class_d_v_s_1_1_i_server.xhtml" title="Interface class used to run a dynamic data server in a thread accepting incoming client connections.">DVS::IServer</a> created in step 1
3.) Provide a logging method (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a024475b03496bc310e211632d153517d" title="Set the logger interface to use.">DVS::IClient::set_logger()</a>) (optional)
4.) Begin initialization (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#aff782ecd341fddd87a22a15107efeb3b" title="Begins initialization for this rank.">DVS::IClient::begin_init()</a>)
5.) Set unit system (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a284f922fec402e03365c7873502d1fde" title="Set the unit system we are using for this session (optional)">DVS::IClient::set_unit_system()</a>) (optional)
6.) Add information about all parts if applicable (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388" title="Add part information for session.">DVS::IClient::add_part_info()</a>)
7.) Add information about all variables if applicable (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d" title="Add variable information for session.">DVS::IClient::add_var_info()</a>) (optional)
8.) Add information about all plots if applicable (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a1bdb7ca9cf25c63e533f47fe26132af6" title="Add plot information for session.">DVS::IClient::add_plot_info()</a>) (optional)
9.) End initialization (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#aaf1641a1afbf8bb6257940be28dd94b2" title="Finish initialization for this rank.">DVS::IClient::end_init()</a>)</p>
<p>Now at the end of each timestep we can push data to the ensight server</p>
<p>1.) Begin the update (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#abd1cbbd2007346ad616dc74eab9d0553" title="Method to begin an update.">DVS::IClient::begin_update()</a>)
2.) For Each Part
Update mesh/nodes (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661" title="Update nodes for a specific part.">DVS::IClient::update_nodes()</a>)
3.) For Each Element Type
Update Element (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6" title="Update elements for a specific part and element type.">DVS::IClient::update_elements()</a>, <a class="el" href="class_d_v_s_1_1_i_client.xhtml#ac6b3990562f507eda4abedf53e021647" title="Update N-SIDED elements.">DVS::IClient::update_elements_polygon()</a>, <a class="el" href="class_d_v_s_1_1_i_client.xhtml#a7a9ccf04ed8502d23913d8eef21607ec" title="Update N-FACED Elements.">DVS::IClient::update_elements_polyhedral()</a>)
4.) For Each Variable
If location on case or part use corresponding update methods i.e. <a class="el" href="class_d_v_s_1_1_i_client.xhtml#a8f2e7174f9e89ef5285043dd9357f9b0" title="Update case variable.">DVS::IClient::update_var_case()</a>,
<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a8f2e7174f9e89ef5285043dd9357f9b0" title="Update case variable.">DVS::IClient::update_var_case()</a></p>
<code>    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>
</code>
<p>4.) For Each Plot
Update plot values (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#afcf7811f22d58bd328bed415116a4c41" title="Update plot data for plot.">DVS::IClient::update_plot()</a>)
5.) End update (<a class="el" href="class_d_v_s_1_1_i_client.xhtml#a6396cc4ae967ad5f0da8e234429a97cd" title="Call to end the update for this timestep/rank/chunk.">DVS::IClient::end_update()</a>)</p>
<p>On application shutdown let the API shut itself down</p>
<p>1.) Destroy instance of <a class="el" href="class_d_v_s_1_1_i_client.xhtml" title="API for solvers to use to send data to EnSight servers.">DVS::IClient</a> using <a class="el" href="#a3f13d009a9a07278cbca3449113d78fc" title="Destruction method for a client created with CREATE_CLIENT_INSTANCE.">DVS::DESTROY_CLIENT_INSTANCE()</a> method
</p>
```

Definition in file [dvs\_client\_interface.h](dvs__client__interface_8h_source.xhtml).



## Function Documentation

<a id="a2475075c9ab4c2e57a8f0b4ab5bc5df4" name="a2475075c9ab4c2e57a8f0b4ab5bc5df4"></a>## [◆ ](#a2475075c9ab4c2e57a8f0b4ab5bc5df4)CREATE\_CLIENT\_INSTANCE()

 DVS\_DLL\_EXPORT [DVS::IClient](class_d_v_s_1_1_i_client.xhtml) \* DVS::CREATE\_CLIENT\_INSTANCE  ( [DVS::IServer](class_d_v_s_1_1_i_server.xhtml) \* *server*,    [dvs\_client\_flags](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9f) *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](dynamic__visualization__store__enums_8h.xhtml "Contains enums used in C/C++ API.")) \[in\]secretsecret shared secret to use to connect to server, can be empty Returns[DVS::IClient](class_d_v_s_1_1_i_client.xhtml "API for solvers to use to send data to EnSight servers.")\* instance of a dvs client, (nullptr if failure), must be destroyed with DESTROY\_CLIENT\_INSTANCE 



<a id="a3f13d009a9a07278cbca3449113d78fc" name="a3f13d009a9a07278cbca3449113d78fc"></a>## [◆ ](#a3f13d009a9a07278cbca3449113d78fc)DESTROY\_CLIENT\_INSTANCE()

 DVS\_DLL\_EXPORT void DVS::DESTROY\_CLIENT\_INSTANCE  ( [DVS::IClient](class_d_v_s_1_1_i_client.xhtml) \* *destroy*) 

Destruction method for a client created with CREATE\_CLIENT\_INSTANCE.

Parameters destroyInstance of a client to destroy