Debian Codegraph @

packages/seacas/libraries/exodus/include/doxygen.h

raw
1 /* clang-format off */
2
3 /*! \mainpage Exodus API Documentation
4
5 \section intro Introduction
6
7 EXODUS is the successor of the widely used finite element (FE) data file format EXODUS
8 (henceforth referred to as EXODUS I) developed by Mills-Curran and Flanagan. It
9 continues the concept of a common database for multiple application codes (mesh generators,
10 analysis codes, visualization software, etc.) rather than code-specific utilities, affording
11 flexibility and robustness for both the application code developer and application code user.
12 By using the EXODUS data model, a user inherits the flexibility of using a large array of
13 application codes (including vendor-supplied codes) which access this common data file
14 directly or via translators.
15
16 The uses of the EXODUS data model include the following:
17 - Problem definition -- mesh generation, specification of locations of boundary conditions and
18 load application, specification of material types.
19 - Simulation -- model input and results output.
20 - Visualization -- model verification, results postprocessing, data interrogation, and analysis
21 tracking.
22
23 \section avail Availability
24
25 The Exodus library source code is available on Github at
26 https://github.com/sandialabs/seacas
27
28 For bug reports, documentation errors, and enhancement suggestions, contact:
29 - Gregory D. Sjaardema
30 - WEB: https://github.com/sandialabs/seacas/issues
31 - EMAIL: [email protected]
32 - EMAIL: [email protected]
33 - PHONE: (505) 844-2701 (office)
34
35 \section license License
36 The EXODUS library is licensed under the BSD open source license.
37
38 Copyright(C) 1999-2022, 2025 National Technology & Engineering Solutions
39 of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
40 NTESS, the U.S. Government retains certain rights in this software.
41
42 See packages/seacas/LICENSE for details
43
44 Redistribution and use in source and binary forms, with or without
45 modification, are permitted provided that the following conditions are
46 met:
47
48 * Redistributions of source code must retain the above copyright
49 notice, this list of conditions and the following disclaimer.
50
51 * Redistributions in binary form must reproduce the above
52 copyright notice, this list of conditions and the following
53 disclaimer in the documentation and/or other materials provided
54 with the distribution.
55
56 * Neither the name of NTESS nor the names of its
57 contributors may be used to endorse or promote products derived
58 from this software without specific prior written permission.
59
60 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
61 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
62 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
63 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
64 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
65 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
66 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
67 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
68 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
69 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
70 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
71
72 \section devel Development of EXODUS
73
74 The evolution of the EXODUS data model has been steered by FE application code developers
75 who desire the advantages of a common data format. The EXODUS model has been
76 designed to overcome deficiencies in the EXODUS I file format and meet the following
77 functional requirements as specified by these developers:
78 - Random read/write access.
79 - Application programming interface (API) -- provide routines callable from FORTRAN, C, and C++
80 application codes.
81 - Extensible -- allow new data objects to be added without modifying the application programs
82 that use the file format.
83 - Machine independent -- data should be independent of the machine which generated it.
84 - Real-time access during analysis -- allow access to the data in a file while the file is
85 being created.
86
87 To address these requirements, the open source database library
88 NetCDF (http://www.unidata.ucar.edu/software/netcdf/) was selected to handle the low-level data
89 storage. The EXODUS
90 II library functions provide the mapping between FE data objects and
91 NetCDF dimensions, attributes, and variables. Thus, the code developer
92 interacts with the data model using the vocabulary of an FE analyst
93 (element connectivity, nodal coordinates, etc.) and is relieved of the
94 details of the data access mechanism.
95
96 Because an EXODUS file is a NetCDF file, an application program can
97 access data via the EXODUS API or the NetCDF API directly. Although
98 accessing the data directly via the NetCDF API requires more in-depth
99 understanding of NetCDF, this capability is a powerful feature that
100 allows the development of auxiliary libraries of special purpose
101 functions not offered in the standard EXODUS library. For example,
102 if an application required access to the coordinates of a single node
103 (the standard library function returns the coordinates for all of the
104 nodes in the model), a simple function could be written that calls
105 NetCDF routines directly to read the data of interest.
106
107 \section descrip Description of Data Objects
108
109 The data in EXODUS files can be divided into three primary
110 categories: initialization data, model, and results.
111
112 Initialization data includes sizing parameters (number of nodes,
113 number of elements, etc.), optional quality assurance information
114 (names of codes that have operated on the data), and optional
115 informational text.
116
117 The model is described by data which are static (do not change through
118 time). These data include nodal coordinates, element connectivity
119 (node lists for each element), element attributes, and node sets and
120 side sets (used to aid in applying loading conditions and boundary
121 constraints).
122
123 The results are optional and include five types of variables -- nodal,
124 element, nodeset, sideset, and global -- each of which is stored
125 through time. Nodal results are output (at each time step) for all the
126 nodes in the model. An example of a nodal variable is displacement in
127 the X direction. Element, nodeset, and sideset results are output (at
128 each time step) for all entities (elements, nodes, sides) in one or
129 more entity block. For example, stress may be an element
130 variable. Another use of element variables is to record element status
131 (a binary flag indicating whether each element is "alive" or "dead")
132 through time. Global results are output (at each time step) for a
133 single element or node, or for a single property. Linear momentum of a
134 structure and the acceleration at a particular point are both examples
135 of global variables. Although these examples correspond to typical FE
136 applications, the data format is flexible enough to accommodate a
137 spectrum of uses.
138
139 A few conventions and limitations must be cited:
140
141 - There are no restrictions on the frequency of results output except
142 that the time value associated with each successive time step must
143 increase monotonically.
144 - To output results at different frequencies (i.e., variable A at
145 every simulation time step, variable B at every other time step)
146 multiple EXODUS files must be used.
147 - There are no limits to the number of each type of results, but once
148 declared, the number cannot change.
149 - If the mesh geometry or topology changes in time (i.e., number of
150 nodes increases, connectivity changes), then the new geometry must be
151 output to a new EXODUS file.
152
153 \section int64 Integer Bulkdata Storage Details (32-bit and 64-bit integers)
154
155 The EXODUS database can store integer bulk data, entity map data, and
156 mesh entity (block/set) ids in either 32-bit or 64-bit integer format. The data
157 considered "bulk data" are:
158
159 - element, face, and edge connectivity lists,
160 - element, face, edge, and node set entity lists,
161
162 The entity map data is any data stored in one of the 'map' objects on
163 the exodus file. This includes:
164 - id maps
165 - number maps
166 - order maps
167 - processor node maps
168 - processor element maps.
169
170 A mesh entity id is the id of any block (element block, edge block,
171 ...); set (node set, face set, ...), coordinate frame, and
172 communication map.
173
174 When an EXODUS file is created via the ex_create() function, the
175 'mode' argument provides the mechanism for specifying how integer data
176 will be passed as arguments to the API functions and also how the
177 integer data will be stored on the database. The ex_open() function
178 also provides a mechanism for specifying how integer data will be
179 passed as arguments.
180
181 The method uses the 'mode' argument to the ex_open() and
182 ex_create() functions. The mode is a 32-bit integer in which certain
183 bits are turned on by or'ing certain predefined constants.
184
185 exoid = ex_create( "test.exo",
186 EX_CLOBBER|EX_MAPS_INT64_DB|EX_MAPS_INT64_API,
187 &appWordSize, &diskWordSize );
188
189 The constants related to the integer size (32-bit or 64-bit)
190 specification are:
191
192 | Constant Name | Which data are 64-bit
193 ---------------------|----------------------
194 | #EX_MAPS_INT64_DB | entity map data
195 | #EX_IDS_INT64_DB | mesh entity ids
196 | #EX_BULK_INT64_DB | bulk data
197 | #EX_ALL_INT64_DB | (the above 3 or'd together)
198 | #EX_MAPS_INT64_API | entity map data
199 | #EX_IDS_INT64_API | mesh entity ids
200 | #EX_BULK_INT64_API | bulk data
201 | #EX_INQ_INT64_API | integers passed to/from ex_inquire()
202 | #EX_ALL_INT64_API | (the above 4 or'd together)
203
204 The constants that end with `_DB` specify that that particular integer
205 data is stored on the database as 64-bit integers; the constants that
206 end with `_API` specify that that particular integer data is passed
207 to/from API functions as 64-bit integers.
208
209 If the range of the data being transmitted is larger than the
210 permitted integer range (for example, if the data is stored on the
211 database as 64-bit ints and the application specifies passing data as
212 32-bit ints), the API function will return an error.
213
214 The three types of integer data whose storage can be specified are
215 - maps (`EX_MAPS_INT64_`),
216 - "bulk data" including connectivity lists and entity lists (`EX_BULK_INT64_`), and
217 - entity ids which are the ids of element, face, edge, and node sets
218 and blocks; and map ids (`EX_IDS_INT64_`)
219
220 The function ex_int64_status()(exoid) is used to determine the integer
221 storage types being used for the EXODUS database `exoid`. It returns
222 an integer which can be and'ed with the above flags to determine
223 either the storage type or function parameter type.
224
225 For example, if
226 `(EX_MAPS_INT64_DB & ex_int64_status()(exoid))` is true, then map data is
227 being stored as 64-bit integers for that database.
228
229 It is not possible to determine the integer data size on a database
230 without opening the database via an ex_open() call. However, the
231 integer size specification for API functions can be changed at any
232 time via the ex_set_int64_status()(exoid, mode) function. The mode is
233 one or more of `EX_MAPS_INT64_API`, `EX_IDS_INT64_API`, or
234 `EX_BULK_INT64_API`, or'd together. Any exodus function calls after
235 that point will use the specified integer size. Note that a call to
236 ex_set_int64_status()(exoid, mode) overrides any previous setting for
237 the integer sizes used in the API. The ex_create() function is the
238 only way to specify the integer sizes specification for database
239 integers.
240
241 \subsection int64_fortran_api Fortran API
242 The fortran API is uses the same mechanism as was described above for
243 the C API. If using the "8-byte real and 8-byte int" fortran mode
244 typically used by the SEACAS applications (the compiler automatically
245 promotes all integers and reals to 8-byte quantities), then the
246 fortran exodus library will automatically enable the `EX_*_INT64_API`
247 options; the client still needs to specify the `EX_*_INT64_DB` options.
248
249 \subsection int64_fortran_imp Fortran Implementation
250
251 The new capability to pass 64-bit integer data through the fortran and
252 C API functions simplifies the implementation of the "8-byte real
253 8-byte int" usage of the exodus library. Previously, the wrapper
254 routines in addrwrap.F were required to convert the 8-byte integer
255 data on the client side to/from 4-byte integers on the library
256 side. This required extra memory allocation and complications that are
257 now handled at the lowest level in the NetCDF library. The
258 functions in the fortran API have all been converted to
259 pass 64-bit integers down to the C API which has removed some code and
260 simplified those functions.
261
262
263 \section db_options Database Options (Compression, Name Length, File Type)
264
265 The ex_set_option() function call is used to set various options on the
266 database. Valid values for 'option' are:
267
268 | Option Name | Option Values |
269 -------------------------|---------------|
270 | #EX_OPT_MAX_NAME_LENGTH | Maximum length of names that will be returned/passed via API call. |
271 | #EX_OPT_COMPRESSION_TYPE | Not currently used; default is gzip |
272 | #EX_OPT_COMPRESSION_LEVEL | In the range [0..9]. A value of 0 indicates no compression |
273 | #EX_OPT_COMPRESSION_SHUFFLE | 1 if enabled, 0 if disabled |
274 | #EX_OPT_INTEGER_SIZE_API | 4 or 8 indicating byte size of integers used in API functions. |
275 | #EX_OPT_INTEGER_SIZE_DB | Query only, returns 4 or 8 indicating byte size of integers stored on the database. |
276
277 The compression-related options are only available on NetCDF-4 files
278 since the underlying hdf5 compression functionality is used for the
279 implementation. The compression level indicates how much effort should
280 be expended in the compression and the computational expense increases
281 with higher levels; in many cases, a compression level of 1 is
282 sufficient.
283
284 \section names Variable, Attribute, and Entity Block/Set Names
285 The length of the Variables, Attributes, and Entity Block/Set names is
286 variable. The default length is 32 characters to provide backward
287 compatibility. This is the default on both read and write, so if
288 there is a database with longer names and the reader does not change
289 the length of names to be returned, any API call that returns a name
290 will truncate the name at 32 characters.
291
292 To avoid this, the reading application can all
293 ~~~{.c}
294 // Determine maximum length of names stored on database
295 int max_name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_USED_NAME_LENGTH);
296
297 // Tell the library to return names this length
298 ex_set_max_name_length(exodusFilePtr, max_name_length);
299 ~~~
300
301 On write, you can call:
302
303 ~~~{.c}
304 ex_set_option(exoid, EX_OPT_MAX_NAME_LENGTH, {max_name_length});
305
306 // or equivalently
307 ex_set_max_name_length(exoid, {max_name_length});
308 ~~~
309
310 which tells the database that you will be using names of that length or shorter.
311
312 Following this call, you can define (i.e., read/write) names of any
313 size; if the names are longer than `{max_name_length}`, then they will be truncated otherwise they will pass through unchanged.
314
315 There are three queries that can be made to ex_inquire() or
316 ex_inquire_int():
317
318 - #EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH -- returns the value of the
319 maximum size that can be specified for `max_name_length`
320 (netcdf/hdf5 limitation)
321 - #EX_INQ_DB_MAX_USED_NAME_LENGTH -- returns the size of the longest
322 name on the database.
323 - #EX_INQ_MAX_READ_NAME_LENGTH -- returns the maximum name length
324 size that will be passed back to the client. 32 by default,
325 set by the previously mentioned ex_set_option() or
326 ex_set_max_name_length() call.
327
328 \note
329 - The length of the QA records (ex_get_qa(), ex_put_qa()) is not affected by this setting and each entry in the QA record is still limited to 32 characters.
330 - The length of the `entity_descrip` type passed and returnen in the
331 ex_get_block() and ex_put_block() calls is still limited to 32 characters.
332 - The length of the title is limited to 80 characters
333 (ex_get_init(), ex_get_init_ext(), ex_put_init(), ex_put_init_ext()).
334 - The length of the info records is limited to 80 characters
335 (ex_put_info(), ex_get_info()).
336
337 \defgroup ResultsData Results Data
338 @{
339 This section describes data file utility functions for creating
340 opening a file, initializing a file with global parameters, reading
341 writing information text, inquiring on parameters stored in the data
342 file, and error reporting.
343
344 The results are optional and include an optional variable type for
345 each block and set type (node, edge, face, and element) in addition
346 there are global variables and sideset variables -- each of which is
347 stored through time. Nodal results are output (at each time step) for
348 all the nodes in the model. An example of a nodal variable is
349 displacement in the X direction. Global results are output (at each
350 time step) for a single element or node, or for a single
351 property. Linear momentum of a structure and the acceleration at a
352 particular point are both examples of global variables. The other
353 results are output (at each time step) for all entities (elements,
354 faces, edges, nodes, or sides) in one or more entity blocks. For
355 example, stress may be an element variable. Another use of element
356 variables is to record element status (a binary flag indicating
357 whether each element is "alive" or "dead") through time. Although
358 these examples correspond to typical FE applications, the data format
359 is flexible enough to accommodate a spectrum of uses.
360
361 A few conventions and limitations must be cited:
362
363 + There are no restrictions on the frequency of results output except
364 that the time value associated with each successive time step should
365 increase monotonically.
366
367 + All variables are output at the same time frequency. To output
368 results at different frequencies (i.e., variable A at every simulation
369 time step, variable B at every other time step) multiple files must be
370 used.
371
372 + There are no limits to the number of each type of results, but once
373 declared, the number cannot change.
374
375 + If the mesh geometry changes in time (i.e., number of nodes
376 increases, connectivity changes), the new geometry must be output to a
377 new file.
378 @}
379
380 \defgroup Utilities Data File Utilities
381 @{
382 This section describes data file utility functions for creating
383 opening a file, initializing a file with global parameters, reading
384 writing information text, inquiring on parameters stored in the data
385 file, and error reporting.
386 @}
387
388 \defgroup ModelDescription Model Description
389 @{
390 The routines in this section read and write information which
391 describe an exodus finite element model. This includes nodal
392 coordinates, element order map, element connectivity arrays,
393 element attributes, node sets, side sets, and object properties.
394 @}
395
396 @example ../test/CreateEdgeFace.c
397 @example ../test/ReadEdgeFace.c
398 @example ../test/create_mesh.c
399 @example ../test/rd_wt_mesh.c
400 @example ../test/test-empty.c
401 @example ../test/test_nemesis.c
402 @example ../test/test_ts_errval.c
403 @example ../test/test_ts_files.c
404 @example ../test/test_ts_nvar.c
405 @example ../test/test_ts_nvar_rd.c
406 @example ../test/test_ts_partial_nvar.c
407 @example ../test/test_ts_partial_nvar_rd.c
408 @example ../test/testcp.c
409 @example ../test/testcp_nl.c
410 @example ../test/testcp_tran.c
411 @example ../test/testcpd.c
412 @example ../test/testrd-long-name.c
413 @example ../test/testrd-nfaced.c
414 @example ../test/testrd-nsided.c
415 @example ../test/testrd.c
416 @example ../test/testrd1.c
417 @example ../test/testrd_nc.c
418 @example ../test/testrd_par.c
419 @example ../test/testrd_ss.c
420 @example ../test/testrdd.c
421 @example ../test/testrdwt.c
422 @example ../test/testwt-compress.c
423 @example ../test/testwt-groups.c
424 @example ../test/testwt-long-name.c
425 @example ../test/testwt-nface-nside.c
426 @example ../test/testwt-nfaced.c
427 @example ../test/testwt-nsided.c
428 @example ../test/testwt-one-attrib.c
429 @example ../test/testwt-oned.c
430 @example ../test/testwt-partial.c
431 @example ../test/testwt-results.c
432 @example ../test/testwt-zeroe.c
433 @example ../test/testwt-zeron.c
434 @example ../test/testwt.c
435 @example ../test/testwt1.c
436 @example ../test/testwt2.c
437 @example ../test/testwt_clb.c
438 @example ../test/testwt_nc.c
439 @example ../test/testwt_nossnsdf.c
440 @example ../test/testwt_ss.c
441 @example ../test/testwtd.c
442 @example ../test/testwtm.c
443 @example ../test/twod.c
444
445 @example ../exodus_for/test/test_nem.f
446 @example ../exodus_for/test/testcp.f
447 @example ../exodus_for/test/testcpd.f
448 @example ../exodus_for/test/testcpnl.f
449 @example ../exodus_for/test/testrd.f
450 @example ../exodus_for/test/testrd1.f
451 @example ../exodus_for/test/testrd_nsid.f
452 @example ../exodus_for/test/testrdd.f
453 @example ../exodus_for/test/testwt.f
454 @example ../exodus_for/test/testwt1.f
455 @example ../exodus_for/test/testwt2.f
456 @example ../exodus_for/test/testwt3.f
457 @example ../exodus_for/test/testwt_nsid.f
458 @example ../exodus_for/test/testwtd.f
459 @example ../exodus_for/test/testwtm.f
460 */
461
462 /* clang-format on */