    

 ## On this page

  

 

 # test\_dvs\_client\_cxx

 Last update: 16.07.2025 

[Go to the documentation of this file.](test__dvs__client__cxx_8cpp.xhtml)<a id="l00001" name="l00001"></a> 1/\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00002" name="l00002"></a> 2 \* Copyright 2017-2023 ANSYS, Inc.

<a id="l00003" name="l00003"></a> 3 \* All Rights Reserved.

<a id="l00004" name="l00004"></a> 4 \*

<a id="l00005" name="l00005"></a> 5 \* Restricted Rights Legend

<a id="l00006" name="l00006"></a> 6 \*

<a id="l00007" name="l00007"></a> 7 \* Use, duplication, or disclosure of this

<a id="l00008" name="l00008"></a> 8 \* software and its documentation by the

<a id="l00009" name="l00009"></a> 9 \* Government is subject to restrictions as

<a id="l00010" name="l00010"></a> 10 \* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00011" name="l00011"></a> 11 \* the Rights in Technical Data and Computer

<a id="l00012" name="l00012"></a> 12 \* Software clause at 52.227-7013.

<a id="l00013" name="l00013"></a> 13 \* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00014" name="l00014"></a> 14 \*/

<a id="l00015" name="l00015"></a> 15 

<a id="l00024" name="l00024"></a> 24\#include &lt;stdio.h&gt;

<a id="l00025" name="l00025"></a> 25\#include &lt;stdlib.h&gt;

<a id="l00026" name="l00026"></a> 26\#include &lt;string.h&gt;

<a id="l00027" name="l00027"></a> 27\#include &lt;stdint.h&gt;

<a id="l00028" name="l00028"></a> 28\#include &lt;stdarg.h&gt;

<a id="l00029" name="l00029"></a> 29 

<a id="l00030" name="l00030"></a> 30\#include "[dvs\_client\_interface.h](dvs__client__interface_8h.xhtml)"

<a id="l00031" name="l00031"></a> 31\#include "[dvs\_server\_interface.h](dvs__server__interface_8h.xhtml)"

<a id="l00032" name="l00032"></a> 32\#include "[dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml)"

<a id="l00033" name="l00033"></a> 33\#include "logger.h"

<a id="l00034" name="l00034"></a> 34\#include "test\_dynamic\_data.h"

<a id="l00035" name="l00035"></a> 35 

<a id="l00036" name="l00036"></a> 36\#include &lt;vector&gt;

<a id="l00037" name="l00037"></a> 37 

<a id="l00038" name="l00038"></a> 38\#ifdef \_WIN32

<a id="l00039" name="l00039"></a> 39\#include &lt;Windows.h&gt;

<a id="l00040" name="l00040"></a> 40\#else

<a id="l00041" name="l00041"></a> 41\#include &lt;unistd.h&gt;

<a id="l00042" name="l00042"></a> 42\#endif

<a id="l00043" name="l00043"></a> 43 

<a id="l00044" name="l00044"></a> 44static void logging_function(void* user_data, const char* message)

<a id="l00045" name="l00045"></a> 45{

<a id="l00046" name="l00046"></a> 46 fprintf(stderr, message);

<a id="l00047" name="l00047"></a> 47}

<a id="l00048" name="l00048"></a> 48 

