1 /*--------------------------------------------------------------*/
2 /* Prototype Header file for EnSight External Reader */
3 /* DSO Library Routines */
5 /* intended to be included from global_extern.h only */
6 /*--------------------------------------------------------------*/
7 /* *************************************************************
8 * Copyright 1998 Computational Engineering International, Inc.
11 * Restricted Rights Legend
13 * Use, duplication, or disclosure of this
14 * software and its documentation by the
15 * Government is subject to restrictions as
16 * set forth in subdivision [(b)(3)(ii)] of
17 * the Rights in Technical Data and Computer
18 * Software clause at 52.227-7013.
19 * *************************************************************
21 #ifndef GLOBAL_EXTERN_PROTO_H
22 #define GLOBAL_EXTERN_PROTO_H
27 #define W32IMPORT __declspec( dllimport )
28 #define W32EXPORT __declspec( dllexport )
30 #define W32IMPORT extern
31 #define W32EXPORT extern
34 /*----------------------
35 * Same in All Versions
36 *----------------------*/
38 USERD_get_number_of_model_parts( void );
41 USERD_get_block_coords_by_component(int block_number
,
46 USERD_get_block_iblanking(int block_number
,
50 USERD_get_block_scalar_values(int block_number
,
55 USERD_get_block_vector_values_by_component(int block_number
,
61 USERD_get_name_of_reader(char reader_name
[Z_MAX_USERD_NAME
],
65 * This mechanism is used to mark the fact that a given
66 * reader cannot be unloaded. We set this by default for
67 * C++ based readers as there are known issues with unloading
68 * a C++ DLL on certain platforms (Linux).
71 USERD_reader_unloadable(void);
75 * Define a macro that defines the cpp function as part of the
76 * USERD_get_name_of_reader declaration
78 #ifndef NO_AUTO_UNLOADABLE_CODE
80 #if defined(LINUX) || defined(SGI)
82 #define USERD_get_name_of_reader \
83 USERD_reader_unloadable(void) { return(0); } \
84 int USERD_get_name_of_reader
93 USERD_get_reader_descrip(char descrip
[Z_MAXFILENP
]);
96 USERD_set_filenames(char filename_1
[],
102 USERD_get_number_of_files_in_dataset( void );
105 USERD_get_dataset_query_file_info(Z_QFILES
*qfiles
);
108 USERD_get_changing_geometry_status( void );
111 USERD_get_node_label_status( void );
114 USERD_get_element_label_status( void );
117 USERD_get_number_of_variables( void );
120 USERD_stop_part_building( void );
123 USERD_bkup(FILE *archive_file
,
126 /* -----------------------------------
127 * Optional routine allows getting data
128 * from the reader to modify server/client behavior
129 * ------------------------------------ */
131 USERD_get_extra_data(int *target
,
132 int *nints
, int *nflts
, int *nchrs
,
133 int *pints
, float *pflts
, char *pchrs
);
135 /* ----------------------------
136 * Extra "Before" GUI stuff available for all versions of API
137 * Note: this API suite is entirely optional...
138 * --------------------------- */
139 W32EXPORT
void USERD_get_extra_gui_numbers(
145 W32EXPORT
int USERD_get_extra_gui_defaults(
146 char **toggle_Title
, /* [num_toggles][Z_LEN_GUI_TITLE_STR] */
147 int *toggle_default_status
, /* [num_toggles] */
148 char **pulldown_Title
, /* [num_pulldowns][Z_LEN_GUI_TITLE_STR] */
149 int *pulldown_number_in_list
, /* [num_pulldowns] */
150 int *pulldown_default_selection
, /* [num_pulldowns] */
151 char ***pulldown_item_strings
, /* [num_pulldowns][Z_MAX_NUM_GUI_PULL_ITEMS][Z_LEN_GUI_PULL_STR] */
152 char **field_Title
, /* [num_fields][Z_LEN_GUI_TITLE_STR] */
153 char **field_user_string
/* [num_fields][Z_LEN_GUI_FIELD_STR] */
156 W32EXPORT
void USERD_set_extra_gui_data(
157 int *toggle
, /* [num_toggle] */
158 int *pulldown
, /* [num_pulldown] */
159 char **field_text
/* [num_fields][Z_LEN_GUI_FIELD_STR] */
162 /* ----------------------------
163 * Extra "After" GUI stuff available for all versions of API
164 * Note: this API suite is entirely optional...
165 * --------------------------- */
166 W32EXPORT
void USERD_get_var_extract_gui_numbers(
172 W32EXPORT
int USERD_get_var_extract_gui_defaults(
173 char **toggle_Title
, /* [num_toggles][Z_LEN_GUI_TITLE_STR] */
174 int *toggle_default_status
, /* [num_toggles] */
175 char **pulldown_Title
, /* [num_pulldowns][Z_LEN_GUI_TITLE_STR] */
176 int *pulldown_number_in_list
, /* [num_pulldowns] */
177 int *pulldown_default_selection
, /* [num_pulldowns] */
178 char ***pulldown_item_strings
, /* [num_pulldowns][Z_MAX_NUM_GUI_PULL_ITEMS][Z_LEN_GUI_PULL_STR] */
179 char **field_Title
, /* [num_fields][Z_LEN_GUI_TITLE_STR] */
180 char **field_user_string
/* [num_fields][Z_LEN_GUI_FIELD_STR] */
183 W32EXPORT
void USERD_set_var_extract_gui_data(
184 int *toggle
, /* [num_toggle] */
185 int *pulldown
, /* [num_pulldown] */
186 char **field_text
/* [num_fields][Z_LEN_GUI_FIELD_STR] */ );
188 /* --------------------
189 * xy-query data routines
190 * -------------------- */
191 W32EXPORT
int USERD_get_num_xy_queries(void);
193 W32EXPORT
int USERD_get_xy_query_info(
198 int *query_num_pairs
);
200 W32EXPORT
int USERD_get_xy_query_data(
207 /* This routine added so the reader can know if we are at the "right" side of
208 * an interval - namely, interpolation between steps is being done in EnSight
209 * (It can be in any version of EnSight)
210 *----------------------------------------------------------------------------*/
212 USERD_set_right_side( void );
214 /*---------------------------------------------
215 * Routines that get the geometry in buffers,
216 * used for Unstructured Auto Distribute
218 *---------------------------------------------*/
220 USERD_get_part_coords_in_buffers(int part_number
,
229 USERD_get_part_node_ids_in_buffers(int part_number
,
238 USERD_get_part_elements_by_type_in_buffers(int part_number
,
248 USERD_get_part_element_ids_by_type_in_buffers(int part_number
,
257 USERD_get_var_by_component_in_buffers(int which_variable
,
272 USERD_get_nsided_conn_in_buffers(int part_number
,
273 int *num_nodes_per_elem_array
,
274 int *nsided_conn_array
,
282 USERD_get_nfaced_conn_in_buffers(int part_number
,
283 int *nfaced_fpe_arrray
,
284 int *nfaced_npf_arrray
,
285 int *nfaced_conn_array
,
293 /*-----------------------
294 * For Version 1.000 Only
295 *-----------------------*/
296 #if defined USERD_API_100
299 USERD_get_number_of_global_nodes( void );
302 USERD_get_global_coords(CRD
*coord_array
);
305 USERD_get_global_node_ids(int *nodeid_array
);
308 USERD_get_element_connectivities_for_part(int part_number
,
309 int **conn_array
[Z_MAXTYPE
]);
312 USERD_get_element_ids_for_part(int part_number
,
313 int *elemid_array
[Z_MAXTYPE
]);
316 USERD_get_vector_values(int which_vector
,
319 float *vector_array
);
322 USERD_get_part_build_info(int *part_id
,
324 char *part_descriptions
[Z_BUFL
],
325 int *number_of_elements
[Z_MAXTYPE
],
326 int *ijk_dimensions
[3],
327 int *iblanking_options
[6]);
330 USERD_get_scalar_values(int which_scalar
,
333 float *scalar_array
);
336 USERD_get_variable_info(char **var_description
,
342 USERD_get_description_lines(int which_type
,
348 USERD_get_variable_value_at_specific(int which_var
,
349 int which_node_or_elem
,
356 USERD_get_constant_value(int which_var
);
359 USERD_get_solution_times(float *solution_times
);
361 USERD_set_time_step(int time_step
);
364 USERD_get_number_of_time_steps(void);
369 /*----------------------
370 * New For Version 2.000
371 *----------------------*/
372 #if !defined USERD_API_100
375 USERD_get_part_coords(int part_number
,
376 float **coord_array
);
379 USERD_get_part_node_ids(int part_number
,
383 USERD_get_part_elements_by_type(int part_number
,
387 USERD_get_part_element_ids_by_type(int part_number
,
392 USERD_get_reader_version(char version_number
[Z_MAX_USERD_NAME
]);
395 USERD_get_reader_release(char version_number
[Z_MAX_USERD_NAME
]);
398 USERD_get_var_by_component(int which_variable
,
407 USERD_get_maxsize_info(int *max_number_of_nodes
,
408 int *max_number_of_elements
[Z_MAXTYPE
],
409 int *max_ijk_dimensions
[3]);
412 USERD_exit_routine( void );
415 USERD_get_gold_variable_info(char **var_description
,
420 char **var_ifilename
,
425 USERD_get_model_extents( float extents
[6] );
428 USERD_get_descrip_lines(int which_type
,
435 USERD_get_var_value_at_specific(int which_var
,
436 int which_node_or_elem
,
444 USERD_get_constant_val(int which_var
, int imag_data
);
447 USERD_get_geom_timeset_number(void);
450 USERD_get_number_of_timesets(void);
453 USERD_get_timeset_description(int timeset_number
,
454 char timeset_description
[Z_BUFL
]);
457 USERD_get_sol_times(int timeset_number
,
458 float *solution_times
);
460 USERD_set_time_set_and_step(int timeset_number
,
463 USERD_get_num_of_time_steps(int timeset_number
);
466 USERD_get_border_availability(int part_number
,
467 int number_of_elements
[Z_MAXTYPE
]);
470 USERD_get_border_elements_by_type(int part_number
,
473 short *parent_element_type
,
474 int *parent_element_num
);
477 USERD_set_server_number(int serv_num
,
483 /*----------------------
484 * New For Version 2.010
485 *----------------------*/
486 #if defined USERD_API_201 || defined USERD_API_202 || defined USERD_API_203 || defined USERD_API_204 || defined USERD_API_205 || defined USERD_API_206 || defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
488 USERD_get_ghosts_in_model_flag( void );
491 USERD_get_ghosts_in_block_flag(int block_number
);
494 USERD_get_block_ghost_flags(int block_number
,
498 /*--------------------------
499 * Modified at Version 2.030
500 *--------------------------*/
501 #if defined USERD_API_200 || defined USERD_API_201 || defined USERD_API_202
504 USERD_get_gold_part_build_info(int *part_id
,
506 char *part_descriptions
[Z_BUFL
],
507 int *number_of_nodes
,
508 int *number_of_elements
[Z_MAXTYPE
],
509 int *ijk_dimensions
[3],
510 int *iblanking_options
[6]);
513 #if defined USERD_API_203 || defined USERD_API_204 || defined USERD_API_205 || defined USERD_API_206 || defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
515 USERD_get_gold_part_build_info(int *part_id
,
517 char *part_descriptions
[Z_BUFL
],
518 int *number_of_nodes
,
519 int *number_of_elements
[Z_MAXTYPE
],
520 int *ijk_dimensions
[9],
521 int *iblanking_options
[6]);
525 /*----------------------
526 * New For Version 2.030
527 *----------------------*/
528 #if defined USERD_API_203 || defined USERD_API_204 || defined USERD_API_205 || defined USERD_API_206 || defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
530 USERD_get_number_of_material_sets( void );
533 USERD_get_matf_set_info(int *mat_set_ids
,
534 char **mat_set_name
);
537 USERD_get_number_of_materials( int set_index
);
540 USERD_get_matf_var_info(int set_index
,
545 USERD_size_matf_data(int set_index
,
552 USERD_load_matf_data( int set_index
,
560 USERD_get_nsided_conn( int part_number
,
561 int *nsided_conn_array
);
564 USERD_get_nfaced_nodes_per_face( int part_number
,
565 int *nfaced_npf_array
);
568 USERD_get_nfaced_conn( int part_number
,
569 int *nfaced_conn_array
);
573 /*----------------------
574 * New For Version 2.040
575 *----------------------*/
576 #if defined USERD_API_204 || defined USERD_API_205 || defined USERD_API_206 || defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
579 USERD_get_uns_failed_params(
580 char *fail_var_name
, /* variable name to be used in failure
581 must be scalar, per elem */
582 float *threshold_val1
, /* number to compare for failure */
583 float *threshold_val2
, /* number to compare for failure */
584 int *threshold_operator1
, /* Z_GREATER_THAN, Z_LESS_THAN,
586 int *threshold_operator2
, /* Z_GREATER_THAN, Z_LESS_THAN,
594 /*----------------------
595 ** New For Version 2.050
596 **----------------------*/
597 #if defined USERD_API_205 || defined USERD_API_206 || defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
600 USERD_get_number_of_species( int set_index
);
603 USERD_get_matsp_info(int set_index
,
610 USERD_rigidbody_existence( void );
614 /*--------------------------------------------
615 * New at 2.05, but modified for Version 2.080
616 *-------------------------------------------- */
617 #if defined USERD_API_205 || defined USERD_API_206 || defined USERD_API_207
619 USERD_rigidbody_values(int part_number
,
623 #if defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
625 USERD_rigidbody_values(int part_number
,
632 /*----------------------
633 ** New For Version 2.060
634 **----------------------*/
635 #if defined USERD_API_206 || defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
638 USERD_get_structured_reader_cinching( void );
641 USERD_set_block_range_and_stride(int file_pn
,
642 int mini
, int maxi
, int stepi
,
643 int minj
, int maxj
, int stepj
,
644 int mink
, int maxk
, int stepk
);
647 /*----------------------
648 ** New For Version 2.070
649 **----------------------*/
650 #if defined USERD_API_207 || defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
652 /* non-optional functions go here */
656 /* This is optional; defaults to 'Set file' and 'Set results' if not
657 * defined. If 'two_fields' is true, then both labels must have a
658 * non-NULL string otherwise the defaults will be used.
661 USERD_set_filename_button_labels(char filename_label_1
[Z_MAX_USERD_NAME
],
662 char filename_label_2
[Z_MAX_USERD_NAME
]);
664 /* This is optional; defaults to TRUE if not defined. */
666 USERD_prefer_auto_distribute(void);
670 /*----------------------
671 ** New For Version 2.090
672 **----------------------*/
673 #if defined USERD_API_209 || defined USERD_API_210
675 /* non-optional functions go here */
679 /* These are optional */
681 USERD_get_vglyph_counts(int *num_vglyph_vectors
,
682 int *num_vglyph_timelines
);
685 USERD_get_vglyph_timeline_info(int vtl
,
693 USERD_get_vglyph_timeline_times(int vtl
,
697 USERD_get_vglyph_vector_info(int vg
,
708 USERD_get_vglyph_vector_values(int vg
,
712 USERD_get_vglyph_vector_xyzloc(int vg
,
715 /*----------------------
716 ** New For Version 2.100
717 **----------------------*/
718 #if defined USERD_API_210
721 USERD_get_mat_scalars_desc(int set_index
,
725 /* These are optional */
727 USERD_get_matf_set_type(int set_index
);
729 /* special, optional functions */
731 USERD_reset_routine(void);
733 /*--------------------------------------------------------------------*/
734 #endif /*GLOBAL_EXTERN_PROTO_H*/