-
Notifications
You must be signed in to change notification settings - Fork 79
Exodus Node and Element Maps
An exodus file can have optional node and/or element maps. These maps provide a mapping from "file implicit" ids to "global" ids.
Assume we have an exodus file with 3 element blocks:
- block 100 has 5 hex elements
- block 200 has 10 hex elements
- block 300 has 5 hex elements
If the elements are laid out in a line:
+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18| 19 | 20 |
+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
block 100 | block 200 | block 300 |
The mesh has:
- 3 element blocks
- 20 total elements
- 42 total nodes
The ids in the center of the elements above are the implicit (1..#element_in_file) ids.
In the case that there are no node or element maps, a call to ex_get_id_map(exoid, EX_NODE_MAP, *node_map)
[Assume node_map of at least size 42] would return node_map
containing the values 1...42.
Similarly, a call to ex_get_id_map(exoid, EX_ELEM_MAP, *elem_map)
[with elem_map of size 20 or more] would return elem_map
containing the values 1...20
We could also call ex_get_block_id_map(exoid, EX_ELEM_BLOCK, 200, elem_map)
which would return the implicit element ids for the elements in block 200. This would be the values 6..15
Assume that the file has the following node and element maps:
- node id map: 11, 22, 33, 44, 55, 66, ...., 442. Or, in other words, the global id of each node is its implicit id multiplied by 11.
- element id map: 10, 20, 30, 40, ..., 200. Or in other words, the global id of each element is its implicit id multiplied by 10.
The call to ex_get_id_map(exoid, EX_NODE_MAP, *node_map)
[Assume node_map of at least size 42] would return node_map
containing the values 11...442.
Similarly, the call to ex_get_id_map(exoid, EX_ELEM_MAP, *elem_map)
[with elem_map of size 20 or more] would return elem_map
containing the values 10...200.
And the call to ex_get_block_id_map(exoid, EX_ELEM_BLOCK, 200, elem_map)
which would return the implicit element ids for the 10 elements in block 200. This would be the values 60..150
- All node and element numbers stored in the exodus file are
implicit ids
. The nodal connectivity, the sideset elements, the nodeset nodes are all implicit ids. - To convert the implicit ids to global ids, you read the node or element id map(s) and use it to convert the implicit to global.