Skip to content

Commit 7a54db0

Browse files
committed
Be more efficient when we can get away with it
1 parent d677907 commit 7a54db0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mesh/exodusII_io_helper.C

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4472,7 +4472,11 @@ void ExodusII_IO_Helper::write_element_values
44724472
ex_err = exII::ex_get_variable_param(ex_id, exII::EX_ELEM_BLOCK, &num_elem_vars);
44734473
EX_CHECK_ERR(ex_err, "Error reading number of elemental variables.");
44744474

4475-
this->build_subdomain_map(mesh, false);
4475+
// We might be appending values to an existing file, in which case
4476+
// we haven't done an initialize() and we need to build the
4477+
// subdomain map here.
4478+
if (this->_subdomain_map.empty())
4479+
this->build_subdomain_map(mesh, false);
44764480

44774481
// Use mesh.n_elem() to access into the values vector rather than
44784482
// the number of elements the Exodus writer thinks the mesh has,

0 commit comments

Comments
 (0)