test_dvs_client
Last update: 16.07.2025
Go to the documentation of this file.
258 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]);
264 fprintf(stderr, " -d delay Number of milliseconds to delay between timestep pushes. Default: %u\n", msec_delay);
265 fprintf(stderr, " -s dx dy dz Size of 3D hex grid (width height depth) Default: %u %u %u\n", width, height, depth);
266 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);
270 fprintf(stderr, " -nodedup Do not de-duplicate data on the client side Default: deduplicate\n");
272 fprintf(stderr, " -secret string Shared secret to use when talking with server Default: no shared secret\n");
273 fprintf(stderr, " -structured Turn on sending structured part data Default: Don't send structured part data\n");
274 fprintf(stderr, " -plot_rank Set the rank which should send plot data to EnSight (zero based) Default: %u\n", plot_rank);
275 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");
276 fprintf(stderr, " -cache_uri str The URI for the server to use for the cache. Default: No cache\n");
277 fprintf(stderr, " -all_defs Send all part/var definitions no matter the current rank. Default: No\n");
278 fprintf(stderr, " -log_all Print out all client logging information\n. Default: No client logs");
286 fprintf(stderr, " -test_delete Test deleting all timesteps before each update Default: Do not test\n");
323 fprintf(stderr, "Client Flags: Blocking: %d, Dedup: %u\n", (BLOCK_FOR_SERVER & flags) > 0, (DEDUP & flags) > 0);
334 if (strlen(dvs_file_loc) > 0) dvs_server_set_option(server_id, "DVS_FILE_LOCATION", dvs_file_loc);
369 fprintf(stderr, "This pseudo client code relies on part infos == 7 and var infos == 9, needs modified otherwise\n");
380 if (send_plots && current_rank == plot_rank) dvs_add_plot_info(session_id, test.plots, plot_info_num);
384 //If one rank or two ranks and first rank send everything (tests second rank having no definitions)
486 fprintf(stderr, "Rank: %i of %i Sending Timestep: %i of %i\n", (current_rank), total_ranks, (i), max_timesteps-1);
530 if (send_hex_elems) dvs_update_nodes(session_id, test.parts[0]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
531 if (send_pnt_elems) dvs_update_nodes(session_id, test.parts[1]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
532 if (send_nfaced_elems) dvs_update_nodes(session_id, test.parts[2]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
533 if (send_tri_quad_elems) dvs_update_nodes(session_id, test.parts[3]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
534 if (send_nsided_elems) dvs_update_nodes(session_id, test.parts[4]._id, test.polymesh_x_coords, test.polymesh_y_coords, test.polymesh_z_coords, test.polymesh_coords_size);
540 dvs_update_elements(session_id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_coords, test.mesh_hex_elem_coords_size);
543 dvs_update_elements(session_id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_coords, test.mesh_hex_ghost_elem_coords_size);
594 if (send_pnt_elems) dvs_update_elements(session_id, test.parts[1]._id, PNT, test.mesh_point_elem_coords, test.mesh_point_elem_coords_size);
598 dvs_update_elements(session_id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_coords, test.mesh_quad_elem_coords_size);
599 dvs_update_elements(session_id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_coords, test.mesh_tri_elem_coords_size);
607 dvs_update_var_part_scalar(session_id, test.vars[4]._id, test.parts[0]._id, test.part_scalar[0]);
608 dvs_update_var_part_scalar(session_id, test.vars[4]._id, test.parts[1]._id, test.part_scalar[1]);
609 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);
610 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);
613 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[2]._id, CONVEX_POLYHEDRON, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);
614 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[2]._id, CONVEX_POLYHEDRON, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);
618 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[5]._id, STRUCTURED, test.structured_elem_var_scalar, test.structured_elem_var_scalar_size);
619 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[5]._id, STRUCTURED, test.structured_elem_var_scalar_rank, test.structured_elem_var_scalar_rank_size);
621 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[6]._id, STRUCTURED, test.structured_elem_var_scalar, test.structured_elem_var_scalar_size);
622 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[6]._id, STRUCTURED, test.structured_elem_var_scalar_rank, test.structured_elem_var_scalar_rank_size);
626 dvs_update_var_element_scalar(session_id, DVS_STRUCTURED_GHOST_ELEMENTS, test.parts[5]._id, STRUCTURED, test.structured_elem_ghosts, test.structured_elem_ghosts_size);
627 dvs_update_var_element_scalar(session_id, DVS_STRUCTURED_GHOST_ELEMENTS, test.parts[6]._id, STRUCTURED, test.structured_elem_ghosts, test.structured_elem_ghosts_size);
633 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);
635 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[2]._id, CONVEX_POLYHEDRON_GHOST, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);
639 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);
641 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[2]._id, CONVEX_POLYHEDRON_GHOST, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);
644 if (send_pnt_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[1]._id, PNT, test.mesh_point_elem_var_rank_scalar, test.mesh_point_elem_var_rank_scalar_size);
646 if (send_nfaced_elems) dvs_update_var_element_vector(session_id, test.vars[3]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_vector, test.mesh_hex_elem_var_vector_size);
649 if (send_nfaced_elems) dvs_update_var_element_vector(session_id, test.vars[3]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_vector, test.mesh_hex_ghost_elem_var_vector_size);
654 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar, test.mesh_quad_elem_var_scalar_size);
655 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_rank_scalar, test.mesh_quad_elem_var_rank_scalar_size);
658 dvs_update_var_element_scalar_int64(session_id, test.vars[7]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar_int64, test.mesh_quad_elem_var_scalar_int64_size);
660 dvs_update_var_element_scalar_int64(session_id, DVS_ELEMENT_ID, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar_int64, test.mesh_quad_elem_var_scalar_int64_size);
662 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar, test.mesh_tri_elem_var_scalar_size);
663 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_rank_scalar, test.mesh_tri_elem_var_rank_scalar_size);
666 dvs_update_var_element_scalar_int64(session_id, test.vars[7]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar_int64, test.mesh_tri_elem_var_scalar_int64_size);
668 dvs_update_var_element_scalar_int64(session_id, DVS_ELEMENT_ID, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar_int64, test.mesh_tri_elem_var_scalar_int64_size);
672 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[0]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);
673 dvs_update_var_node_vector(session_id, test.vars[1]._id, test.parts[0]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);
674 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[2]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);
675 dvs_update_var_node_vector(session_id, test.vars[1]._id, test.parts[2]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);
678 dvs_update_var_node_scalar_int64(session_id, test.vars[8]._id, test.parts[0]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
679 dvs_update_var_node_scalar_int64(session_id, test.vars[8]._id, test.parts[2]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
682 dvs_update_var_node_scalar_int64(session_id, DVS_NODE_ID, test.parts[0]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
683 dvs_update_var_node_scalar_int64(session_id, DVS_NODE_ID, test.parts[2]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
688 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[5]._id, test.structured_nodal_scalar, test.structured_nodal_scalar_size);
689 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[6]._id, test.structured_nodal_scalar, test.structured_nodal_scalar_size);
692 dvs_update_var_node_scalar(session_id, DVS_STRUCTURED_IBLANKED_NODES, test.parts[5]._id, test.structured_nodal_iblanked, test.structured_nodal_iblanked_size);
693 dvs_update_var_node_scalar(session_id, DVS_STRUCTURED_IBLANKED_NODES, test.parts[6]._id, test.structured_nodal_iblanked, test.structured_nodal_iblanked_size);
700 dvs_update_plot(session_id, test.plots[0]._id, test.plot_x_values[0], test.plot_y_values[0], test.plot_num_values);
701 dvs_update_plot(session_id, test.plots[1]._id, test.plot_x_values[1], test.plot_y_values[1], test.plot_num_values);
702 dvs_update_plot(session_id, test.plots[2]._id, test.plot_x_values[2], test.plot_y_values[2], test.plot_num_values);
711 dvs_convert_rotation_to_quaternion(session_id, axisStart, axisEnd, relative_rotation_angle, quaternion);
740 if (send_plots && current_rank == plot_rank) dvs_add_plot_info(session_id, test.plots, plot_info_num);
741 if (send_plots && current_rank == plot_rank && reinit_plots) dvs_add_plot_info(session_id, test.reinit_plots, reinit_iter+1);
747 //If one rank or two ranks and first rank send everything (tests second rank having no definitions)
755 if (send_vars && reinit_vars) dvs_add_var_info(session_id, test.reinit_part_vars, reinit_iter+1);
781 if (send_vars && reinit_vars) dvs_add_var_info(session_id, test.reinit_part_vars, reinit_iter+1);
796 if (send_vars && reinit_vars && reinit_iter >= 0) dvs_add_var_info(session_id, &test.reinit_part_vars[0], 1);
806 if (send_vars && reinit_vars && reinit_iter >= 1) dvs_add_var_info(session_id, &test.reinit_part_vars[1], 1);
816 if (send_vars && reinit_vars && reinit_iter >= 2) dvs_add_var_info(session_id, &test.reinit_part_vars[2], 1);
828 for (uint32_t i = max_timesteps + (reinit_iter * reinit_num_timesteps); i < max_timesteps + ((reinit_iter+1) * reinit_num_timesteps); i++)
855 if (send_hex_elems) dvs_update_nodes(session_id, test.parts[0]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
856 if (send_pnt_elems) dvs_update_nodes(session_id, test.parts[1]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
857 if (send_nfaced_elems) dvs_update_nodes(session_id, test.parts[2]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
858 if (send_tri_quad_elems) dvs_update_nodes(session_id, test.parts[3]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
859 if (send_nsided_elems) dvs_update_nodes(session_id, test.parts[4]._id, test.polymesh_x_coords, test.polymesh_y_coords, test.polymesh_z_coords, test.polymesh_coords_size);
865 dvs_update_elements(session_id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_coords, test.mesh_hex_elem_coords_size);
868 dvs_update_elements(session_id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_coords, test.mesh_hex_ghost_elem_coords_size);
919 if (send_pnt_elems) dvs_update_elements(session_id, test.parts[1]._id, PNT, test.mesh_point_elem_coords, test.mesh_point_elem_coords_size);
923 dvs_update_elements(session_id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_coords, test.mesh_quad_elem_coords_size);
924 dvs_update_elements(session_id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_coords, test.mesh_tri_elem_coords_size);
932 if (reinit_vars && reinit_iter >= 0) dvs_update_var_case_scalar(session_id, test.reinit_case_vars[0]._id, (test.case_var_value*-1.f));
933 if (reinit_vars && reinit_iter >= 1) dvs_update_var_case_scalar(session_id, test.reinit_case_vars[1]._id, (test.case_var_value*-1.f)-10.f);
934 if (reinit_vars && reinit_iter >= 2) dvs_update_var_case_scalar(session_id, test.reinit_case_vars[2]._id, (test.case_var_value*-1.f)-20.f);
935 dvs_update_var_part_scalar(session_id, test.vars[4]._id, test.parts[0]._id, test.part_scalar[0]);
936 dvs_update_var_part_scalar(session_id, test.vars[4]._id, test.parts[1]._id, test.part_scalar[1]);
937 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);
938 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);
941 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[2]._id, CONVEX_POLYHEDRON, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);
942 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[2]._id, CONVEX_POLYHEDRON, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);
946 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);
948 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[2]._id, CONVEX_POLYHEDRON_GHOST, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);
952 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);
954 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[2]._id, CONVEX_POLYHEDRON_GHOST, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);
957 if (send_pnt_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[1]._id, PNT, test.mesh_point_elem_var_rank_scalar, test.mesh_point_elem_var_rank_scalar_size);
959 if (send_nfaced_elems) dvs_update_var_element_vector(session_id, test.vars[3]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_vector, test.mesh_hex_elem_var_vector_size);
962 if (send_nfaced_elems) dvs_update_var_element_vector(session_id, test.vars[3]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_vector, test.mesh_hex_ghost_elem_var_vector_size);
967 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar, test.mesh_quad_elem_var_scalar_size);
968 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_rank_scalar, test.mesh_quad_elem_var_rank_scalar_size);
971 dvs_update_var_element_scalar_int64(session_id, test.vars[7]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar_int64, test.mesh_quad_elem_var_scalar_int64_size);
973 dvs_update_var_element_scalar_int64(session_id, DVS_ELEMENT_ID, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar_int64, test.mesh_quad_elem_var_scalar_int64_size);
975 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar, test.mesh_tri_elem_var_scalar_size);
976 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_rank_scalar, test.mesh_tri_elem_var_rank_scalar_size);
980 dvs_update_var_element_scalar_int64(session_id, test.vars[7]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar_int64, test.mesh_tri_elem_var_scalar_int64_size);
982 dvs_update_var_element_scalar_int64(session_id, DVS_ELEMENT_ID, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar_int64, test.mesh_tri_elem_var_scalar_int64_size);
986 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[0]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);
987 dvs_update_var_node_vector(session_id, test.vars[1]._id, test.parts[0]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);
988 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[2]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);
989 dvs_update_var_node_vector(session_id, test.vars[1]._id, test.parts[2]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);
992 dvs_update_var_node_scalar_int64(session_id, test.vars[8]._id, test.parts[0]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
993 dvs_update_var_node_scalar_int64(session_id, test.vars[8]._id, test.parts[2]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
996 dvs_update_var_node_scalar_int64(session_id, DVS_NODE_ID, test.parts[0]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
997 dvs_update_var_node_scalar_int64(session_id, DVS_NODE_ID, test.parts[2]._id, test.mesh_node_var_scalar_int64, test.mesh_node_var_scalar_int64_size);
1003 dvs_update_plot(session_id, test.plots[0]._id, test.plot_x_values[0], test.plot_y_values[0], test.plot_num_values);
1004 dvs_update_plot(session_id, test.plots[1]._id, test.plot_x_values[1], test.plot_y_values[1], test.plot_num_values);
1005 dvs_update_plot(session_id, test.plots[2]._id, test.plot_x_values[2], test.plot_y_values[2], test.plot_num_values);
1006 if (reinit_plots && reinit_iter >= 0) dvs_update_plot(session_id, test.reinit_plots[0]._id, test.plot_x_values[0], test.plot_y_values[0], test.plot_num_values);
1007 if (reinit_plots && reinit_iter >= 1) dvs_update_plot(session_id, test.reinit_plots[1]._id, test.plot_x_values[1], test.plot_y_values[1], test.plot_num_values);
1008 if (reinit_plots && reinit_iter >= 2) dvs_update_plot(session_id, test.reinit_plots[2]._id, test.plot_x_values[2], test.plot_y_values[2], test.plot_num_values);
1075 for (uint32_t i = max_timesteps + (reinit_iter * reinit_num_timesteps); i < max_timesteps + ((reinit_iter+1) * reinit_num_timesteps); i++)
1102 if (send_hex_elems) dvs_update_nodes(session_id, test.parts[0]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
1103 if (send_pnt_elems) dvs_update_nodes(session_id, test.parts[1]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
1104 if (send_nfaced_elems) dvs_update_nodes(session_id, test.parts[2]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
1105 if (send_tri_quad_elems) dvs_update_nodes(session_id, test.parts[3]._id, test.mesh_x_coords, test.mesh_y_coords, test.mesh_z_coords, test.mesh_coords_size);
1106 if (send_nsided_elems) dvs_update_nodes(session_id, test.parts[4]._id, test.polymesh_x_coords, test.polymesh_y_coords, test.polymesh_z_coords, test.polymesh_coords_size);
1112 dvs_update_elements(session_id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_coords, test.mesh_hex_elem_coords_size);
1115 dvs_update_elements(session_id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_coords, test.mesh_hex_ghost_elem_coords_size);
1166 if (send_pnt_elems) dvs_update_elements(session_id, test.parts[1]._id, PNT, test.mesh_point_elem_coords, test.mesh_point_elem_coords_size);
1170 dvs_update_elements(session_id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_coords, test.mesh_quad_elem_coords_size);
1171 dvs_update_elements(session_id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_coords, test.mesh_tri_elem_coords_size);
1178 if (send_case_vars) dvs_update_var_case_scalar(session_id, test.vars[6]._id, test.case_var_value);
1179 if (send_case_vars && reinit_vars && reinit_iter >= 0) dvs_update_var_case_scalar(session_id, test.reinit_case_vars[0]._id, (test.case_var_value*-1.f));
1180 if (send_case_vars && reinit_vars && reinit_iter >= 1) dvs_update_var_case_scalar(session_id, test.reinit_case_vars[1]._id, (test.case_var_value*-1.f)-10.f);
1181 if (send_case_vars && reinit_vars && reinit_iter >= 2) dvs_update_var_case_scalar(session_id, test.reinit_case_vars[2]._id, (test.case_var_value*-1.f)-20.f);
1182 dvs_update_var_part_scalar(session_id, test.vars[4]._id, test.parts[0]._id, test.part_scalar[0]);
1183 dvs_update_var_part_scalar(session_id, test.vars[4]._id, test.parts[1]._id, test.part_scalar[1]);
1184 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);
1185 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);
1188 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[2]._id, CONVEX_POLYHEDRON, test.mesh_hex_elem_var_scalar, test.mesh_hex_elem_var_scalar_size);
1189 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[2]._id, CONVEX_POLYHEDRON, test.mesh_hex_elem_var_rank_scalar, test.mesh_hex_elem_var_rank_scalar_size);
1193 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);
1195 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[2]._id, CONVEX_POLYHEDRON_GHOST, test.mesh_hex_ghost_elem_var_scalar, test.mesh_hex_ghost_elem_var_scalar_size);
1199 if (send_hex_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);
1201 if (send_nfaced_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[2]._id, CONVEX_POLYHEDRON_GHOST, test.mesh_hex_ghost_elem_var_rank_scalar, test.mesh_hex_ghost_elem_var_rank_scalar_size);
1204 if (send_pnt_elems) dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[1]._id, PNT, test.mesh_point_elem_var_rank_scalar, test.mesh_point_elem_var_rank_scalar_size);
1206 if (send_nfaced_elems) dvs_update_var_element_vector(session_id, test.vars[3]._id, test.parts[0]._id, HEXAHEDRON, test.mesh_hex_elem_var_vector, test.mesh_hex_elem_var_vector_size);
1209 if (send_nfaced_elems) dvs_update_var_element_vector(session_id, test.vars[3]._id, test.parts[0]._id, HEXAHEDRON_GHOST, test.mesh_hex_ghost_elem_var_vector, test.mesh_hex_ghost_elem_var_vector_size);
1214 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_scalar, test.mesh_quad_elem_var_scalar_size);
1215 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[3]._id, QUADRANGLE, test.mesh_quad_elem_var_rank_scalar, test.mesh_quad_elem_var_rank_scalar_size);
1216 dvs_update_var_element_scalar(session_id, test.vars[2]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_scalar, test.mesh_tri_elem_var_scalar_size);
1217 dvs_update_var_element_scalar(session_id, test.vars[5]._id, test.parts[3]._id, TRIANGLE, test.mesh_tri_elem_var_rank_scalar, test.mesh_tri_elem_var_rank_scalar_size);
1220 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[0]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);
1221 dvs_update_var_node_vector(session_id, test.vars[1]._id, test.parts[0]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);
1222 dvs_update_var_node_scalar(session_id, test.vars[0]._id, test.parts[2]._id, test.mesh_node_var_scalar, test.mesh_node_var_scalar_size);
1223 dvs_update_var_node_vector(session_id, test.vars[1]._id, test.parts[2]._id, test.mesh_node_var_vector, test.mesh_node_var_vector_size);
1228 dvs_update_plot(session_id, test.plots[0]._id, test.plot_x_values[0], test.plot_y_values[0], test.plot_num_values);
1229 dvs_update_plot(session_id, test.plots[1]._id, test.plot_x_values[1], test.plot_y_values[1], test.plot_num_values);
1230 dvs_update_plot(session_id, test.plots[2]._id, test.plot_x_values[2], test.plot_y_values[2], test.plot_num_values);
1231 if (reinit_plots && reinit_iter >= 0) dvs_update_plot(session_id, test.reinit_plots[0]._id, test.plot_x_values[0], test.plot_y_values[0], test.plot_num_values);
1232 if (reinit_plots && reinit_iter >= 1) dvs_update_plot(session_id, test.reinit_plots[1]._id, test.plot_x_values[1], test.plot_y_values[1], test.plot_num_values);
1233 if (reinit_plots && reinit_iter >= 2) dvs_update_plot(session_id, test.reinit_plots[2]._id, test.plot_x_values[2], test.plot_y_values[2], test.plot_num_values);
C API for using Dynamic Visualization Store.
DVS_DLL_EXPORT dvs_ret dvs_update_var_element_scalar_int64(int32_t session_id, uint32_t var_id, uint32_t part_id, enum dvs_element_type type, const int64_t *scalars, uint32_t num_vals)
Update a field of int64 scalars on elements.
DVS_DLL_EXPORT dvs_ret dvs_update_elements(int32_t session_id, uint32_t part_id, enum dvs_element_type type, const uint32_t *indices, uint32_t num_indices)
Update elements for a specific part and element type.
DVS_DLL_EXPORT dvs_ret dvs_server_create(const char *server_uri, int32_t *server_id)
Create a Dynamic Visualization Store server instance for the client to connect.
DVS_DLL_EXPORT dvs_ret dvs_add_var_info(int32_t session_id, const struct dvs_var_info *vars, uint32_t num_vars)
Add var info for simulation.
DVS_DLL_EXPORT dvs_ret dvs_update_nodes_parallelepiped(int32_t session_id, 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)
Update the nodes for a parallelepiped structured part.
DVS_DLL_EXPORT dvs_ret dvs_server_get_uri(int32_t server_id, char *uri, uint32_t *size)
Return the URI of the requested server.
DVS_DLL_EXPORT dvs_ret dvs_set_unit_system(int32_t session_id, const char *system)
Set a unit system (optional but recommended)
DVS_DLL_EXPORT dvs_ret dvs_convert_rotation_to_quaternion(int32_t session_id, const float *axis_start, const float *axis_end, float relative_rotation_angle, float *quaternion)
Utility API to convert a rigid body rotation described by the rotation axis and the angle of rotation...
DVS_DLL_EXPORT dvs_ret dvs_print_stats(int32_t session_id)
This will be deprecated, just placeholder for printing out stats that the client is collecting for pr...
DVS_DLL_EXPORT dvs_ret dvs_begin_init(int32_t session_id, const char *dataset_name, uint32_t current_rank, uint32_t total_ranks, uint32_t num_chunks)
begin setup of rank
DVS_DLL_EXPORT dvs_ret dvs_update_plot(int32_t session_id, uint32_t plot_id, const float *x_values, const float *y_values, uint32_t num_values)
Update the data for a plot.
DVS_DLL_EXPORT dvs_ret dvs_add_part_info(int32_t session_id, const struct dvs_part_info *parts, uint32_t num_parts)
Add part info for simulation.
DVS_DLL_EXPORT dvs_ret dvs_delete_item(int32_t session_id, uint32_t update_num, uint32_t rank, const char *filter)
Delete an item.
DVS_DLL_EXPORT uint32_t dvs_get_num_part_info(int32_t session_id)
Get the number of dvs_part_info objects for this client session.
DVS_DLL_EXPORT const struct dvs_part_info * dvs_get_part_info(int32_t session_id, uint32_t index)
Get the dvs_part_info object for this index.
DVS_DLL_EXPORT dvs_ret dvs_update_elements_polygon(int32_t session_id, uint32_t part_id, enum dvs_element_type type, const uint32_t *nodes_per_polygon, uint32_t nodes_per_polygon_size, const uint32_t *indices, uint32_t indices_size)
Update N-SIDED elements.
DVS_DLL_EXPORT dvs_ret dvs_update_var_node_scalar_int64(int32_t session_id, uint32_t var_id, uint32_t part_id, const int64_t *scalars, uint32_t num_vals)
Update a field of int64 scalars on nodes.
DVS_DLL_EXPORT dvs_ret dvs_update_nodes(int32_t session_id, uint32_t part_id, const float *x, const float *y, const float *z, uint32_t num_values)
Update nodes for a specific part.
DVS_DLL_EXPORT void dvs_shutdown()
Shuts down the api, performing any necessary cleanup, also calls dvs_server_shutdown_all() if any ser...
DVS_DLL_EXPORT dvs_ret dvs_update_var_part_scalar(int32_t session_id, uint32_t var_id, uint32_t part_id, float scalar)
Update value of part scalar.
DVS_DLL_EXPORT const struct dvs_var_info * dvs_get_var_info(int32_t session_id, uint32_t index)
Get the dvs_var_info object for this index.
DVS_DLL_EXPORT dvs_ret dvs_update_var_node_vector(int32_t session_id, uint32_t var_id, uint32_t part_id, const float *values, uint32_t num_values)
Update a field of vectors on nodes.
DVS_DLL_EXPORT uint32_t dvs_get_num_plot_info(int32_t session_id)
Get the number of dvs_plot_info objects for this client session.
DVS_DLL_EXPORT dvs_ret dvs_server_start(int32_t server_id, uint32_t server_number, uint32_t local_ranks)
Start a Dynamic Visualization Store server in a separate thread to receive data from solver node.
DVS_DLL_EXPORT dvs_ret dvs_begin_update(int32_t session_id, uint32_t update_num, uint32_t rank, uint32_t chunk, float time)
Method to begin an update.
DVS_DLL_EXPORT dvs_ret dvs_update_var_element_scalar(int32_t session_id, uint32_t var_id, uint32_t part_id, enum dvs_element_type type, const float *scalars, uint32_t num_vals)
Update a field of scalars on elements.
DVS_DLL_EXPORT dvs_ret dvs_add_part_rigid_body_motion(int32_t session_id, uint32_t update_num, uint32_t part_id, const float *quaternion, const float *displacement, const float *cg_offset)
Add rigid body motion data to a specific part for a specific update. Any non-needed input can be set ...
DVS_DLL_EXPORT const char * dvs_get_version()
Get the current version of the built library.
DVS_DLL_EXPORT dvs_ret dvs_connect(int32_t server_id, enum dvs_client_flags flags, const char *secret, int32_t *session_id)
Connect to dvs server.
DVS_DLL_EXPORT const struct dvs_plot_info * dvs_get_plot_info(int32_t session_id, uint32_t index)
Get the dvs_plot_info object for this index.
DVS_DLL_EXPORT dvs_ret dvs_end_init(int32_t session_id)
end the initialization of the rank
DVS_DLL_EXPORT dvs_ret dvs_add_metadata(int32_t session_id, const char *const metadata_keys[], const char *const metadata_vals[], uint32_t num_metadata_pairs)
Add metadata for the current dataset.
DVS_DLL_EXPORT uint32_t dvs_get_num_var_info(int32_t session_id)
Get the number of dvs_var_info objects for this client session.
DVS_DLL_EXPORT dvs_ret dvs_update_var_case_scalar(int32_t session_id, uint32_t var_id, float scalar)
Update value of case scalar.
DVS_DLL_EXPORT dvs_ret dvs_server_timestep_count(int32_t server_id, uint32_t *num_pending, uint32_t *num_complete)
Query a Dynamic Visualization Store server as to the number of timesteps it contains.
DVS_DLL_EXPORT dvs_ret dvs_register_log_func(int32_t session_id, void *user_data, dvs_log_func func, enum dvs_log_flags flags)
Register logging function for client to call (optional but recommended)
DVS_DLL_EXPORT dvs_ret dvs_end_update(int32_t session_id)
Call to end the update for this timestep/rank/chunk.
DVS_DLL_EXPORT dvs_ret dvs_server_set_option(int32_t server_id, const char *key, const char *value)
Add an option to the server.
DVS_DLL_EXPORT dvs_ret dvs_update_var_node_scalar(int32_t session_id, uint32_t var_id, uint32_t part_id, const float *scalars, uint32_t num_vals)
Update a field of scalars on nodes.
DVS_DLL_EXPORT dvs_ret dvs_update_var_element_vector(int32_t session_id, uint32_t var_id, uint32_t part_id, enum dvs_element_type type, const float *values, uint32_t num_values)
Update a field of vectors on elements.
DVS_DLL_EXPORT dvs_ret dvs_update_nodes_curvilinear(int32_t session_id, 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 *x_vals, const float *y_vals, const float *z_vals)
Update the nodes for a curvilinear structured part.
DVS_DLL_EXPORT dvs_ret dvs_add_plot_info(int32_t session_id, const struct dvs_plot_info *plots, uint32_t num_plots)
Add plot info for simulation.
DVS_DLL_EXPORT dvs_ret dvs_update_elements_polyhedral(int32_t session_id, uint32_t part_id, enum 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)
Update N-FACED Elements.
Contains enums used in C/C++ API.
#define DVS_STRUCTURED_GHOST_ELEMENTS
Definition dynamic_visualization_store_enums.h:117
@ LOG_UPDATE_BEG_END
Log messages related to begin and end of updates.
Definition dynamic_visualization_store_enums.h:71
#define DVS_STRUCTURED_IBLANKED_NODES
Definition dynamic_visualization_store_enums.h:115
@ BEGIN_INIT_WAIT_ON_REINIT
Blocking wait on reinitialization to complete before reinitializing again.
Definition dynamic_visualization_store_enums.h:59
@ BLOCK_FOR_SERVER
Clients should block for servers to be initialized before sending data.
Definition dynamic_visualization_store_enums.h:57
int32_t dvs_ret
Return value of methods, TODO.
Definition dynamic_visualization_store_error_codes.h:32
#define DVS_NONE
No detected error has occurred.
Struct holding information for a part's definition.
Definition dynamic_visualization_store_api.h:77
char * _name
UTF-8 Compatible name of part [null terminated], max name length visible in GUI == 79,...
Definition dynamic_visualization_store_api.h:79
Struct holding information for a plot's definition.
Definition dynamic_visualization_store_api.h:109
char * _name
UTF-8 Compatible name for plot, must be unique from other plot names.
Definition dynamic_visualization_store_api.h:111
Struct holding information for a variable's definiton.
Definition dynamic_visualization_store_api.h:92
char * _name
UTF-8 Compatible name of variable [null terminated], max name length visible in the GUI == 49,...
Definition dynamic_visualization_store_api.h:94
int main(int argc, char **argv)
Main method of test client application.
Definition test_dvs_client.c:56