exodus
— I/O of ExodusII Databases¶
affect.exodus
¶
Usage and Data Model¶
The fundamental class for I/O is Database
. Though it can be directly
used, there is a convenient DatabaseFile
context manager.
Access to the stored values and the structure of the Database
is through objects of the following classes:
DatabaseFile |
|
Database |
|
Global |
|
Field |
|
FieldArray |
|
Fields |
|
Nodal |
|
Blocks |
|
Block |
|
Maps |
|
Map |
|
Sets |
|
Set |
See also the Exodus data model Glossary for more information.
Array Data and Internal Memory Buffers¶
Wherever possible, native array data from the ExodusII C API is accessed directly without copying through a view on a
numpy.ndarray
. This maintains performance by eliminating copying, and it supplies
the arrays in a convenient form for computations with numpy or scipy functions.
Some methods in this module, however, require allocating a smaller temporary memory buffers for working space.
These buffers are small and the size is noted in the documentation for each method.
Typical examples of the temporary memory buffer include functions required to
translate Exodus C strings to the Python str type, or rearrange integer or floating point arrays in the correct order
before supplying them or converting them to numpy.ndarray
. Internal temporary buffers are allocated on the
C/C++ heap using malloc or equivalent function. The buffer memory is released before the function returns.
If an exception occurs, we are careful that the buffer is still released.
Database Objects¶
Entry Types¶
Exceptions and Debug Messages¶
The exceptions thrown from this module are a part of the interface just as much as the functions and classes. We define an Error root exception to allow you to insulate yourself from this API. All the exceptions raised by this module inherit from it.
Error |
|
NoMemory |
|
FileError |
|
FileExists |
|
FileNotFound |
|
FileAccess |
|
ReadWriteError |
|
InternalError |
|
InvalidEntityType |
|
ArrayTypeError |
|
ArgumentTypeError |
|
InactiveComponent |
|
InactiveEntity |
|
InactiveField |
|
InvalidSpatialDimension |
|
NotYetImplemented |
|
RangeError |
See also
example code in Error