<a id="l00056" name="l00056"></a>[ 56](test__dvs__client__cxx_8cpp.xhtml#a3c04138a5bfe5d72780bb7e82a18e627)int [main](test__dvs__client__cxx_8cpp.xhtml#a3c04138a5bfe5d72780bb7e82a18e627)(int argc, char** argv)

<a id="l00057" name="l00057"></a> 57{

<a id="l00058" name="l00058"></a> 58 uint32_t port = 50055;

<a id="l00059" name="l00059"></a> 59 uint32_t msec_delay = 0;

<a id="l00060" name="l00060"></a> 60 char host[512] = {0};

<a id="l00061" name="l00061"></a> 61 strcpy(host, "127.0.0.1");

<a id="l00062" name="l00062"></a> 62 char protocol[10] = {0};

<a id="l00063" name="l00063"></a> 63 strcpy(protocol, "grpc");

<a id="l00064" name="l00064"></a> 64 uint32_t width = 50;

<a id="l00065" name="l00065"></a> 65 uint32_t height = 50;

<a id="l00066" name="l00066"></a> 66 uint32_t depth = 50;

<a id="l00067" name="l00067"></a> 67 uint32_t max_timesteps = 10;

<a id="l00068" name="l00068"></a> 68 uint32_t current_rank = 0;

<a id="l00069" name="l00069"></a> 69 uint32_t total_ranks = 1;

<a id="l00070" name="l00070"></a> 70 uint8_t create_ghosts = 1;

<a id="l00071" name="l00071"></a> 71 uint8_t block_for_server = 1;

<a id="l00072" name="l00072"></a> 72 uint32_t starting_timestep = 0;

<a id="l00073" name="l00073"></a> 73 uint32_t dedup = 1;

<a id="l00074" name="l00074"></a> 74 bool send_structured_parts = false;

<a id="l00075" name="l00075"></a> 75 char dataset_id[255] = {0};

<a id="l00076" name="l00076"></a> 76 strcpy(dataset_id, "Test-C++-API");

<a id="l00077" name="l00077"></a> 77 char secret[255] = {0};

<a id="l00078" name="l00078"></a> 78 uint32_t plot_rank = 0;

<a id="l00079" name="l00079"></a> 79 uint32_t server_number = 0;

<a id="l00080" name="l00080"></a> 80 uint32_t server_verbosity = 0;

<a id="l00081" name="l00081"></a> 81 uint32_t local_ranks = 0;

<a id="l00082" name="l00082"></a> 82 uint32_t all_defs = false;

<a id="l00083" name="l00083"></a> 83 char cache_uri[512] = {0};

<a id="l00084" name="l00084"></a> 84 bool log_all = false;

<a id="l00085" name="l00085"></a> 85 uint32_t debug_wait = 0;

<a id="l00086" name="l00086"></a> 86 bool start_server = false;

<a id="l00087" name="l00087"></a> 87 bool test_delete = false;

<a id="l00088" name="l00088"></a> 88 

<a id="l00089" name="l00089"></a> 89 uint32_t i = 1;

<a id="l00090" name="l00090"></a> 90 while (i &lt; argc)

<a id="l00091" name="l00091"></a> 91 {

<a id="l00092" name="l00092"></a> 92 if ((strcmp(argv[i], "-p") == 0 ) &amp;&amp; (i &lt; argc - 1))

<a id="l00093" name="l00093"></a> 93 {

<a id="l00094" name="l00094"></a> 94 i++;

<a id="l00095" name="l00095"></a> 95 port = atoi(argv[i]);

<a id="l00096" name="l00096"></a> 96 }

<a id="l00097" name="l00097"></a> 97 else if ((strcmp(argv[i], "-h") == 0) &amp;&amp; (i &lt; argc - 1))

<a id="l00098" name="l00098"></a> 98 {

<a id="l00099" name="l00099"></a> 99 i++;

<a id="l00100" name="l00100"></a> 100 strncpy(host, argv[i], 255);

<a id="l00101" name="l00101"></a> 101 }

<a id="l00102" name="l00102"></a> 102 else if ((strcmp(argv[i], "-protocol") == 0) &amp;&amp; (i &lt; argc - 1))

<a id="l00103" name="l00103"></a> 103 {

<a id="l00104" name="l00104"></a> 104 i++;

<a id="l00105" name="l00105"></a> 105 strncpy(protocol, argv[i], 10);

<a id="l00106" name="l00106"></a> 106 if (strcmp(protocol, "grpc") != 0 &amp;&amp; strcmp(protocol, "null") != 0 )

<a id="l00107" name="l00107"></a> 107 {

<a id="l00108" name="l00108"></a> 108 fprintf(stderr, "protocol: %s invalid\\n", protocol);

<a id="l00109" name="l00109"></a> 109 exit(1);

<a id="l00110" name="l00110"></a> 110 }

<a id="l00111" name="l00111"></a> 111 }

<a id="l00112" name="l00112"></a> 112 else if ((strcmp(argv[i], "-d") == 0) &amp;&amp; (i &lt; argc - 1))

<a id="l00113" name="l00113"></a> 113 {

<a id="l00114" name="l00114"></a> 114 i++;

<a id="l00115" name="l00115"></a> 115 msec_delay = atoi(argv[i]);

<a id="l00116" name="l00116"></a> 116 }

<a id="l00117" name="l00117"></a> 117 else if ((strcmp(argv[i], "-s") == 0) &amp;&amp; (i &lt; argc - 3))

<a id="l00118" name="l00118"></a> 118 {

<a id="l00119" name="l00119"></a> 119 i++;

<a id="l00120" name="l00120"></a> 120 width = atoi(argv[i++]);

<a id="l00121" name="l00121"></a> 121 height = atoi(argv[i++]);

<a id="l00122" name="l00122"></a> 122 depth = atoi(argv[i]);

<a id="l00123" name="l00123"></a> 123 }

<a id="l00124" name="l00124"></a> 124 else if ((strcmp(argv[i], "-t") == 0) &amp;&amp; (i &lt; argc - 1))

<a id="l00125" name="l00125"></a> 125 {

<a id="l00126" name="l00126"></a> 126 i++;

<a id="l00127" name="l00127"></a> 127 max_timesteps = atoi(argv[i]);

<a id="l00128" name="l00128"></a> 128 }

<a id="l00129" name="l00129"></a> 129 else if ((strcmp(argv[i], "-r") == 0) &amp;&amp; (i &lt; argc - 2))

<a id="l00130" name="l00130"></a> 130 {

<a id="l00131" name="l00131"></a> 131 i++;

<a id="l00132" name="l00132"></a> 132 current_rank = atoi(argv[i++]);

<a id="l00133" name="l00133"></a> 133 total_ranks = atoi(argv[i]);

<a id="l00134" name="l00134"></a> 134 }

<a id="l00135" name="l00135"></a> 135 else if (strcmp(argv[i], "-noghost") == 0)

<a id="l00136" name="l00136"></a> 136 {

<a id="l00137" name="l00137"></a> 137 create_ghosts = 0;

<a id="l00138" name="l00138"></a> 138 }

<a id="l00139" name="l00139"></a> 139 else if (strcmp(argv[i], "-nowait") == 0)

<a id="l00140" name="l00140"></a> 140 {

<a id="l00141" name="l00141"></a> 141 block_for_server = 0;

<a id="l00142" name="l00142"></a> 142 }

<a id="l00143" name="l00143"></a> 143 else if ((strcmp(argv[i], "-start") == 0) &amp;&amp; (i &lt; argc - 1))

<a id="l00144" name="l00144"></a> 144 {

<a id="l00145" name="l00145"></a> 145 i++;

<a id="l00146" name="l00146"></a> 146 starting_timestep = atoi(argv[i]);

<a id="l00147" name="l00147"></a> 147 }

<a id="l00148" name="l00148"></a> 148 else if (strcmp(argv[i], "-nodedup") == 0)

<a id="l00149" name="l00149"></a> 149 {

<a id="l00150" name="l00150"></a> 150 dedup = 0;

<a id="l00151" name="l00151"></a> 151 }

<a id="l00152" name="l00152"></a> 152 else if (strcmp(argv[i], "-id") == 0)

<a id="l00153" name="l00153"></a> 153 {

<a id="l00154" name="l00154"></a> 154 i++;

<a id="l00155" name="l00155"></a> 155 memset(dataset_id, 0, 255);

<a id="l00156" name="l00156"></a> 156 strncpy(dataset_id, argv[i], 255);

<a id="l00157" name="l00157"></a> 157 }

<a id="l00158" name="l00158"></a> 158 else if (strcmp(argv[i], "-secret") == 0)

<a id="l00159" name="l00159"></a> 159 {

<a id="l00160" name="l00160"></a> 160 i++;

<a id="l00161" name="l00161"></a> 161 strncpy(secret, argv[i], 255);

<a id="l00162" name="l00162"></a> 162 }

<a id="l00163" name="l00163"></a> 163 else if (strcmp(argv[i], "-structured") == 0)

<a id="l00164" name="l00164"></a> 164 {

<a id="l00165" name="l00165"></a> 165 send_structured_parts = true;

<a id="l00166" name="l00166"></a> 166 }

<a id="l00167" name="l00167"></a> 167 else if (strcmp(argv[i], "-plot\_rank") == 0)

<a id="l00168" name="l00168"></a> 168 {

<a id="l00169" name="l00169"></a> 169 i++;

<a id="l00170" name="l00170"></a> 170 plot_rank = atoi(argv[i]);

<a id="l00171" name="l00171"></a> 171 }

<a id="l00172" name="l00172"></a> 172 else if (strcmp(argv[i], "-server") == 0 &amp;&amp; (i &lt; argc - 3))

<a id="l00173" name="l00173"></a> 173 {

<a id="l00174" name="l00174"></a> 174 i++;

<a id="l00175" name="l00175"></a> 175 start_server = true;

<a id="l00176" name="l00176"></a> 176 server_number = atoi(argv[i++]);

<a id="l00177" name="l00177"></a> 177 local_ranks = atoi(argv[i++]);

<a id="l00178" name="l00178"></a> 178 server_verbosity = atoi(argv[i]);

<a id="l00179" name="l00179"></a> 179 }

<a id="l00180" name="l00180"></a> 180 else if (strcmp(argv[i], "-cache\_uri") == 0)

<a id="l00181" name="l00181"></a> 181 {

<a id="l00182" name="l00182"></a> 182 i++;

<a id="l00183" name="l00183"></a> 183 strncpy(cache_uri, argv[i], 512);

<a id="l00184" name="l00184"></a> 184 }

<a id="l00185" name="l00185"></a> 185 else if (strcmp(argv[i], "-all\_defs") == 0)

<a id="l00186" name="l00186"></a> 186 {

<a id="l00187" name="l00187"></a> 187 all_defs = true;

<a id="l00188" name="l00188"></a> 188 }

<a id="l00189" name="l00189"></a> 189 else if (strcmp(argv[i], "-log\_all") == 0)

<a id="l00190" name="l00190"></a> 190 {

<a id="l00191" name="l00191"></a> 191 log_all = true;

<a id="l00192" name="l00192"></a> 192 }

<a id="l00193" name="l00193"></a> 193 else if (strcmp(argv[i], "-debug\_wait") == 0)

<a id="l00194" name="l00194"></a> 194 {

<a id="l00195" name="l00195"></a> 195 i++;

<a id="l00196" name="l00196"></a> 196 debug_wait = atoi(argv[i]);

<a id="l00197" name="l00197"></a> 197 }

<a id="l00198" name="l00198"></a> 198 else if (strcmp(argv[i], "-test\_delete") == 0)

<a id="l00199" name="l00199"></a> 199 {

<a id="l00200" name="l00200"></a> 200 test_delete = true;

<a id="l00201" name="l00201"></a> 201 }

<a id="l00202" name="l00202"></a> 202 else

<a id="l00203" name="l00203"></a> 203 {

<a id="l00204" name="l00204"></a> 204 fprintf(stderr, "Unknown option: %s\\n", argv[i]);

<a id="l00205" name="l00205"></a> 205 fprintf(stderr, "Usage: %s \[-p port\] \[-h host\] \[-d msec\_delay\] \[-t num\_timesteps\] \[-s dx dy dz\] \[-noghost\] \[-nowait\] \[-start t\]\\n", argv[0]);

<a id="l00206" name="l00206"></a> 206 fprintf(stderr, "Options:\\n");

<a id="l00207" name="l00207"></a> 207 fprintf(stderr, " -t timesteps Number of timesteps to generate. Default: %u\\n", max_timesteps);

<a id="l00208" name="l00208"></a> 208 fprintf(stderr, " -p port Server port to connect to. Default: %u\\n", port);

<a id="l00209" name="l00209"></a> 209 fprintf(stderr, " -h host Server hostname to connect to. Default: %s\\n", host);

<a id="l00210" name="l00210"></a> 210 fprintf(stderr, " -protocol str Server protocol. I.E. grpc or null. Default: grpc");

<a id="l00211" name="l00211"></a> 211 fprintf(stderr, " -d delay Number of milliseconds to delay between timestep pushes. Default: %u\\n", msec_delay);

<a id="l00212" name="l00212"></a> 212 fprintf(stderr, " -s dx dy dz Size of 3D hex grid (width height depth) Default: %u %u %u\\n", width, height, depth);

<a id="l00213" name="l00213"></a> 213 fprintf(stderr, " -r x y Rank information x=current rank (0 based), y=total number of ranks. Default: %u %u\\n", current_rank, total_ranks);

<a id="l00214" name="l00214"></a> 214 fprintf(stderr, " -noghost Do not create ghost elements\\n");

<a id="l00215" name="l00215"></a> 215 fprintf(stderr, " -nowait Do not wait for server to be available\\n");

<a id="l00216" name="l00216"></a> 216 fprintf(stderr, " -start t Begin timesteps with timestep Default: %u\\n", starting_timestep);

<a id="l00217" name="l00217"></a> 217 fprintf(stderr, " -nodedup Do not de-duplicate data on the client side Default: deduplicate\\n");

<a id="l00218" name="l00218"></a> 218 fprintf(stderr, " -id string Set an id/name for the dataset Default: TestID\\n");

<a id="l00219" name="l00219"></a> 219 fprintf(stderr, " -secret string Shared secret to use when talking with server Default: no shared secret\\n");

<a id="l00220" name="l00220"></a> 220 fprintf(stderr, " -structured Turn on sending structured part data Default: Don't send structured part data\\n");

<a id="l00221" name="l00221"></a> 221 fprintf(stderr, " -plot\_rank Set the rank which should send plot data to EnSight (zero based) Default: %u\\n", plot_rank);

<a id="l00222" name="l00222"></a> 222 fprintf(stderr, " -server n r v Start a server using server number \[n\], expecting \[r\] local ranks for DVS connections to connect to with verbosity \[v\]. Local Rank Min/Max: 1/1000\\n");

<a id="l00223" name="l00223"></a> 223 fprintf(stderr, " -cache\_uri str The URI for the server to use for the cache. Default: No cache\\n");

<a id="l00224" name="l00224"></a> 224 fprintf(stderr, " -all\_defs Send all part/var definitions no matter the current rank. Default: No\\n");

<a id="l00225" name="l00225"></a> 225 fprintf(stderr, " -log\_all Print out all client logging information\\n. Default: No client logs");

<a id="l00226" name="l00226"></a> 226 fprintf(stderr, " -debug\_wait ms Wait for \[ms\] for debugging\\n");

<a id="l00227" name="l00227"></a> 227 fprintf(stderr, " -test\_delete Test deleting all timesteps before each update Default: Do not test\\n");

<a id="l00228" name="l00228"></a> 228 exit(1);

<a id="l00229" name="l00229"></a> 229 }

<a id="l00230" name="l00230"></a> 230 i++;

<a id="l00231" name="l00231"></a> 231 }

<a id="l00232" name="l00232"></a> 232 

<a id="l00233" name="l00233"></a> 233 if (debug_wait &gt; 0)

<a id="l00234" name="l00234"></a> 234 {

<a id="l00235" name="l00235"></a> 235 #ifdef \_WIN32

<a id="l00236" name="l00236"></a> 236 Sleep(debug_wait);

<a id="l00237" name="l00237"></a> 237 #else

<a id="l00238" name="l00238"></a> 238 usleep(debug_wait*1000);

<a id="l00239" name="l00239"></a> 239 #endif

<a id="l00240" name="l00240"></a> 240 }

<a id="l00241" name="l00241"></a> 241 

<a id="l00242" name="l00242"></a> 242 char uri[512] = {0};

<a id="l00243" name="l00243"></a> 243 sprintf(uri, "%s://%s:%u", protocol, host, port);

<a id="l00244" name="l00244"></a> 244 fprintf(stderr, "Connecting to: %s\\n", uri);

<a id="l00245" name="l00245"></a> 245 fprintf(stderr, "Timestep delay: %u\\n", msec_delay);

<a id="l00246" name="l00246"></a> 246 

<a id="l00247" name="l00247"></a> 247 uint32_t send_vars = 1;

<a id="l00248" name="l00248"></a> 248 uint32_t send_elems = 1;

<a id="l00249" name="l00249"></a> 249 uint32_t send_hex_elems = 1;

<a id="l00250" name="l00250"></a> 250 uint32_t send_nfaced_elems = 1;

<a id="l00251" name="l00251"></a> 251 uint32_t send_pnt_elems = 1;

<a id="l00252" name="l00252"></a> 252 uint32_t send_tri_quad_elems = 1;

<a id="l00253" name="l00253"></a> 253 uint32_t send_nsided_elems = 0;

<a id="l00254" name="l00254"></a> 254 uint32_t send_plots = 1;

<a id="l00255" name="l00255"></a> 255 

<a id="l00256" name="l00256"></a> 256 [dvs\_client\_flags](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9f) flags;

<a id="l00257" name="l00257"></a> 257 if (block_for_server) flags = static\_cast&lt;[dvs\_client\_flags](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9f)&gt;(flags | [dvs\_client\_flags::BLOCK\_FOR\_SERVER](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9fa9feb185df8061416aa9a23b0150dc821));

<a id="l00258" name="l00258"></a> 258 if (dedup) flags = static\_cast&lt;[dvs\_client\_flags](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9f)&gt;(flags | [dvs\_client\_flags::DEDUP](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9fa81b113ffc96eb6d968a19950727c0ff9));

<a id="l00259" name="l00259"></a> 259 

<a id="l00260" name="l00260"></a> 260 fprintf(stderr, "Client Flags: Blocking: %d, Dedup: %u\\n", ([BLOCK\_FOR\_SERVER](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9fa9feb185df8061416aa9a23b0150dc821) &amp; flags) &gt; 0, ([DEDUP](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9fa81b113ffc96eb6d968a19950727c0ff9) &amp; flags) &gt; 0);

<a id="l00261" name="l00261"></a> 261 

<a id="l00262" name="l00262"></a> 262 [DVS::IServer](class_d_v_s_1_1_i_server.xhtml)* server = DVS::CREATE_SERVER_INSTANCE(uri);

<a id="l00263" name="l00263"></a> 263 if (server == nullptr)

<a id="l00264" name="l00264"></a> 264 {

<a id="l00265" name="l00265"></a> 265 fprintf(stderr, "Failed to create server\\n");

<a id="l00266" name="l00266"></a> 266 exit(1);

<a id="l00267" name="l00267"></a> 267 }

<a id="l00268" name="l00268"></a> 268 if (start_server)

<a id="l00269" name="l00269"></a> 269 {

<a id="l00270" name="l00270"></a> 270 char temp[10];

<a id="l00271" name="l00271"></a> 271 snprintf(temp, 10, "%u", server_verbosity);

<a id="l00272" name="l00272"></a> 272 server-&gt;[set\_option](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c)("VERBOSE",temp);

<a id="l00273" name="l00273"></a> 273 if (strlen(cache_uri) &gt; 0) server-&gt;[set\_option](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c)("CACHE\_URI",cache_uri);

<a id="l00274" name="l00274"></a> 274 server-&gt;[startup](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c)(server_number, local_ranks);

<a id="l00275" name="l00275"></a> 275 auto uri = server-&gt;[get\_uri](class_d_v_s_1_1_i_server.xhtml#a087c3fed77651e0f62d7189f44a32443)();

<a id="l00276" name="l00276"></a> 276 if (uri){

<a id="l00277" name="l00277"></a> 277 fprintf(stderr, "The final uri is: %s\\n", uri);

<a id="l00278" name="l00278"></a> 278 }

<a id="l00279" name="l00279"></a> 279 }

<a id="l00280" name="l00280"></a> 280 

<a id="l00281" name="l00281"></a> 281 [DVS::IClient](class_d_v_s_1_1_i_client.xhtml)* client = nullptr;

<a id="l00282" name="l00282"></a> 282 client = DVS::CREATE_CLIENT_INSTANCE(server, flags, secret);

<a id="l00283" name="l00283"></a> 283 fprintf(stderr, "Current Client Version: %s\\n", client-&gt;[get\_version](class_d_v_s_1_1_i_client.xhtml#aa5d98105d78c61e4e0c4043e28174fe1)());

<a id="l00284" name="l00284"></a> 284 if (client == nullptr)

<a id="l00285" name="l00285"></a> 285 {

<a id="l00286" name="l00286"></a> 286 fprintf(stderr, "Failed to create client\\n");

<a id="l00287" name="l00287"></a> 287 exit(1);

<a id="l00288" name="l00288"></a> 288 }

<a id="l00289" name="l00289"></a> 289 [dvs\_log\_flags](dynamic__visualization__store__enums_8h.xhtml#a9bca12092877a90e6c497994093a8609) log_flags = log_all ? [dvs\_log\_flags::LOG\_ALL](dynamic__visualization__store__enums_8h.xhtml#a9bca12092877a90e6c497994093a8609a87cff070224b283d7aace436723245fc) : [dvs\_log\_flags::LOG\_UPDATE\_BEG\_END](dynamic__visualization__store__enums_8h.xhtml#a9bca12092877a90e6c497994093a8609a1a3a1b2a98f96b6de074cd9ae93805bb);

<a id="l00290" name="l00290"></a> 290 client-&gt;[set\_logger](class_d_v_s_1_1_i_client.xhtml#a024475b03496bc310e211632d153517d)(new DVS::Logger(nullptr, log_flags, logging_function));

<a id="l00291" name="l00291"></a> 291 {

<a id="l00292" name="l00292"></a> 292 if (part_info_num != 7 || var_info_num != 9)

<a id="l00293" name="l00293"></a> 293 {

<a id="l00294" name="l00294"></a> 294 fprintf(stderr, "This pseudo client code relies on part infos == 7 and var infos == 7, needs modified otherwise\\n");

<a id="l00295" name="l00295"></a> 295 exit(1);

<a id="l00296" name="l00296"></a> 296 }

<a id="l00297" name="l00297"></a> 297 

<a id="l00298" name="l00298"></a> 298 struct TestDynamicData test;

<a id="l00299" name="l00299"></a> 299 test_dynamic_data_init(&amp;test, 0, current_rank, total_ranks);

<a id="l00300" name="l00300"></a> 300 client-&gt;[begin\_init](class_d_v_s_1_1_i_client.xhtml#aff782ecd341fddd87a22a15107efeb3b)(dataset_id, test.current_rank, test.total_ranks, test.num_chunks);

<a id="l00301" name="l00301"></a> 301 client-&gt;[set\_unit\_system](class_d_v_s_1_1_i_client.xhtml#a284f922fec402e03365c7873502d1fde)(test.unit_system);

<a id="l00302" name="l00302"></a> 302 client-&gt;[add\_metadata](class_d_v_s_1_1_i_client.xhtml#ab4144e59bfdcf9c095c6510c4298d160)(test.metadata_keys, test.metadata_vals, test.metadata_num_pairs);

<a id="l00303" name="l00303"></a> 303 //TODO: Have this done in only the 0th rank once merging definitions is finished

<a id="l00304" name="l00304"></a> 304 if (send_plots &amp;&amp; current_rank == plot_rank) client-&gt;[add\_plot\_info](class_d_v_s_1_1_i_client.xhtml#a1bdb7ca9cf25c63e533f47fe26132af6)(test.plots, plot_info_num);

<a id="l00305" name="l00305"></a> 305 

<a id="l00306" name="l00306"></a> 306 if ((total_ranks == 1) || (total_ranks == 2) || all_defs)

<a id="l00307" name="l00307"></a> 307 {

<a id="l00308" name="l00308"></a> 308 //If one rank or two ranks and first rank send everything (tests second rank having no definitions)

<a id="l00309" name="l00309"></a> 309 if (current_rank == 0 || all_defs)

<a id="l00310" name="l00310"></a> 310 {

<a id="l00311" name="l00311"></a> 311 client-&gt;[add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)(test.parts, part_info_num);

<a id="l00312" name="l00312"></a> 312 client-&gt;[add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)(test.vars, var_info_num);

<a id="l00313" name="l00313"></a> 313 }

<a id="l00314" name="l00314"></a> 314 }

<a id="l00315" name="l00315"></a> 315 else if (total_ranks == 3)

<a id="l00316" name="l00316"></a> 316 {

<a id="l00317" name="l00317"></a> 317 //If 3 ranks splitup definition data between first 2 ranks

<a id="l00318" name="l00318"></a> 318 //the last rank will not have any (will receive data from others)

<a id="l00319" name="l00319"></a> 319 if (current_rank == 0)

<a id="l00320" name="l00320"></a> 320 {

<a id="l00321" name="l00321"></a> 321 //Send part 0

<a id="l00322" name="l00322"></a> 322 client-&gt;[add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)(test.parts, 1);

<a id="l00323" name="l00323"></a> 323 //Send vars 0-&gt;1

<a id="l00324" name="l00324"></a> 324 client-&gt;[add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)(test.vars, 2);

<a id="l00325" name="l00325"></a> 325 }

<a id="l00326" name="l00326"></a> 326 else if (current_rank == 1)

<a id="l00327" name="l00327"></a> 327 {

<a id="l00328" name="l00328"></a> 328 //Send parts 1-&gt;2

<a id="l00329" name="l00329"></a> 329 client-&gt;[add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)(&amp;test.parts[1], part_info_num-1);

<a id="l00330" name="l00330"></a> 330 //Send vars 2-&gt;5

<a id="l00331" name="l00331"></a> 331 client-&gt;[add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)(&amp;test.vars[2], var_info_num - 2);

<a id="l00332" name="l00332"></a> 332 }

<a id="l00333" name="l00333"></a> 333 //Third rank will have empty definitions which should be filled in

<a id="l00334" name="l00334"></a> 334 }

<a id="l00335" name="l00335"></a> 335 else if (total_ranks &gt; 3)

<a id="l00336" name="l00336"></a> 336 {

<a id="l00337" name="l00337"></a> 337 //If more than 3 ranks splitup data between first 3 ranks

<a id="l00338" name="l00338"></a> 338 //other 3 ranks will not have any (will receive data from others)

<a id="l00339" name="l00339"></a> 339 if (current_rank == 0)

<a id="l00340" name="l00340"></a> 340 {

<a id="l00341" name="l00341"></a> 341 //Send part 0

<a id="l00342" name="l00342"></a> 342 client-&gt;[add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)(test.parts, 1);

<a id="l00343" name="l00343"></a> 343 //Send vars 0-&gt;1

<a id="l00344" name="l00344"></a> 344 client-&gt;[add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)(test.vars, 2);

<a id="l00345" name="l00345"></a> 345 }

<a id="l00346" name="l00346"></a> 346 else if (current_rank == 1)

<a id="l00347" name="l00347"></a> 347 {

<a id="l00348" name="l00348"></a> 348 //Send part 1

<a id="l00349" name="l00349"></a> 349 client-&gt;[add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)(&amp;test.parts[1], 1);

<a id="l00350" name="l00350"></a> 350 //Send parts 2-&gt;3

<a id="l00351" name="l00351"></a> 351 client-&gt;[add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)(&amp;test.vars[2], 2);

<a id="l00352" name="l00352"></a> 352 }

<a id="l00353" name="l00353"></a> 353 else if (current_rank == 2)

<a id="l00354" name="l00354"></a> 354 {

<a id="l00355" name="l00355"></a> 355 //Send part 2

<a id="l00356" name="l00356"></a> 356 client-&gt;[add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)(&amp;test.parts[2], part_info_num-2);

<a id="l00357" name="l00357"></a> 357 //Send parts 4-&gt;5

<a id="l00358" name="l00358"></a> 358 client-&gt;[add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)(&amp;test.vars[4], var_info_num - 4);

<a id="l00359" name="l00359"></a> 359 }

<a id="l00360" name="l00360"></a> 360 }

<a id="l00361" name="l00361"></a> 361 else

<a id="l00362" name="l00362"></a> 362 {

<a id="l00363" name="l00363"></a> 363 //Situation not currently handled exit out

<a id="l00364" name="l00364"></a> 364 fprintf(stderr, "Bad Initialization of Ranks\\n");

<a id="l00365" name="l00365"></a> 365 exit(1);

<a id="l00366" name="l00366"></a> 366 }

<a id="l00367" name="l00367"></a> 367 

<a id="l00368" name="l00368"></a> 368 client-&gt;[end\_init](class_d_v_s_1_1_i_client.xhtml#aaf1641a1afbf8bb6257940be28dd94b2)();

<a id="l00369" name="l00369"></a> 369 }

<a id="l00370" name="l00370"></a> 370 

<a id="l00371" name="l00371"></a> 371 uint32_t update_num = 0; // Keep a running update number for this session

<a id="l00372" name="l00372"></a> 372 for (uint32_t i = starting_timestep; i &lt; max_timesteps; i++)

<a id="l00373" name="l00373"></a> 373 {

<a id="l00374" name="l00374"></a> 374 if (i &gt; 1 + starting_timestep &amp;&amp; msec_delay)

<a id="l00375" name="l00375"></a> 375 {

<a id="l00376" name="l00376"></a> 376 #ifdef \_WIN32

<a id="l00377" name="l00377"></a> 377 Sleep(msec_delay);

<a id="l00378" name="l00378"></a> 378 #else

<a id="l00379" name="l00379"></a> 379 usleep(msec_delay*1000);

<a id="l00380" name="l00380"></a> 380 #endif

<a id="l00381" name="l00381"></a> 381 }

<a id="l00382" name="l00382"></a> 382 if (test_delete &amp;&amp; i != starting_timestep) {

<a id="l00383" name="l00383"></a> 383 fprintf(stderr, "Rank: %i of %i Deleting Item\\n", (current_rank+1), total_ranks);

<a id="l00384" name="l00384"></a> 384 client-&gt;[delete\_item](class_d_v_s_1_1_i_client.xhtml#a5e8f192f5c683a8265dd94020506a0aa)(update_num++, current_rank, "/timestep.time/gte/0.0");

<a id="l00385" name="l00385"></a> 385 }

<a id="l00386" name="l00386"></a> 386 fprintf(stderr, "Rank: %i of %i Sending Timestep: %i of %i\\n", (current_rank+1), total_ranks, (i+1), max_timesteps);

<a id="l00387" name="l00387"></a> 387 

<a id="l00388" name="l00388"></a> 388 struct TestDynamicData test;

<a id="l00389" name="l00389"></a> 389 test_dynamic_data_init(&amp;test, i, current_rank, total_ranks);

<a id="l00390" name="l00390"></a> 390 test.ghosts = create_ghosts;

<a id="l00391" name="l00391"></a> 391 test_dynamic_data_create_mesh_and_elements(&amp;test, width, height, depth);

<a id="l00392" name="l00392"></a> 392 

<a id="l00393" name="l00393"></a> 393 client-&gt;[begin\_update](class_d_v_s_1_1_i_client.xhtml#abd1cbbd2007346ad616dc74eab9d0553)(update_num++, current_rank, test.current_chunk, test.time);

<a id="l00394" name="l00394"></a> 394 

<a id="l00395" name="l00395"></a> 395 if (send_structured_parts)

<a id="l00396" name="l00396"></a> 396 {

<a id="l00397" name="l00397"></a> 397 client-&gt;[update\_nodes\_structured](class_d_v_s_1_1_i_client.xhtml#a1588c437020e0ba5702ec48460a792a9)

<a id="l00398" name="l00398"></a> 398 (

<a id="l00399" name="l00399"></a> 399 test.parts[5]._id,

<a id="l00400" name="l00400"></a> 400 test.pp_global_ijk_max,

<a id="l00401" name="l00401"></a> 401 test.pp_local_ijk_min,

<a id="l00402" name="l00402"></a> 402 test.pp_local_ijk_max,

<a id="l00403" name="l00403"></a> 403 test.pp_origin,

<a id="l00404" name="l00404"></a> 404 test.pp_unit_vec_i,

<a id="l00405" name="l00405"></a> 405 test.pp_unit_vec_j,

<a id="l00406" name="l00406"></a> 406 test.pp_unit_vec_k,

<a id="l00407" name="l00407"></a> 407 test.pp_i_vals,

<a id="l00408" name="l00408"></a> 408 test.pp_j_vals,

<a id="l00409" name="l00409"></a> 409 test.pp_k_vals

<a id="l00410" name="l00410"></a> 410 );

<a id="l00411" name="l00411"></a> 411 

<a id="l00412" name="l00412"></a> 412 client-&gt;[update\_nodes\_structured](class_d_v_s_1_1_i_client.xhtml#a1588c437020e0ba5702ec48460a792a9)

<a id="l00413" name="l00413"></a> 413 (

<a id="l00414" name="l00414"></a> 414 test.parts[6]._id,

<a id="l00415" name="l00415"></a> 415 test.curv_global_ijk_max,

<a id="l00416" name="l00416"></a> 416 test.curv_local_ijk_min,

<a id="l00417" name="l00417"></a> 417 test.curv_local_ijk_max,

<a id="l00418" name="l00418"></a> 418 test.curv_x_vals,

<a id="l00419" name="l00419"></a> 419 test.curv_y_vals,

<a id="l00420" name="l00420"></a> 420 test.curv_z_vals

<a id="l00421" name="l00421"></a> 421 );

<a id="l00422" name="l00422"></a> 422 }

<a id="l00423" name="l00423"></a> 423 

<a id="l00424" name="l00424"></a> 424 if (send_hex_elems) client-&gt;[update\_nodes](class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661)(test.parts[0]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);

<a id="l00425" name="l00425"></a> 425 if (send_pnt_elems) client-&gt;[update\_nodes](class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661)(test.parts[1]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);

<a id="l00426" name="l00426"></a> 426 if (send_nfaced_elems) client-&gt;[update\_nodes](class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661)(test.parts[2]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);

<a id="l00427" name="l00427"></a> 427 if (send_tri_quad_elems) client-&gt;[update\_nodes](class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661)(test.parts[3]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);

<a id="l00428" name="l00428"></a> 428 if (send_nsided_elems) client-&gt;[update\_nodes](class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661)(test.parts[4]._id, test.polymesh_x_coords, test.polymesh_y_coords, test.polymesh_z_coords, test.polymesh_coords_size);

<a id="l00429" name="l00429"></a> 429 

<a id="l00430" name="l00430"></a> 430 if (send_elems)

<a id="l00431" name="l00431"></a> 431 {

<a id="l00432" name="l00432"></a> 432 if (send_hex_elems)

<a id="l00433" name="l00433"></a> 433 {

<a id="l00434" name="l00434"></a> 434 client-&gt;[update\_elements](class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6)(test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_coords, test.mesh_hex_elem_coords_size);

<a id="l00435" name="l00435"></a> 435 if (test.mesh_hex_ghost_elem_coords_size &gt; 0)

<a id="l00436" name="l00436"></a> 436 {

<a id="l00437" name="l00437"></a> 437 client-&gt;[update\_elements](class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6)(test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_coords, test.mesh_hex_ghost_elem_coords_size);

<a id="l00438" name="l00438"></a> 438 }

<a id="l00439" name="l00439"></a> 439 }

<a id="l00440" name="l00440"></a> 440 

<a id="l00441" name="l00441"></a> 441 if (send_nfaced_elems)

<a id="l00442" name="l00442"></a> 442 {

<a id="l00443" name="l00443"></a> 443 client-&gt;[update\_elements\_polyhedral](class_d_v_s_1_1_i_client.xhtml#a7a9ccf04ed8502d23913d8eef21607ec)

<a id="l00444" name="l00444"></a> 444 (

<a id="l00445" name="l00445"></a> 445 test.parts[2]._id,

<a id="l00446" name="l00446"></a> 446 CONVEX_POLYHEDRON,

<a id="l00447" name="l00447"></a> 447 test.mesh_nfaced_hex_elem_faces_per_elem,

<a id="l00448" name="l00448"></a> 448 test.mesh_nfaced_hex_elem_faces_per_elem_size,

<a id="l00449" name="l00449"></a> 449 test.mesh_nfaced_hex_elem_nodes_per_face,

<a id="l00450" name="l00450"></a> 450 test.mesh_nfaced_hex_elem_nodes_per_face_size,

<a id="l00451" name="l00451"></a> 451 test.mesh_nfaced_hex_elem_coords,

<a id="l00452" name="l00452"></a> 452 test.mesh_nfaced_hex_elem_coords_size

<a id="l00453" name="l00453"></a> 453 );

<a id="l00454" name="l00454"></a> 454 if (test.mesh_nfaced_hex_ghost_elem_coords_size &gt; 0)

<a id="l00455" name="l00455"></a> 455 {

<a id="l00456" name="l00456"></a> 456 client-&gt;[update\_elements\_polyhedral](class_d_v_s_1_1_i_client.xhtml#a7a9ccf04ed8502d23913d8eef21607ec)

<a id="l00457" name="l00457"></a> 457 (

<a id="l00458" name="l00458"></a> 458 test.parts[2]._id,

<a id="l00459" name="l00459"></a> 459 CONVEX_POLYHEDRON_GHOST,

<a id="l00460" name="l00460"></a> 460 test.mesh_nfaced_hex_ghost_elem_faces_per_elem,

<a id="l00461" name="l00461"></a> 461 test.mesh_nfaced_hex_ghost_elem_faces_per_elem_size,

<a id="l00462" name="l00462"></a> 462 test.mesh_nfaced_hex_ghost_elem_nodes_per_face,

<a id="l00463" name="l00463"></a> 463 test.mesh_nfaced_hex_ghost_elem_nodes_per_face_size,

<a id="l00464" name="l00464"></a> 464 test.mesh_nfaced_hex_ghost_elem_coords,

<a id="l00465" name="l00465"></a> 465 test.mesh_nfaced_hex_ghost_elem_coords_size

<a id="l00466" name="l00466"></a> 466 );

<a id="l00467" name="l00467"></a> 467 }

<a id="l00468" name="l00468"></a> 468 }

<a id="l00469" name="l00469"></a> 469 

<a id="l00470" name="l00470"></a> 470 if (send_nsided_elems &amp;&amp; current_rank == 0)

<a id="l00471" name="l00471"></a> 471 {

<a id="l00472" name="l00472"></a> 472 //Only send if current rank is 0 as we aren't

<a id="l00473" name="l00473"></a> 473 //splitting this part up based on rank

<a id="l00474" name="l00474"></a> 474 client-&gt;[update\_elements\_polygon](class_d_v_s_1_1_i_client.xhtml#ac6b3990562f507eda4abedf53e021647)

<a id="l00475" name="l00475"></a> 475 (

<a id="l00476" name="l00476"></a> 476 test.parts[4]._id,

<a id="l00477" name="l00477"></a> 477 N_SIDED_POLYGON,

<a id="l00478" name="l00478"></a> 478 test.polymesh_elem_nodes_per_face,

<a id="l00479" name="l00479"></a> 479 test.polymesh_elem_nodes_per_face_size,

<a id="l00480" name="l00480"></a> 480 test.polymesh_elem_nodes,

<a id="l00481" name="l00481"></a> 481 test.polymesh_elem_nodes_size

<a id="l00482" name="l00482"></a> 482 );

<a id="l00483" name="l00483"></a> 483 }

<a id="l00484" name="l00484"></a> 484 

<a id="l00485" name="l00485"></a> 485 if (send_pnt_elems) client-&gt;[update\_elements](class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6)(test.parts[1]._id, PNT, test.mesh_point_elem_coords, test.mesh_point_elem_coords_size);

<a id="l00486" name="l00486"></a> 486 

<a id="l00487" name="l00487"></a> 487 if (send_tri_quad_elems)

<a id="l00488" name="l00488"></a> 488 {

<a id="l00489" name="l00489"></a> 489 client-&gt;[update\_elements](class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6)(test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_coords, test.mesh_quad_elem_coords_size);

<a id="l00490" name="l00490"></a> 490 client-&gt;[update\_elements](class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6)(test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_coords, test.mesh_tri_elem_coords_size);

<a id="l00491" name="l00491"></a> 491 }

<a id="l00492" name="l00492"></a> 492 }

<a id="l00493" name="l00493"></a> 493 

<a id="l00494" name="l00494"></a> 494 if (send_vars)

<a id="l00495" name="l00495"></a> 495 {

<a id="l00496" name="l00496"></a> 496 //Case vars not working correctly with DVS

<a id="l00497" name="l00497"></a> 497 client-&gt;[update\_var\_case](class_d_v_s_1_1_i_client.xhtml#a8f2e7174f9e89ef5285043dd9357f9b0)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[6]._id, &amp;test.case_var_value, 1);

<a id="l00498" name="l00498"></a> 498 client-&gt;[update\_var\_part](class_d_v_s_1_1_i_client.xhtml#ab18cc3827eda737ea73c31aa7fe6ef68)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[4]._id, test.parts[0]._id, &amp;test.part_scalar[0], 1);

<a id="l00499" name="l00499"></a> 499 client-&gt;[update\_var\_part](class_d_v_s_1_1_i_client.xhtml#ab18cc3827eda737ea73c31aa7fe6ef68)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[4]._id, test.parts[1]._id, &amp;test.part_scalar[1], 1);

<a id="l00500" name="l00500"></a> 500 if (send_hex_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(HEXAHEDRON, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[0]._id, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);

<a id="l00501" name="l00501"></a> 501 if (send_hex_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(HEXAHEDRON, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[0]._id, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);

<a id="l00502" name="l00502"></a> 502 

<a id="l00503" name="l00503"></a> 503 //N-FACED Elements use the same elemental vars for now as hex elements

<a id="l00504" name="l00504"></a> 504 if (send_nfaced_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(CONVEX_POLYHEDRON, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[2]._id, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);

<a id="l00505" name="l00505"></a> 505 if (send_nfaced_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(CONVEX_POLYHEDRON, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[2]._id, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);

<a id="l00506" name="l00506"></a> 506 

<a id="l00507" name="l00507"></a> 507 if (send_structured_parts)

<a id="l00508" name="l00508"></a> 508 {

<a id="l00509" name="l00509"></a> 509 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(STRUCTURED, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[5]._id, test.structured_elem_var_scalar, test.structured_elem_var_scalar_size);

<a id="l00510" name="l00510"></a> 510 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(STRUCTURED, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[5]._id, test.structured_elem_var_scalar_rank, test.structured_elem_var_scalar_rank_size);

<a id="l00511" name="l00511"></a> 511 

<a id="l00512" name="l00512"></a> 512 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(STRUCTURED, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[6]._id, test.structured_elem_var_scalar, test.structured_elem_var_scalar_size);

<a id="l00513" name="l00513"></a> 513 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(STRUCTURED, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[6]._id, test.structured_elem_var_scalar_rank, test.structured_elem_var_scalar_rank_size);

<a id="l00514" name="l00514"></a> 514 }

<a id="l00515" name="l00515"></a> 515 

<a id="l00516" name="l00516"></a> 516 if (test.mesh_hex_ghost_elem_var_scalar_size &gt; 0)

<a id="l00517" name="l00517"></a> 517 {

<a id="l00518" name="l00518"></a> 518 if (send_hex_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(HEXAHEDRON_GHOST, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[0]._id, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);

<a id="l00519" name="l00519"></a> 519 //N-FACED Elements use the same elemental vars for now as hex elements

<a id="l00520" name="l00520"></a> 520 if (send_nfaced_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(CONVEX_POLYHEDRON_GHOST, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[2]._id, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);

<a id="l00521" name="l00521"></a> 521 }

<a id="l00522" name="l00522"></a> 522 if (test.mesh_hex_ghost_elem_var_rank_scalar_size &gt; 0)

<a id="l00523" name="l00523"></a> 523 {

<a id="l00524" name="l00524"></a> 524 if (send_hex_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(HEXAHEDRON_GHOST, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[0]._id, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);

<a id="l00525" name="l00525"></a> 525 //N-FACED Elements use the same elemental vars for now as hex elements

<a id="l00526" name="l00526"></a> 526 if (send_nfaced_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(CONVEX_POLYHEDRON_GHOST, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[2]._id, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);

<a id="l00527" name="l00527"></a> 527 }

<a id="l00528" name="l00528"></a> 528 

<a id="l00529" name="l00529"></a> 529 if (send_pnt_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(PNT, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[1]._id, test.mesh_point_elem_var_rank_scalar, test.mesh_point_elem_var_rank_scalar_size);

<a id="l00530" name="l00530"></a> 530 

<a id="l00531" name="l00531"></a> 531 if (send_nfaced_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(HEXAHEDRON, [dvs\_var\_type::VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958), test.vars[3]._id, test.parts[0]._id, test.mesh_hex_elem_var_vector, test.mesh_hex_elem_var_vector_size);

<a id="l00532" name="l00532"></a> 532 if (test.mesh_hex_ghost_elem_var_vector_size &gt; 0)

<a id="l00533" name="l00533"></a> 533 {

<a id="l00534" name="l00534"></a> 534 if (send_nfaced_elems) client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(HEXAHEDRON_GHOST, [dvs\_var\_type::VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958), test.vars[3]._id, test.parts[0]._id, test.mesh_hex_ghost_elem_var_vector, test.mesh_hex_ghost_elem_var_vector_size);

<a id="l00535" name="l00535"></a> 535 }

<a id="l00536" name="l00536"></a> 536 

<a id="l00537" name="l00537"></a> 537 if (send_tri_quad_elems)

<a id="l00538" name="l00538"></a> 538 {

<a id="l00539" name="l00539"></a> 539 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(QUADRANGLE, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[3]._id, test.mesh_quad_elem_var_scalar, test.mesh_quad_elem_var_scalar_size);

<a id="l00540" name="l00540"></a> 540 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(QUADRANGLE, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[3]._id, test.mesh_quad_elem_var_rank_scalar, test.mesh_quad_elem_var_rank_scalar_size);

<a id="l00541" name="l00541"></a> 541 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(TRIANGLE, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[2]._id, test.parts[3]._id, test.mesh_tri_elem_var_scalar, test.mesh_tri_elem_var_scalar_size);

<a id="l00542" name="l00542"></a> 542 client-&gt;[update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)(TRIANGLE, [dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[5]._id, test.parts[3]._id, test.mesh_tri_elem_var_rank_scalar, test.mesh_tri_elem_var_rank_scalar_size);

<a id="l00543" name="l00543"></a> 543 }

<a id="l00544" name="l00544"></a> 544 

<a id="l00545" name="l00545"></a> 545 client-&gt;[update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[0]._id, test.parts[0]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);

<a id="l00546" name="l00546"></a> 546 client-&gt;[update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)([dvs\_var\_type::VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958), test.vars[1]._id, test.parts[0]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);

<a id="l00547" name="l00547"></a> 547 client-&gt;[update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[0]._id, test.parts[2]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);

<a id="l00548" name="l00548"></a> 548 client-&gt;[update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)([dvs\_var\_type::VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958), test.vars[1]._id, test.parts[2]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);

<a id="l00549" name="l00549"></a> 549 

<a id="l00550" name="l00550"></a> 550 if (send_structured_parts)

<a id="l00551" name="l00551"></a> 551 {

<a id="l00552" name="l00552"></a> 552 client-&gt;[update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[0]._id, test.parts[5]._id, test.structured_nodal_scalar, test.structured_nodal_scalar_size);

<a id="l00553" name="l00553"></a> 553 client-&gt;[update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)([dvs\_var\_type::SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68), test.vars[0]._id, test.parts[6]._id, test.structured_nodal_scalar, test.structured_nodal_scalar_size);

<a id="l00554" name="l00554"></a> 554 }

<a id="l00555" name="l00555"></a> 555 }

<a id="l00556" name="l00556"></a> 556 

<a id="l00557" name="l00557"></a> 557 if (send_plots &amp;&amp; current_rank == plot_rank)

<a id="l00558" name="l00558"></a> 558 {

<a id="l00559" name="l00559"></a> 559 client-&gt;[update\_plot](class_d_v_s_1_1_i_client.xhtml#afcf7811f22d58bd328bed415116a4c41)(test.plots[0]._id, test.plot_x_values[0], test.plot_y_values[0], test.plot_num_values);

<a id="l00560" name="l00560"></a> 560 client-&gt;[update\_plot](class_d_v_s_1_1_i_client.xhtml#afcf7811f22d58bd328bed415116a4c41)(test.plots[1]._id, test.plot_x_values[1], test.plot_y_values[1], test.plot_num_values);

<a id="l00561" name="l00561"></a> 561 client-&gt;[update\_plot](class_d_v_s_1_1_i_client.xhtml#afcf7811f22d58bd328bed415116a4c41)(test.plots[2]._id, test.plot_x_values[2], test.plot_y_values[2], test.plot_num_values);

<a id="l00562" name="l00562"></a> 562 }

<a id="l00563" name="l00563"></a> 563 client-&gt;[end\_update](class_d_v_s_1_1_i_client.xhtml#a6396cc4ae967ad5f0da8e234429a97cd)();

<a id="l00564" name="l00564"></a> 564 

<a id="l00565" name="l00565"></a> 565 test_dynamic_data_free(&amp;test);

<a id="l00566" name="l00566"></a> 566 }

<a id="l00567" name="l00567"></a> 567 DVS::DESTROY_CLIENT_INSTANCE(client);

<a id="l00568" name="l00568"></a> 568 

<a id="l00569" name="l00569"></a> 569 if (start_server)

<a id="l00570" name="l00570"></a> 570 {

<a id="l00571" name="l00571"></a> 571 //If we started our own server wait for the pending timesteps to clear before tearing everything down

<a id="l00572" name="l00572"></a> 572 //in case it was writing stuff. 

<a id="l00573" name="l00573"></a> 573 

<a id="l00574" name="l00574"></a> 574 //Not waiting isn't a problem but if we had another process connecting to this

<a id="l00575" name="l00575"></a> 575 //process' server and sending data we might lose the last timestep since it won't be 

<a id="l00576" name="l00576"></a> 576 //fully complete and we would not have written it yet.

<a id="l00577" name="l00577"></a> 577 uint32_t num_pending = 1;

<a id="l00578" name="l00578"></a> 578 uint32_t num_complete = 0;

<a id="l00579" name="l00579"></a> 579 while (num_pending &gt; 0) {

<a id="l00580" name="l00580"></a> 580 [dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1) error = server-&gt;[get\_timestep\_count](class_d_v_s_1_1_i_server.xhtml#a8a5339f222bcd46b06c2fa9a474b2c37)(num_pending, num_complete);

<a id="l00581" name="l00581"></a> 581 if (error != [DVS\_NONE](dynamic__visualization__store__error__codes_8h.xhtml#a83b88ce16159d34fe5ce63e7024462a7)) break;

<a id="l00582" name="l00582"></a> 582 // Avoid burning up a CPU waiting for the I/O to complete

<a id="l00583" name="l00583"></a> 583 const uint32_t temp_delay_ms = 50;

<a id="l00584" name="l00584"></a> 584\#ifdef \_WIN32

<a id="l00585" name="l00585"></a> 585 Sleep(temp_delay_ms);

<a id="l00586" name="l00586"></a> 586\#else

<a id="l00587" name="l00587"></a> 587 usleep(temp_delay_ms * 1000);

<a id="l00588" name="l00588"></a> 588\#endif

<a id="l00589" name="l00589"></a> 589 }

<a id="l00590" name="l00590"></a> 590 }

<a id="l00591" name="l00591"></a> 591 DVS::DESTROY_SERVER_INSTANCE(server);

<a id="l00592" name="l00592"></a> 592 

<a id="l00593" name="l00593"></a> 593 return 0;

<a id="l00594" name="l00594"></a> 594}

[DVS::IClient](class_d_v_s_1_1_i_client.xhtml)

API for solvers to use to send data to EnSight servers.

**Definition:** [dvs\_client\_interface.h:81](dvs__client__interface_8h_source.xhtml#l00080)



[DVS::IClient::set\_logger](class_d_v_s_1_1_i_client.xhtml#a024475b03496bc310e211632d153517d)

virtual void set_logger(ILogger *logger)=0

Set the logger interface to use.



[DVS::IClient::update\_nodes\_structured](class_d_v_s_1_1_i_client.xhtml#a1588c437020e0ba5702ec48460a792a9)

virtual dvs_ret update_nodes_structured(uint32_t part_id, const uint32_t global_ijk_max[3], const uint32_t local_ijk_min[3], const uint32_t local_ijk_max[3], const float origin[3], const float dir_i[3], const float dir_j[3], const float dir_k[3], const float *i_vals, const float *j_vals, const float *k_vals)=0

Update the nodes for a parallelepiped structured part.



[DVS::IClient::add\_plot\_info](class_d_v_s_1_1_i_client.xhtml#a1bdb7ca9cf25c63e533f47fe26132af6)

virtual dvs_ret add_plot_info(const dvs_plot_info *plot_info, uint32_t num_plots)=0

Add plot information for session.



[DVS::IClient::set\_unit\_system](class_d_v_s_1_1_i_client.xhtml#a284f922fec402e03365c7873502d1fde)

virtual dvs_ret set_unit_system(const char *system)=0

Set the unit system we are using for this session (optional)



[DVS::IClient::update\_elements](class_d_v_s_1_1_i_client.xhtml#a41aa2ad12fbfa456f3ec8e48530ea6f6)

virtual dvs_ret update_elements(uint32_t part_id, dvs_element_type type, const uint32_t *indices, uint32_t num_indices)=0

Update elements for a specific part and element type.



[DVS::IClient::delete\_item](class_d_v_s_1_1_i_client.xhtml#a5e8f192f5c683a8265dd94020506a0aa)

virtual dvs_ret delete_item(uint32_t update_num, uint32_t rank, const char *filter)=0

Delete an item.



[DVS::IClient::add\_part\_info](class_d_v_s_1_1_i_client.xhtml#a5e9ee6af237e76a6e270d99ec8cd4388)

virtual dvs_ret add_part_info(const dvs_part_info *part_info, uint32_t num_parts)=0

Add part information for session.



[DVS::IClient::end\_update](class_d_v_s_1_1_i_client.xhtml#a6396cc4ae967ad5f0da8e234429a97cd)

virtual dvs_ret end_update()=0

Call to end the update for this timestep/rank/chunk.



[DVS::IClient::update\_elements\_polyhedral](class_d_v_s_1_1_i_client.xhtml#a7a9ccf04ed8502d23913d8eef21607ec)

virtual dvs_ret update_elements_polyhedral(uint32_t part_id, dvs_element_type type, const uint32_t *faces_per_element, uint32_t faces_per_element_size, const uint32_t *nodes_per_face, uint32_t nodes_per_face_size, const uint32_t *indices, uint32_t indices_size)=0

Update N-FACED Elements.



[DVS::IClient::add\_var\_info](class_d_v_s_1_1_i_client.xhtml#a82f841d7f6f33071bf8c709623ca215d)

virtual dvs_ret add_var_info(const dvs_var_info *var_info, uint32_t num_vars)=0

Add variable information for session.



[DVS::IClient::update\_nodes](class_d_v_s_1_1_i_client.xhtml#a87ab36c2f16d093c0beaba60da2cd661)

virtual dvs_ret update_nodes(uint32_t part_id, const float *x, const float *y, const float *z, uint32_t num_values)=0

Update nodes for a specific part.



[DVS::IClient::update\_var\_case](class_d_v_s_1_1_i_client.xhtml#a8f2e7174f9e89ef5285043dd9357f9b0)

virtual dvs_ret update_var_case(dvs_var_type var_type, uint32_t var_id, const float *values, uint32_t num_values)=0

Update case variable.



[DVS::IClient::get\_version](class_d_v_s_1_1_i_client.xhtml#aa5d98105d78c61e4e0c4043e28174fe1)

virtual const char * get_version()=0

Get the version of the client API.



[DVS::IClient::end\_init](class_d_v_s_1_1_i_client.xhtml#aaf1641a1afbf8bb6257940be28dd94b2)

virtual dvs_ret end_init()=0

Finish initialization for this rank.



[DVS::IClient::update\_var\_part](class_d_v_s_1_1_i_client.xhtml#ab18cc3827eda737ea73c31aa7fe6ef68)

virtual dvs_ret update_var_part(dvs_var_type var_type, uint32_t var_id, uint32_t part_id, const float *values, uint32_t num_values)=0

Update part vector variable.



[DVS::IClient::add\_metadata](class_d_v_s_1_1_i_client.xhtml#ab4144e59bfdcf9c095c6510c4298d160)

virtual dvs_ret add_metadata(const char *const keys[], const char *const vals[], uint32_t num_metadata_pairs)=0

Add metadata for the current dataset.



[DVS::IClient::begin\_update](class_d_v_s_1_1_i_client.xhtml#abd1cbbd2007346ad616dc74eab9d0553)

virtual dvs_ret begin_update(uint32_t update_num, uint32_t rank, uint32_t chunk, float time)=0

Method to begin an update.



[DVS::IClient::update\_elements\_polygon](class_d_v_s_1_1_i_client.xhtml#ac6b3990562f507eda4abedf53e021647)

virtual dvs_ret update_elements_polygon(uint32_t part_id, dvs_element_type type, const uint32_t *nodes_per_polygon, uint32_t nodes_per_polygon_size, const uint32_t *indices, uint32_t indices_size)=0

Update N-SIDED elements.



[DVS::IClient::update\_var\_node](class_d_v_s_1_1_i_client.xhtml#ae67a2884dd8f68f4757d8d7fac3828d3)

virtual dvs_ret update_var_node(dvs_var_type var_type, uint32_t var_id, uint32_t part_id, const float *values, uint32_t num_values)=0

Update nodal variable values.



[DVS::IClient::update\_var\_element](class_d_v_s_1_1_i_client.xhtml#aec8ed14b290237049976f68cb81b200f)

virtual dvs_ret update_var_element(dvs_element_type elem_type, dvs_var_type var_type, uint32_t var_id, uint32_t part_id, const float *values, uint32_t num_values)=0

Update elemental scalar variable values.



[DVS::IClient::update\_plot](class_d_v_s_1_1_i_client.xhtml#afcf7811f22d58bd328bed415116a4c41)

virtual dvs_ret update_plot(uint32_t plot_id, const float *x_values, const float *y_values, uint32_t num_values)=0

Update plot data for plot.



[DVS::IClient::begin\_init](class_d_v_s_1_1_i_client.xhtml#aff782ecd341fddd87a22a15107efeb3b)

virtual dvs_ret begin_init(const char *dataset_name, uint32_t current_rank, uint32_t total_ranks, uint32_t num_chunks)=0

Begins initialization for this rank.



[DVS::IServer](class_d_v_s_1_1_i_server.xhtml)

Interface class used to run a dynamic data server in a thread accepting incoming client connections.

**Definition:** [dvs\_server\_interface.h:57](dvs__server__interface_8h_source.xhtml#l00056)



[DVS::IServer::get\_uri](class_d_v_s_1_1_i_server.xhtml#a087c3fed77651e0f62d7189f44a32443)

virtual const char * get_uri()=0

Get URI of this server.



[DVS::IServer::set\_option](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c)

virtual void set_option(const char *key, const char *value)=0

Set a specific option on the server, these are used during startup See See Server Options.



[DVS::IServer::startup](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c)

virtual dvs_ret startup(uint32_t server_number, uint32_t local_ranks)=0

Start the server.



[DVS::IServer::get\_timestep\_count](class_d_v_s_1_1_i_server.xhtml#a8a5339f222bcd46b06c2fa9a474b2c37)

virtual dvs_ret get_timestep_count(uint32_t &amp;num_pending, uint32_t &amp;num_complete) const =0

return the current number of pending and complete timesteps in the server



[dvs\_client\_interface.h](dvs__client__interface_8h.xhtml)

C++ Client API for using the Dynamic Visualization Store.



[dvs\_server\_interface.h](dvs__server__interface_8h.xhtml)

C++ Server API for using Dynamic Visualization Store Server.



[dynamic\_visualization\_store\_enums.h](dynamic__visualization__store__enums_8h.xhtml)

Contains enums used in C/C++ API.



[dvs\_log\_flags](dynamic__visualization__store__enums_8h.xhtml#a9bca12092877a90e6c497994093a8609)

dvs_log_flags

Flags to control logging filters.

**Definition:** [dynamic\_visualization\_store\_enums.h:67](dynamic__visualization__store__enums_8h_source.xhtml#l00066)



[LOG\_UPDATE\_BEG\_END](dynamic__visualization__store__enums_8h.xhtml#a9bca12092877a90e6c497994093a8609a1a3a1b2a98f96b6de074cd9ae93805bb)

@ LOG_UPDATE_BEG_END

Log messages related to begin and end of updates.

**Definition:** [dynamic\_visualization\_store\_enums.h:71](dynamic__visualization__store__enums_8h_source.xhtml#l00071)



[LOG\_ALL](dynamic__visualization__store__enums_8h.xhtml#a9bca12092877a90e6c497994093a8609a87cff070224b283d7aace436723245fc)

@ LOG_ALL

Log all messages.

**Definition:** [dynamic\_visualization\_store\_enums.h:72](dynamic__visualization__store__enums_8h_source.xhtml#l00073)



[dvs\_client\_flags](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9f)

dvs_client_flags

Flags for specific server setup.

**Definition:** [dynamic\_visualization\_store\_enums.h:55](dynamic__visualization__store__enums_8h_source.xhtml#l00054)



[DEDUP](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9fa81b113ffc96eb6d968a19950727c0ff9)

@ DEDUP

Do not send duplicate data to server.

**Definition:** [dynamic\_visualization\_store\_enums.h:58](dynamic__visualization__store__enums_8h_source.xhtml#l00058)



[BLOCK\_FOR\_SERVER](dynamic__visualization__store__enums_8h.xhtml#aec8cbac60b9cafe5d1c0ad6593f05e9fa9feb185df8061416aa9a23b0150dc821)

@ BLOCK_FOR_SERVER

Clients should block for servers to be initialized before sending data.

**Definition:** [dynamic\_visualization\_store\_enums.h:57](dynamic__visualization__store__enums_8h_source.xhtml#l00057)



[VECTOR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a1a85ef13eaa80e8561743892f9dba958)

@ VECTOR

XYZ Coordinates.

**Definition:** [dynamic\_visualization\_store\_enums.h:32](dynamic__visualization__store__enums_8h_source.xhtml#l00032)



[SCALAR](dynamic__visualization__store__enums_8h.xhtml#af6aa6351345da4151507012681b3aff0a7efbb6cac96595e63e8fa171bde1eb68)

@ SCALAR

Scalar.

**Definition:** [dynamic\_visualization\_store\_enums.h:31](dynamic__visualization__store__enums_8h_source.xhtml#l00031)



[dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1)

int32_t dvs_ret

Return value of methods, TODO.

**Definition:** [dynamic\_visualization\_store\_error\_codes.h:32](dynamic__visualization__store__error__codes_8h_source.xhtml#l00032)



[DVS\_NONE](dynamic__visualization__store__error__codes_8h.xhtml#a83b88ce16159d34fe5ce63e7024462a7)

\#define DVS_NONE

No detected error has occurred.

**Definition:** [dynamic\_visualization\_store\_error\_codes.h:99](dynamic__visualization__store__error__codes_8h_source.xhtml#l00099)



[main](test__dvs__client__cxx_8cpp.xhtml#a3c04138a5bfe5d72780bb7e82a18e627)

int main(int argc, char **argv)

Main method of test client application.

**Definition:** [test\_dvs\_client\_cxx.cpp:56](test__dvs__client__cxx_8cpp_source.xhtml#l00056)