ExodusII 4.96
exodusII_ext.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
00003  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
00004  * retains certain rights in this software.
00005  * 
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are
00008  * met:
00009  * 
00010  *     * Redistributions of source code must retain the above copyright
00011  *       notice, this list of conditions and the following disclaimer.
00012  * 
00013  *     * Redistributions in binary form must reproduce the above
00014  *       copyright notice, this list of conditions and the following
00015  *       disclaimer in the documentation and/or other materials provided
00016  *       with the distribution.  
00017  * 
00018  *     * Neither the name of Sandia Corporation nor the names of its
00019  *       contributors may be used to endorse or promote products derived
00020  *       from this software without specific prior written permission.
00021  * 
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00025  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00026  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00028  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00029  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00030  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00031  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00032  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033  * 
00034  */
00035 
00036 #ifndef __exodus_ext_h
00037 #define __exodus_ext_h
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043   /**
00044  * \defgroup APIStructs Structures used by external API functions.
00045  * @{
00046  */
00047 typedef struct ex_init_params {
00048   char title[MAX_LINE_LENGTH + 1];
00049   int num_dim;
00050   int num_nodes;
00051   int num_edge;
00052   int num_edge_blk;
00053   int num_face;
00054   int num_face_blk;
00055   int num_elem;
00056   int num_elem_blk;
00057   int num_node_sets;
00058   int num_edge_sets;
00059   int num_face_sets;
00060   int num_side_sets;
00061   int num_elem_sets;
00062   int num_node_maps;
00063   int num_edge_maps;
00064   int num_face_maps;
00065   int num_elem_maps;
00066 } ex_init_params;
00067 
00068 typedef struct ex_block_params {
00069   int*   edge_blk_id;
00070   char** edge_type;
00071   int*   num_edge_this_blk;
00072   int*   num_nodes_per_edge;
00073   int*   num_attr_edge;
00074   int*   face_blk_id;
00075   char** face_type;
00076   int*   num_face_this_blk;
00077   int*   num_nodes_per_face;
00078   int*   num_attr_face;
00079   int*   elem_blk_id;
00080   char** elem_type;
00081   int*   num_elem_this_blk;
00082   int*   num_nodes_per_elem;
00083   int*   num_edges_per_elem;
00084   int*   num_faces_per_elem;
00085   int*   num_attr_elem;
00086   int    define_maps;
00087 } ex_block_params;
00088 
00089 typedef struct ex_set_specs {
00090   int* sets_ids;
00091   int* num_entries_per_set;
00092   int* num_dist_per_set;
00093   int* sets_entry_index;
00094   int* sets_dist_index;
00095   int* sets_entry_list;
00096   int* sets_extra_list;
00097   void* sets_dist_fact;
00098 } ex_set_specs;
00099 
00100 typedef struct ex_var_params {
00101   int  num_glob;
00102   int  num_node;
00103   int  num_edge;
00104   int* edge_var_tab;
00105   int  num_face;
00106   int* face_var_tab;
00107   int  num_elem;
00108   int* elem_var_tab;
00109   int  num_nset;
00110   int* nset_var_tab;
00111   int  num_eset;
00112   int* eset_var_tab;
00113   int  num_fset;
00114   int* fset_var_tab;
00115   int  num_sset;
00116   int* sset_var_tab;
00117   int  num_elset;
00118   int* elset_var_tab;
00119 } ex_var_params;
00120   /* @} */
00121 
00122 #ifndef EXODUS_EXPORT
00123 #define EXODUS_EXPORT extern
00124 #endif /* EXODUS_EXPORT */
00125 
00126 /*  (MODIFIED) Write Initialization Parameters */
00127 EXODUS_EXPORT int ex_put_init_ext       (int, const ex_init_params*);
00128 
00129 /*  (MODIFIED) Read Initialization Parameters */
00130 EXODUS_EXPORT int ex_get_init_ext       (int, ex_init_params*);
00131 
00132 /*  Write Node Edge Face or Element Number Map */
00133 EXODUS_EXPORT int ex_put_num_map        (int, ex_entity_type, int, const int*);
00134 
00135 /*  Read Number Map */
00136 EXODUS_EXPORT int ex_get_num_map        (int, ex_entity_type, int, int*);
00137 
00138 /*  Write Edge Face or Element Block Parameters */
00139 EXODUS_EXPORT int ex_put_block          (int, ex_entity_type, int, const char*, int, int,
00140                                          int, int, int);
00141 
00142 /*  Read Edge Face or Element Block Parameters */
00143 EXODUS_EXPORT int ex_get_block          (int, ex_entity_type, int, char*, int*, int*, int*,
00144                                          int*, int*);
00145 
00146 /*  Write All Edge Face and Element Block Parameters */
00147 EXODUS_EXPORT int ex_put_concat_all_blocks(int, const ex_block_params*);
00148 
00149 EXODUS_EXPORT int ex_put_entity_count_per_polyhedra (int, ex_entity_type, int, const int*);
00150 
00151 EXODUS_EXPORT int ex_get_entity_count_per_polyhedra (int, ex_entity_type, int, int*);
00152 
00153 /*  Write Edge Face or Element Block Connectivity */
00154 EXODUS_EXPORT int ex_put_conn           (int, ex_entity_type, int, const int*, const int*,
00155                                          const int*);
00156 
00157 /*  Read Edge Face or Element Block Connectivity */
00158 EXODUS_EXPORT int ex_get_conn           (int, ex_entity_type, int, int*, int*, int*);
00159 
00160 /*  Read Partial Edge Face or Element Block Connectivity */
00161 EXODUS_EXPORT int ex_get_n_conn         (int, ex_entity_type, int, int, int, int*, int*, int*);
00162 
00163 /*  Write Edge Face or Element Block Attributes */
00164 EXODUS_EXPORT int ex_put_attr           (int, ex_entity_type, int, const void*);
00165 
00166 /*  Read Edge Face or Element Block Attributes */
00167 EXODUS_EXPORT int ex_get_attr           (int, ex_entity_type, int, void*);
00168 
00169 /*  Write One Edge Face or Element Block Attribute */
00170 EXODUS_EXPORT int ex_put_one_attr       (int, ex_entity_type, int, int, const void*);
00171 
00172 /*  Read One Edge Face or Element Block Attribute */
00173 EXODUS_EXPORT int ex_get_one_attr       (int, ex_entity_type, int, int, void*);
00174 
00175 /*  Read One Edge Face or Element Block Attribute */
00176 EXODUS_EXPORT int ex_get_n_one_attr     (int   exoid, ex_entity_type obj_type, int   obj_id,
00177                                          int   start_num, int   num_ent, int   attrib_index,
00178                                          void* attrib );
00179 
00180 /*  Write Edge Face or Element Block Attribute Names */
00181 EXODUS_EXPORT int ex_put_attr_names     (int, ex_entity_type, int, char**);
00182 
00183 /*  Read Edge Face or Element Block Attribute Names */
00184 EXODUS_EXPORT int ex_get_attr_names     (int, ex_entity_type, int, char**);
00185 
00186 /*  Write Node Edge Face or Side Set Parameters */
00187 EXODUS_EXPORT int ex_put_set_param      (int, ex_entity_type, int, int, int);
00188 
00189 /*  Read Node Edge Face or Side Set Parameters */
00190 EXODUS_EXPORT int ex_get_set_param      (int, ex_entity_type, int, int*, int*);
00191 
00192 /*  Write a Node Edge Face or Side Set */
00193 EXODUS_EXPORT int ex_put_set            (int, ex_entity_type, int, const int*, const int*);
00194 
00195 /*  Read a Node Edge Face or Side Set */
00196 EXODUS_EXPORT int ex_get_set            (int, ex_entity_type, int, int*, int*);
00197 
00198 /*  Write Node Edge Face or Side Set Distribution Factors */
00199 EXODUS_EXPORT int ex_put_set_dist_fact  (int, ex_entity_type, int, const void*);
00200 
00201 /*  Read Node Edge Face or Side Set Distribution Factors */
00202 EXODUS_EXPORT int ex_get_set_dist_fact  (int, ex_entity_type, int, void*);
00203 
00204 /*  Write Concatenated Node Edge Face or Side Sets */
00205 EXODUS_EXPORT int ex_put_concat_sets    (int, ex_entity_type, const ex_set_specs*);
00206 
00207 /*  Read Concatenated Node Edge Face or Side Sets */
00208 EXODUS_EXPORT int ex_get_concat_sets(int, ex_entity_type, ex_set_specs*);
00209 
00210 /*  (MODIFIED) Write All Results Variables Parameters */
00211 EXODUS_EXPORT int ex_put_all_var_param_ext(int, const ex_var_params*);
00212 
00213 /*  Write Edge Face or Element Variable Values on Blocks or Sets at a Time Step */
00214 EXODUS_EXPORT int ex_put_var            (int, int, ex_entity_type, int, int, int,
00215                                          const void*);
00216 
00217 /*  Write Partial Edge Face or Element Variable Values on Blocks or Sets at a Time Step */
00218 EXODUS_EXPORT int ex_put_n_var          (int exoid, int time_step , ex_entity_type var_type,
00219                                          int var_index, int obj_id, int start_index, int num_entities,
00220                                          const void* var_vals);
00221 
00222 /*  Read Edge Face or Element Variable Values Defined On Blocks or Sets at a Time Step */
00223 EXODUS_EXPORT int ex_get_var            (int, int, ex_entity_type, int, int, int, void*);
00224 
00225 /*  Read Partial Edge Face or Element Variable Values on Blocks or Sets at a Time Step */
00226 EXODUS_EXPORT int ex_get_n_var          (int exoid, int time_step , ex_entity_type var_type,
00227                                          int var_index, int obj_id, int start_index, int num_entities,
00228                                          void* var_vals);
00229 
00230 /*  Read Edge Face or Element Variable Values Defined On Blocks or Sets Through Time */
00231 EXODUS_EXPORT int ex_get_var_time       (int, ex_entity_type, int, int, int, int,
00232                                          void*);
00233 
00234 #ifdef __cplusplus
00235 } /* extern "C" */
00236 #endif
00237 
00238 #endif /* __exodus_ext_h */