ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / graphics / ensightFoamReader / global_extern_proto.h
blob272261c7988b757ebc16fcbac48c726f29989f1e
1 /*--------------------------------------------------------------*/
2 /* Prototype Header file for EnSight External Reader */
3 /* DSO Library Routines */
4 /* */
5 /* intended to be included from global_extern.h only */
6 /*--------------------------------------------------------------*/
7 /* *************************************************************
8 * Copyright 1998 Computational Engineering International, Inc.
9 * All Rights Reserved.
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
24 #include <stdio.h>
26 #ifdef WIN32
27 #define W32IMPORT __declspec( dllimport )
28 #define W32EXPORT __declspec( dllexport )
29 #else
30 #define W32IMPORT extern
31 #define W32EXPORT extern
32 #endif
34 /*----------------------
35 * Same in All Versions
36 *----------------------*/
37 W32EXPORT int
38 USERD_get_number_of_model_parts( void );
40 W32EXPORT int
41 USERD_get_block_coords_by_component(int block_number,
42 int which_component,
43 float *coord_array);
45 W32EXPORT int
46 USERD_get_block_iblanking(int block_number,
47 int *iblank_array);
49 W32EXPORT int
50 USERD_get_block_scalar_values(int block_number,
51 int which_scalar,
52 float *scalar_array);
54 W32EXPORT int
55 USERD_get_block_vector_values_by_component(int block_number,
56 int which_vector,
57 int which_component,
58 float *vector_array);
60 W32EXPORT int
61 USERD_get_name_of_reader(char reader_name[Z_MAX_USERD_NAME],
62 int *two_fields);
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).
70 W32EXPORT int
71 USERD_reader_unloadable(void);
73 #ifdef __cplusplus
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
86 #endif
88 #endif
90 #endif
92 W32EXPORT int
93 USERD_get_reader_descrip(char descrip[Z_MAXFILENP]);
95 W32EXPORT int
96 USERD_set_filenames(char filename_1[],
97 char filename_2[],
98 char the_path[],
99 int swapbytes);
101 W32EXPORT int
102 USERD_get_number_of_files_in_dataset( void );
104 W32EXPORT int
105 USERD_get_dataset_query_file_info(Z_QFILES *qfiles);
107 W32EXPORT int
108 USERD_get_changing_geometry_status( void );
110 W32EXPORT int
111 USERD_get_node_label_status( void );
113 W32EXPORT int
114 USERD_get_element_label_status( void );
116 W32EXPORT int
117 USERD_get_number_of_variables( void );
119 W32EXPORT void
120 USERD_stop_part_building( void );
122 W32EXPORT int
123 USERD_bkup(FILE *archive_file,
124 int backup_type);
126 /* -----------------------------------
127 * Optional routine allows getting data
128 * from the reader to modify server/client behavior
129 * ------------------------------------ */
130 W32EXPORT int
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(
140 int *num_Toggles,
141 int *num_pulldowns,
142 int *num_fields
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(
167 int *num_Toggles,
168 int *num_pulldowns,
169 int *num_fields
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(
194 int query_num,
195 char *query_name,
196 char *query_xtitle,
197 char *query_ytitle,
198 int *query_num_pairs);
200 W32EXPORT int USERD_get_xy_query_data(
201 int query_num,
202 int num_vals,
203 float *x_vals,
204 float *y_vals);
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 *----------------------------------------------------------------------------*/
211 W32EXPORT void
212 USERD_set_right_side( void );
214 /*---------------------------------------------
215 * Routines that get the geometry in buffers,
216 * used for Unstructured Auto Distribute
217 * (Optional)
218 *---------------------------------------------*/
219 W32EXPORT int
220 USERD_get_part_coords_in_buffers(int part_number,
221 float **coord_array,
222 int first,
223 int n_beg,
224 int n_end,
225 int buffer_size,
226 int *num_returned);
228 W32EXPORT int
229 USERD_get_part_node_ids_in_buffers(int part_number,
230 int *nodeid_array,
231 int first,
232 int n_beg,
233 int n_end,
234 int buffer_size,
235 int *num_returned);
237 W32EXPORT int
238 USERD_get_part_elements_by_type_in_buffers(int part_number,
239 int element_type,
240 int **conn_array,
241 int first,
242 int e_beg,
243 int e_end,
244 int buffer_size,
245 int *num_returned);
247 W32EXPORT int
248 USERD_get_part_element_ids_by_type_in_buffers(int part_number,
249 int element_type,
250 int *elemid_array,
251 int first,
252 int e_beg,
253 int e_end,
254 int buffer_size,
255 int *num_returned);
256 W32EXPORT int
257 USERD_get_var_by_component_in_buffers(int which_variable,
258 int which_part,
259 int var_type,
260 int which_type,
261 int imag_data,
262 int component,
263 float *var_array,
264 int first,
265 int ne_beg,
266 int ne_end,
267 int buffer_size,
268 int leftside,
269 int *num_returned);
271 W32EXPORT int
272 USERD_get_nsided_conn_in_buffers(int part_number,
273 int *num_nodes_per_elem_array,
274 int *nsided_conn_array,
275 int first,
276 int e_beg,
277 int e_end,
278 int buffer_size,
279 int *num_returned);
281 W32EXPORT int
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,
286 int first,
287 int e_beg,
288 int e_end,
289 int buffer_size,
290 int *num_returned);
293 /*-----------------------
294 * For Version 1.000 Only
295 *-----------------------*/
296 #if defined USERD_API_100
298 W32EXPORT int
299 USERD_get_number_of_global_nodes( void );
301 W32EXPORT int
302 USERD_get_global_coords(CRD *coord_array);
304 W32EXPORT int
305 USERD_get_global_node_ids(int *nodeid_array);
307 W32EXPORT int
308 USERD_get_element_connectivities_for_part(int part_number,
309 int **conn_array[Z_MAXTYPE]);
311 W32EXPORT int
312 USERD_get_element_ids_for_part(int part_number,
313 int *elemid_array[Z_MAXTYPE]);
315 W32EXPORT int
316 USERD_get_vector_values(int which_vector,
317 int which_part,
318 int which_type,
319 float *vector_array);
321 W32EXPORT int
322 USERD_get_part_build_info(int *part_id,
323 int *part_types,
324 char *part_descriptions[Z_BUFL],
325 int *number_of_elements[Z_MAXTYPE],
326 int *ijk_dimensions[3],
327 int *iblanking_options[6]);
329 W32EXPORT int
330 USERD_get_scalar_values(int which_scalar,
331 int which_part,
332 int which_type,
333 float *scalar_array);
335 W32EXPORT int
336 USERD_get_variable_info(char **var_description,
337 char **var_filename,
338 int *var_type,
339 int *var_classify);
341 W32EXPORT int
342 USERD_get_description_lines(int which_type,
343 int which_var,
344 char line1[Z_BUFL],
345 char line2[Z_BUFL]);
347 W32EXPORT int
348 USERD_get_variable_value_at_specific(int which_var,
349 int which_node_or_elem,
350 int which_part,
351 int which_elem_type,
352 int time_step,
353 float values[3]);
355 W32EXPORT float
356 USERD_get_constant_value(int which_var);
358 W32EXPORT int
359 USERD_get_solution_times(float *solution_times);
360 W32EXPORT void
361 USERD_set_time_step(int time_step);
363 W32EXPORT int
364 USERD_get_number_of_time_steps(void);
366 #endif
369 /*----------------------
370 * New For Version 2.000
371 *----------------------*/
372 #if !defined USERD_API_100
374 W32EXPORT int
375 USERD_get_part_coords(int part_number,
376 float **coord_array);
378 W32EXPORT int
379 USERD_get_part_node_ids(int part_number,
380 int *nodeid_array);
382 W32EXPORT int
383 USERD_get_part_elements_by_type(int part_number,
384 int element_type,
385 int **conn_array);
386 W32EXPORT int
387 USERD_get_part_element_ids_by_type(int part_number,
388 int element_type,
389 int *elemid_array);
391 W32EXPORT int
392 USERD_get_reader_version(char version_number[Z_MAX_USERD_NAME]);
394 W32EXPORT int
395 USERD_get_reader_release(char version_number[Z_MAX_USERD_NAME]);
397 W32EXPORT int
398 USERD_get_var_by_component(int which_variable,
399 int which_part,
400 int var_type,
401 int which_type,
402 int complex,
403 int component,
404 float *var_array);
406 W32EXPORT int
407 USERD_get_maxsize_info(int *max_number_of_nodes,
408 int *max_number_of_elements[Z_MAXTYPE],
409 int *max_ijk_dimensions[3]);
411 W32EXPORT void
412 USERD_exit_routine( void );
414 W32EXPORT int
415 USERD_get_gold_variable_info(char **var_description,
416 char **var_filename,
417 int *var_type,
418 int *var_classify,
419 int *var_complex,
420 char **var_ifilename,
421 float *var_freq,
422 int *var_contran,
423 int *var_timeset);
424 W32EXPORT int
425 USERD_get_model_extents( float extents[6] );
427 W32EXPORT int
428 USERD_get_descrip_lines(int which_type,
429 int which_var,
430 int imag_data,
431 char line1[Z_BUFL],
432 char line2[Z_BUFL]);
434 W32EXPORT int
435 USERD_get_var_value_at_specific(int which_var,
436 int which_node_or_elem,
437 int which_part,
438 int which_elem_type,
439 int time_step,
440 float values[3],
441 int imag_data);
443 W32EXPORT float
444 USERD_get_constant_val(int which_var, int imag_data);
446 W32EXPORT int
447 USERD_get_geom_timeset_number(void);
449 W32EXPORT int
450 USERD_get_number_of_timesets(void);
452 W32EXPORT int
453 USERD_get_timeset_description(int timeset_number,
454 char timeset_description[Z_BUFL]);
456 W32EXPORT int
457 USERD_get_sol_times(int timeset_number,
458 float *solution_times);
459 W32EXPORT void
460 USERD_set_time_set_and_step(int timeset_number,
461 int time_step);
462 W32EXPORT int
463 USERD_get_num_of_time_steps(int timeset_number);
465 W32EXPORT int
466 USERD_get_border_availability(int part_number,
467 int number_of_elements[Z_MAXTYPE]);
469 W32EXPORT int
470 USERD_get_border_elements_by_type(int part_number,
471 int element_type,
472 int **conn_array,
473 short *parent_element_type,
474 int *parent_element_num);
476 W32EXPORT void
477 USERD_set_server_number(int serv_num,
478 int tot_servs);
480 #endif
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
487 W32EXPORT int
488 USERD_get_ghosts_in_model_flag( void );
490 W32EXPORT int
491 USERD_get_ghosts_in_block_flag(int block_number);
493 W32EXPORT int
494 USERD_get_block_ghost_flags(int block_number,
495 int *ghost_flags);
496 #endif
498 /*--------------------------
499 * Modified at Version 2.030
500 *--------------------------*/
501 #if defined USERD_API_200 || defined USERD_API_201 || defined USERD_API_202
503 W32EXPORT int
504 USERD_get_gold_part_build_info(int *part_id,
505 int *part_types,
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]);
511 #endif
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
514 W32EXPORT int
515 USERD_get_gold_part_build_info(int *part_id,
516 int *part_types,
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]);
522 #endif
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
529 W32EXPORT int
530 USERD_get_number_of_material_sets( void );
532 W32EXPORT int
533 USERD_get_matf_set_info(int *mat_set_ids,
534 char **mat_set_name);
536 W32EXPORT int
537 USERD_get_number_of_materials( int set_index );
539 W32EXPORT int
540 USERD_get_matf_var_info(int set_index,
541 int *mat_ids,
542 char **mat_desc);
544 W32EXPORT int
545 USERD_size_matf_data(int set_index,
546 int part_id,
547 int wtyp,
548 int mat_type,
549 int *matf_size );
551 W32EXPORT int
552 USERD_load_matf_data( int set_index,
553 int part_id,
554 int wtyp,
555 int mat_type,
556 int *ids_list,
557 float *val_list );
559 W32EXPORT int
560 USERD_get_nsided_conn( int part_number,
561 int *nsided_conn_array );
563 W32EXPORT int
564 USERD_get_nfaced_nodes_per_face( int part_number,
565 int *nfaced_npf_array );
567 W32EXPORT int
568 USERD_get_nfaced_conn( int part_number,
569 int *nfaced_conn_array );
571 #endif
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
578 W32EXPORT int
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,
585 Z_EQUAL_TO */
586 int *threshold_operator2, /* Z_GREATER_THAN, Z_LESS_THAN,
587 Z_EQUAL_TO */
588 int *logic_criteria2
592 #endif
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
599 W32EXPORT int
600 USERD_get_number_of_species( int set_index );
602 W32EXPORT int
603 USERD_get_matsp_info(int set_index,
604 int *sp_ids,
605 char **sp_desc,
606 int *sppermatcnt,
607 int *sppermatlis);
609 W32EXPORT int
610 USERD_rigidbody_existence( void );
612 #endif
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
618 W32EXPORT int
619 USERD_rigidbody_values(int part_number,
620 float values[10]);
621 #endif
623 #if defined USERD_API_208 || defined USERD_API_209 || defined USERD_API_210
624 W32EXPORT int
625 USERD_rigidbody_values(int part_number,
626 float values[14]);
627 #endif
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
637 W32EXPORT int
638 USERD_get_structured_reader_cinching( void );
640 W32EXPORT int
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);
645 #endif
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 */
654 #endif
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.
660 W32EXPORT void
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. */
665 W32EXPORT int
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 */
677 #endif
679 /* These are optional */
680 W32EXPORT int
681 USERD_get_vglyph_counts(int *num_vglyph_vectors,
682 int *num_vglyph_timelines);
684 W32EXPORT int
685 USERD_get_vglyph_timeline_info(int vtl,
686 int *id,
687 int *numtimes,
688 int *before,
689 int *amidst,
690 int *after);
692 W32EXPORT int
693 USERD_get_vglyph_timeline_times(int vtl,
694 float *times);
696 W32EXPORT int
697 USERD_get_vglyph_vector_info(int vg,
698 int *id,
699 char *description,
700 int *type,
701 int *time_condition,
702 int *time_line,
703 int *part,
704 int *nidloc,
705 int *eidloc);
707 W32EXPORT int
708 USERD_get_vglyph_vector_values(int vg,
709 float **values);
711 W32EXPORT int
712 USERD_get_vglyph_vector_xyzloc(int vg,
713 float **xyzloc);
715 /*----------------------
716 ** New For Version 2.100
717 **----------------------*/
718 #if defined USERD_API_210
720 W32EXPORT int
721 USERD_get_mat_scalars_desc(int set_index,
722 char **mesv_desc);
723 #endif
725 /* These are optional */
726 W32EXPORT int
727 USERD_get_matf_set_type(int set_index);
729 /* special, optional functions */
730 W32EXPORT void
731 USERD_reset_routine(void);
733 /*--------------------------------------------------------------------*/
734 #endif /*GLOBAL_EXTERN_PROTO_H*/