We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d677907 commit 7a54db0Copy full SHA for 7a54db0
src/mesh/exodusII_io_helper.C
@@ -4472,7 +4472,11 @@ void ExodusII_IO_Helper::write_element_values
4472
ex_err = exII::ex_get_variable_param(ex_id, exII::EX_ELEM_BLOCK, &num_elem_vars);
4473
EX_CHECK_ERR(ex_err, "Error reading number of elemental variables.");
4474
4475
- this->build_subdomain_map(mesh, false);
+ // 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);
4480
4481
// Use mesh.n_elem() to access into the values vector rather than
4482
// the number of elements the Exodus writer thinks the mesh has,
0 commit comments