Write files using a tally-based filename to support multiple tallies at once.

This commit is contained in:
Patrick Shriwise 2019-12-18 18:25:00 -06:00
parent 2410a4dfba
commit 87f9a495ef
2 changed files with 3 additions and 5 deletions

View file

@ -513,7 +513,7 @@ public:
void set_variable(const std::string& var_name, int bin, double value);
void write() const;
void write(const std::string& filename) const;
void to_hdf5(hid_t group) const;

View file

@ -2155,12 +2155,10 @@ LibMesh::set_variable(const std::string& var_name, int bin, double value) {
(*eqn_sys.solution).set(dof_indices[0], value);
}
void LibMesh::write() const {
void LibMesh::write(const std::string& filename) const {
libMesh::ExodusII_IO exo(*m_);
std::set<std::string> systems_out = {eq_system_name_};
std::stringstream output_filename;
output_filename << "umesh_" << id_ << ".exo";
exo.write_discontinuous_exodusII(output_filename.str(), *equation_systems_, &systems_out);
exo.write_discontinuous_exodusII(filename, *equation_systems_, &systems_out);
}